python wizzards ; bnc#881294 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=159
75 lines
3.3 KiB
Diff
75 lines
3.3 KiB
Diff
From bf355f47f49eb352985c129544c60c27814f450b Mon Sep 17 00:00:00 2001
|
|
From: Stephan Bergmann <sbergman@redhat.com>
|
|
Date: Mon, 03 Mar 2014 10:57:34 +0000
|
|
Subject: 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@redhat.com>
|
|
|
|
Conflicts:
|
|
wizards/com/sun/star/wizards/ui/WizardDialog.py
|
|
|
|
Change-Id: I4ef6da4d9d1931917e0aaa6e110fd273bd917b26
|
|
Signed-off-by: Stephan Bergmann <sbergman@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:
|
|
--
|
|
cgit v0.9.0.2-2-gbebe
|