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/3024

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/24/3024/1

Init: Pythonize the class CGSession.

Change-Id: Iff1b076654be0b8b95e9802650e2803a274aaf98
---
M wizards/com/sun/star/wizards/web/data/CGSession.py
1 file changed, 17 insertions(+), 13 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/data/CGSession.py 
b/wizards/com/sun/star/wizards/web/data/CGSession.py
index dfa94db..211cea9 100644
--- a/wizards/com/sun/star/wizards/web/data/CGSession.py
+++ b/wizards/com/sun/star/wizards/web/data/CGSession.py
@@ -15,12 +15,17 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-from common.ConfigGroup import ConfigGroup
-from common.ConfigSet import ConfigSet
-from CGContent import CGContent
-from CGDesign import CGDesign
-from CGGeneralInfo import CGGeneralInfo
-from CGPublish import CGPublish
+import uno
+
+from ...common.ConfigGroup import ConfigGroup
+from ...common.ConfigSet import ConfigSet
+from ...common.XMLHelper import XMLHelper
+from .CGContent import CGContent
+from .CGDesign import CGDesign
+from .CGGeneralInfo import CGGeneralInfo
+from .CGPublish import CGPublish
+
+from xml.dom.minidom import Document
 
 class CGSession(ConfigGroup):
 
@@ -37,7 +42,7 @@
     def createDOM(self, parent):
         root = XMLHelper.addElement(
             parent, "session", ["name", "screen-size"],
-            [self.cp_Name, getScreenSize()])
+            [self.cp_Name, self.getScreenSize()])
         self.cp_GeneralInfo.createDOM(root)
         self.cp_Content.createDOM(root)
         return root
@@ -54,13 +59,12 @@
             return "800"
 
     def getLayout(self):
-        return self. root.cp_Layouts.getElement(self.cp_Design.cp_Layout)
+        return self.root.cp_Layouts.getElement(self.cp_Design.cp_Layout)
 
     def getStyle(self):
-        return self.root.cp_Styles.getElement(self.cp_Design.cp_Style)
+        return self.root.cp_Styles.getElementAt(self.cp_Design.cp_Style)
 
-    def createDOM(self):
-        factory = DocumentBuilderFactory.newInstance()
-        doc = factory.newDocumentBuilder().newDocument()
-        createDOM(doc)
+    def createDOM1(self):
+        doc = Document()
+        self.createDOM(doc)
         return doc

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff1b076654be0b8b95e9802650e2803a274aaf98
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.