summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJavier Fernandez <jfernandez@igalia.com>2013-03-20 07:24:12 +0000
committerMichael Meeks <michael.meeks@suse.com>2013-03-25 13:23:08 +0000
commit68e2ef0676ccfd921c36c9a0787041461c87b968 (patch)
tree3a4eca9b6bfa56a610f47d581482ecbd9704b931 /wizards
parenta665b06f44a5e1c1dd3bbd36b954b6b80a6b570f (diff)
Init: Pythonize the IconsDialog class.
Change-Id: I0a214b28a62d2a86834f1ca2c83220324d9e80ae
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/web/IconsDialog.py29
1 files changed, 15 insertions, 14 deletions
diff --git a/wizards/com/sun/star/wizards/web/IconsDialog.py b/wizards/com/sun/star/wizards/web/IconsDialog.py
index ee83a772ee28..09191e341015 100644
--- a/wizards/com/sun/star/wizards/web/IconsDialog.py
+++ b/wizards/com/sun/star/wizards/web/IconsDialog.py
@@ -15,10 +15,12 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-from ImageListDialog import *
-from ImageListDialog import *
-from WWHID import HID_IS
-from common.FileAccess import FileAccess
+
+from .ImageListDialog import ImageListDialog
+from .WWHID import HID_IS
+from ..common.FileAccess import FileAccess
+
+from com.sun.star.awt import Size
'''
@author rpiterman
@@ -61,10 +63,10 @@ class IconsDialog(ImageListDialog):
self.build()
def getIconset(self):
- if getSelected() is None:
+ if self.getSelected() is None:
return None
else:
- return self.set.getKey((getSelected()) / len(self.icons))
+ return self.set.getKey((self.getSelected()) / len(self.icons))
def setIconset(self, iconset):
#COMMENTED
@@ -86,29 +88,28 @@ class IconsDialog(ImageListDialog):
icon = getIconNum(i)
sRetUrls = range(2)
sRetUrls[0] = self.htmlexpDirectory + "/htmlexpo/" \
- + getIconsetPref(iset) + self.icons[icon] + getIconsetPostfix(iset)
+ + self.getIconsetPref(iset) + self.icons[icon] + self.getIconsetPostfix(iset)
sRetUrls[1] = sRetUrls[0]
return sRetUrls
def render(self, object):
if object is None:
return ""
-
i = (object).intValue()
- iset = getIconsetNum(i)
- return getIconset(iset).cp_Name
+ iset = self.getIconsetNum(i)
+ return self.getIconset1(iset).cp_Name
def getIconsetNum(self, i):
return i / self.icons.length
def getIconNum(self, i):
- return i % self.icons.length
+ return i % len(self.icons)
def getIconsetPref(self, iconset):
- return getIconset(iconset).cp_FNPrefix
+ return self.getIconset1(iconset).cp_FNPrefix
def getIconsetPostfix(self, iconset):
- return getIconset(iconset).cp_FNPostfix
+ return self.getIconset1(iconset).cp_FNPostfix
- def getIconset(self, i):
+ def getIconset1(self, i):
return self.set.getElementAt(i)