libreoffice/wizards-create-temlates-with-python-2.6.diff
Tomáš Chvátal 50292f6463 - Version bump to 4.2.0rc for testing purposes.
- Version bump to 4.2.0rc for testing purposes
- Update the spec file to be only one building everything
- Cleanup of spec with removal of old cruft here and there
- Remove bundled libs always demand the system versions
- Remove bundled tarballs that are no longer used
- Removed patches no longer usable:
  * fix-collision.patch
  * zip-3.0-add_options_to_help.patch
  * zip-3.0-iso8859_2.patch
  * zip-3.0-nonexec-stack.patch
  * zip-3.0-optflags.patch
  * zip-3.0-tempfile.patch
  * zip-notimestamp.patch
  * solenv-touch-no-dereference.diff
  * split-help-buildhack-no-vcl.diff
  * system-poppler-0.12.3.diff
  * scripting-prefer-internal-rhino.diff
  * build-help-common.diff
- Refreshed patches:
  * office-cfg-linux-common-template-dir.diff
  * officecfg-help-in-usr-share.diff
  * solenv-java-source-version.diff
  * wizards-create-temlates-with-python-2.6.diff
- To be fixed:
  * split-icons-search-usr-share.diff
- Obsoleted specs:
  * libreoffice-help-en-US.spec
  * libreoffice-help-group1.spec

OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=60
2014-01-02 10:24:51 +00:00

46 lines
1.7 KiB
Diff

diff -urN libreoffice-4.2.0.1.old/wizards/com/sun/star/wizards/common/SystemDialog.py libreoffice-4.2.0.1/wizards/com/sun/star/wizards/common/SystemDialog.py
--- libreoffice-4.2.0.1.old/wizards/com/sun/star/wizards/common/SystemDialog.py 2013-12-30 11:24:14.200021127 +0100
+++ libreoffice-4.2.0.1/wizards/com/sun/star/wizards/common/SystemDialog.py 2014-01-01 14:34:21.173943513 +0100
@@ -15,6 +15,7 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
+import locale
import traceback
from .Desktop import Desktop
@@ -140,6 +141,24 @@
traceback.print_exc()
'''
+ The original string is in the system encoding but str accepts only "ascii" in python 2.6
+ This hack is not needed with python-3.0
+ '''
+ def createStr(self, sString):
+ try:
+ strString = str(sString)
+
+ except:
+ try:
+ sCodeSet = locale.nl_langinfo(locale.CODESET)
+ except:
+ sCodeSet = "utf-8"
+
+ strString = str(sString.encode(sCodeSet))
+
+ return strString
+
+ '''
note the result should go through conversion of the product name.
@param filterName
@return the UI localized name of the given filter name.
@@ -153,7 +172,7 @@
xPropertyValue = list(oObject)
for i in xPropertyValue:
if i is not None and i.Name == "UIName":
- return str(i.Value).replace("%productname%", "LibreOffice")
+ return self.createStr(i.Value).replace("%productname%", "LibreOffice")
raise NullPointerException(
"UIName property not found for Filter " + filterName);