summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-19 15:56:12 +0000
committerMichael Stahl <mstahl@redhat.com>2017-01-26 19:19:49 +0000
commit6c61086bd3afa0793c9d52634fcd1c46063e46f9 (patch)
treea8500e932591da29e700761e7681c3d6ce09bd7d /wizards
parent610e3d3e947727dad61a3797029b546878c062ed (diff)
fix the web wizard to work again
(cherry picked from commit 6ec8387bea9015c4487f76cebd045a1a6e291bc4) Change-Id: Ia957080165a060164317a5f7c9a46d065169314a Reviewed-on: https://gerrit.libreoffice.org/33314 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/web/BackgroundsDialog.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
index 19f377e0a4ce..87d00b742dbc 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.