summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/web/data/CGLayout.py
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/com/sun/star/wizards/web/data/CGLayout.py')
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGLayout.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/wizards/com/sun/star/wizards/web/data/CGLayout.py b/wizards/com/sun/star/wizards/web/data/CGLayout.py
index 9830664cb98c..5bc919bfb6c6 100644
--- a/wizards/com/sun/star/wizards/web/data/CGLayout.py
+++ b/wizards/com/sun/star/wizards/web/data/CGLayout.py
@@ -16,6 +16,7 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
from ...common.ConfigGroup import ConfigGroup
+from ...common.FileAccess import FileAccess
from ...ui.UIConsts import UIConsts
class CGLayout(ConfigGroup):
@@ -24,20 +25,23 @@ class CGLayout(ConfigGroup):
cp_Name = str()
cp_FSName = str()
+ def getSettings(self):
+ return self.root
+
def createTemplates(self, xmsf):
self.templates = {}
- tf = TransformerFactory.newInstance()
- workPath = getSettings().workPath
+
+ workPath = self.getSettings().workPath
fa = FileAccess(xmsf)
stylesheetPath = fa.getURL(
- getSettings().workPath, "layouts/" + self.cp_FSName)
+ self.getSettings().workPath, "layouts/" + self.cp_FSName)
files = fa.listFiles(stylesheetPath, False)
i = 0
- while i < files.length:
- if FileAccess.getExtension(files[i]).equals("xsl"):
- self.templates.put(
- FileAccess.getFilename(files[i]),
- tf.newTemplates(StreamSource (files[i])))
+ while i < len(files):
+ ext = FileAccess.getExtension(files[i])
+ fileName = FileAccess.getFilename(files[i])
+ if ext == "xsl":
+ self.templates[fileName] = files[i]
i += 1
def getImageUrls(self):