[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - wizards/com
Caolán McNamara
caolanm at redhat.com
Thu Jan 26 19:25:56 UTC 2017
wizards/com/sun/star/wizards/web/BackgroundsDialog.py | 20 +++++++++---------
1 file changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 4b11e2912c6e997a616823f4e7ed35d71d3cb9a1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jan 19 15:56:12 2017 +0000
fix the web wizard to work again
(cherry picked from commit 6ec8387bea9015c4487f76cebd045a1a6e291bc4)
Change-Id: Ia957080165a060164317a5f7c9a46d065169314a
Reviewed-on: https://gerrit.libreoffice.org/33315
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
index 19f377e..87d00b7 100644
--- a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
+++ b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
@@ -64,12 +64,12 @@ class BackgroundsDialog(ImageListDialog):
def other(self):
filename = self.sd.callOpenDialog(
False, self.settings.cp_DefaultSession.cp_InDirectory)
- if filename is not None and filename.length > 0 and filename[0] is not None:
+ if filename is not None and len(filename) > 0 and filename[0] is not None:
self.settings.cp_DefaultSession.cp_InDirectory = \
FileAccess.getParentDir(filename[0])
i = self.add(filename[0])
- il.setSelected(i)
- il.display(i)
+ self.il.setSelected(i)
+ self.il.display(i)
'''
adds the given image to the image list (to the model)
@@ -81,24 +81,24 @@ class BackgroundsDialog(ImageListDialog):
def add(self, s):
#first i check the item does not already exists in the list...
i = 0
- while i < il.getListModel().getSize():
- if il.getListModel().getElementAt(i) == s:
+ while i < self.il.listModel.getSize():
+ if self.il.listModel.getElementAt(i) == s:
return i
-
i += 1
- il.getListModel().addElement(s)
+
+ self.il.listModel.add1(s)
try:
configView = Configuration.getConfigurationRoot(
self.xMSF, FileAccess.connectURLs(
CONFIG_PATH, "BackgroundImages"), True)
- i = Configuration.getChildrenNames(configView).length + 1
- o = Configuration.addConfigNode(configView, "" + i)
+ i = len(Configuration.getChildrenNames(configView)) + 1
+ o = Configuration.addConfigNode(configView, "" + str(i))
Configuration.set(s, "Href", o)
Configuration.commit(configView)
except Exception:
traceback.print_exc()
- return il.getListModel().getSize() - 1
+ return self.il.listModel.getSize() - 1
'''
an ImageList Imagerenderer implemtation.
More information about the Libreoffice-commits
mailing list