[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - wizards/com

Stephan Bergmann sbergman at redhat.com
Wed May 7 05:48:34 PDT 2014


 wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py |    2 -
 wizards/com/sun/star/wizards/ui/WizardDialog.py               |   12 ++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit bf355f47f49eb352985c129544c60c27814f450b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Mar 3 11:57:34 2014 +0100

    Resolves: fdo#77899 fax etc wizards don't start
    
    Wizards should look for templates in Template_internal, not Template_user
    
    ...as only the former reliably denotes the share/template tree where the
    wizard templates are stored.  (Presumably the latter defaulted to the former as
    long as it wasn't explicitly set in the past, but is now always explicitly set
    since 838b77f5f3d6d8fd98891e99a23ff78a6a357cb2 "Resolves: rhbz#1065807 use xdg
    ~/Templates for default Template location.")
    
    Change-Id: I7d1ac47d821c778fe342865465d0505a94b824bf
    (cherry picked from commit 97822e3cbc63d3bd110bc3c654b3fbb4d4d1904c)
    
    actively search for wizards dir in all internal templates
    
    (cherry picked from commit 5fa18dc21644f2a719bf39ec948a586fa8837b6a)
    Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
    
    Conflicts:
    	wizards/com/sun/star/wizards/ui/WizardDialog.py
    
    Change-Id: I4ef6da4d9d1931917e0aaa6e110fd273bd917b26
    Signed-off-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
index 1ff5f1c..76921d0 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
@@ -773,7 +773,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
             return None
 
     def initializeTemplates(self, xMSF):
-        sLetterPath = self.sTemplatePath + "/../common/wizard/letter"
+        sLetterPath = self.sTemplatePath + "/wizard/letter"
         self.BusinessFiles = \
             FileAccess.getFolderTitles(
                 xMSF, "bus", sLetterPath, self.resources.dictBusinessTemplate)
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py
index fc1ce41..08a8c2d 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.py
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py
@@ -23,6 +23,7 @@ from .UnoDialog2 import UnoDialog2, Desktop, PropertyNames, UIConsts, \
 from .event.CommonListener import TerminateListenerProcAdapter
 from ..common.Resource import Resource
 from ..common.HelpIds import HelpIds
+from ..common.FileAccess import FileAccess
 from ..document.OfficeDocument import OfficeDocument
 from ..text.TextDocument import TextDocument
 
@@ -114,10 +115,17 @@ class WizardDialog(UnoDialog2):
     def initializePaths(self):
         xPropertySet = \
             self.xMSF.createInstance("com.sun.star.util.PathSettings")
-        self.sTemplatePath = \
-            xPropertySet.getPropertyValue("Template_user")[0]
         self.sUserTemplatePath = \
             xPropertySet.getPropertyValue("Template_writable")
+        myFA = FileAccess(self.xMSF)
+        aInternalPaths = xPropertySet.getPropertyValue("Template_internal")
+        self.sTemplatePath = ""
+        for path in aInternalPaths:
+            if myFA.exists(path + "/wizard", False):
+                self.sTemplatePath = path
+                break
+        if self.sTemplatePath == "":
+            raise Exception("could not find wizard templates")
             
     def addRoadmap(self):
         try:


More information about the Libreoffice-commits mailing list