diff --git a/bin/startoo b/bin/startoo index 29db906..0e7f9aa 100755 --- a/bin/startoo +++ b/bin/startoo @@ -1,4 +1,4 @@ #!/bin/sh -/opt/openoffice.org3/program/soffice "-accept=socket,host=localhost,port=2002;urp;" +soffice "--accept=socket,host=localhost,port=2002;urp;" echo "Press ..." read R diff --git a/fields/list.py b/fields/list.py index a4a8635..e062e1f 100644 --- a/fields/list.py +++ b/fields/list.py @@ -27,7 +27,7 @@ class List(Field): # PX for rendering a single row. pxRow = Px(''' - :field.pxRender @@ -42,10 +42,11 @@ class List(Field): pxTable = Px(''' + width=":field.width" + var2="subFields=field.getSubFields(zobj, layoutType)"> -
::_(info[1].labelId) @@ -105,6 +106,19 @@ class List(Field): for n, field in self.fields: if n == name: return field + def getSubFields(self, obj, layoutType): + '''Returns the sub-fields (name, Field) that are showable among + field.fields on the given p_layoutType. Fields that cannot appear in + the result are nevertheless present as a tuple (name, None). This + way, it keeps a nice layouting of the table.''' + res = [] + for n, field in self.fields: + elem = (n, None) + if field.isShowable(obj, layoutType): + elem = (n, field) + res.append(elem) + return res + def getRequestValue(self, request, requestName=None): '''Concatenates the list from distinct form elements in the request.''' name = requestName or self.name # A List may be into another List (?) diff --git a/gen/ui/banner.jpg b/gen/ui/banner.jpg deleted file mode 100644 index 2b01118..0000000 Binary files a/gen/ui/banner.jpg and /dev/null differ diff --git a/gen/ui/banner.png b/gen/ui/banner.png new file mode 100644 index 0000000..a07fe8e Binary files /dev/null and b/gen/ui/banner.png differ diff --git a/gen/ui/bannerrtl.jpg b/gen/ui/bannerrtl.jpg deleted file mode 100644 index 3dbec00..0000000 Binary files a/gen/ui/bannerrtl.jpg and /dev/null differ diff --git a/gen/ui/bannerrtl.png b/gen/ui/bannerrtl.png new file mode 100644 index 0000000..a07fe8e Binary files /dev/null and b/gen/ui/bannerrtl.png differ diff --git a/gen/wrappers/__init__.py b/gen/wrappers/__init__.py index 6c6f7ca..113f0ad 100644 --- a/gen/wrappers/__init__.py +++ b/gen/wrappers/__init__.py @@ -154,7 +154,7 @@ class AbstractWrapper(object):
+ style=":url('%s.png' % bannerName, bg=True)">
diff --git a/pod/styles_manager.py b/pod/styles_manager.py index 6502e25..b9375ea 100644 --- a/pod/styles_manager.py +++ b/pod/styles_manager.py @@ -214,8 +214,8 @@ class StylesManager: (a) if the key is (1), (2) or (3), value must be the display name of an ODT style (b) if the key is (4), value must be an integer indicating how to - map the outline level of outlined styles (ie, for mapping HTML - tag "h1" to the ODT style with outline-level=2, value must be + map the outline level of outlined styles (ie, for mapping XHTML + tag "h1" to the OD style with outline-level=2, value must be integer "1". In that case, h2 will be mapped to the ODT style with outline-level=3, etc.). Note that this value can also be negative. diff --git a/shared/ldap_connector.py b/shared/ldap_connector.py index e7c9894..896be8c 100644 --- a/shared/ldap_connector.py +++ b/shared/ldap_connector.py @@ -40,6 +40,13 @@ class LdapConnector: self.server = ldap.initialize(self.serverUri) self.server.simple_bind_s(login, password) return True, None + except AttributeError, ae: + # When the ldap module is not there, trying to catch ldap.LDAPError + # will raise an error. + message = str(ae) + self.log('Ldap connect error with login %s (%s).' % \ + (login, message)) + return False, message except ldap.LDAPError, le: message = str(le) self.log('%s: connect error with login %s (%s).' % \ diff --git a/shared/utils.py b/shared/utils.py index 4c742c1..ab68838 100644 --- a/shared/utils.py +++ b/shared/utils.py @@ -438,7 +438,7 @@ class LinesCounter: self.printReport() # ------------------------------------------------------------------------------ -CONVERSION_ERROR = 'An error occurred while executing command "%s". %s' +CONVERSION_ERROR = 'An error occurred. %s' class FileWrapper: '''When you get, from an appy object, the value of a File attribute, you get an instance of this class.''' @@ -476,10 +476,10 @@ class FileWrapper: must exist. If not, the file will be dumped in the OS temp folder. The absolute path name of the dumped file is returned. If an error occurs, the method returns None. If p_format is - specified, OpenOffice will be called for converting the dumped file + specified, LibreOffice will be called for converting the dumped file to the desired format. In this case, p_tool, a Appy tool, must be provided. Indeed, any Appy tool contains parameters for contacting - OpenOffice in server mode.''' + LibreOffice in server mode.''' if not filePath: filePath = '%s/file%f.%s' % (getOsTempFolder(), time.time(), normalizeString(self.name)) @@ -511,7 +511,7 @@ class FileWrapper: else: filePath = '%s.%s' % (baseName, format) if not os.path.exists(filePath): - tool.log(CONVERSION_ERROR % (cmd, errorMessage), type='error') + tool.log(CONVERSION_ERROR % errorMessage, type='error') return return filePath