diff options
author | Javier Fernandez <jfernandez@igalia.com> | 2013-03-20 09:57:13 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-03-25 13:23:06 +0000 |
commit | 2168e499d2824ed428a4ce1efc6928f30330857a (patch) | |
tree | 57963d4866f6621da6d3b3b428d70f5a9147d259 /wizards | |
parent | fdfc5daf28ce7fae19f7bcf326bb26d09950e9e9 (diff) |
Init: Pythonize the class CGSession.
Change-Id: Iff1b076654be0b8b95e9802650e2803a274aaf98
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/web/data/CGSession.py | 30 |
1 files 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 dfa94db60f61..211cea996b3d 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 @@ class CGSession(ConfigGroup): 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 @@ class CGSession(ConfigGroup): 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 |