Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3014

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/14/3014/1

Init: Pythonize the IconsDialog class.

Change-Id: I0a214b28a62d2a86834f1ca2c83220324d9e80ae
---
M wizards/com/sun/star/wizards/web/IconsDialog.py
1 file 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 ee83a77..09191e3 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 @@
         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 @@
         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)

-- 
To view, visit https://gerrit.libreoffice.org/3014
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a214b28a62d2a86834f1ca2c83220324d9e80ae
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez <javier.fgb@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.