[Libreoffice-commits] .: wizards/com

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Sep 24 03:28:38 PDT 2012


 wizards/com/sun/star/wizards/common/SystemDialog.py     |   27 +++++-----------
 wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py |    4 +-
 2 files changed, 12 insertions(+), 19 deletions(-)

New commits:
commit ad895bc43aafc1589ed0ca239fb0c966dd0589eb
Author: Xisco <anistenis at gmail.com>
Date:   Sun Sep 23 23:07:09 2012 +0200

    pywizards: add a name textbox to the filepicker
    
    Now it's possible to change the name of the file that is going to be saved
    
    Change-Id: I482466e7c006a38a1eab543872101c029d5e2d65
    Reviewed-on: https://gerrit.libreoffice.org/688
    Reviewed-by: Michael Meeks <michael.meeks at suse.com>
    Tested-by: Michael Meeks <michael.meeks at suse.com>

diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py
index 21756fc..3a89f98 100644
--- a/wizards/com/sun/star/wizards/common/SystemDialog.py
+++ b/wizards/com/sun/star/wizards/common/SystemDialog.py
@@ -15,14 +15,15 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-import uno
 import traceback
 from .Configuration import Configuration
 from .Desktop import Desktop
 from .Helper import Helper
 
-from com.sun.star.ui.dialogs.TemplateDescription import FILESAVE_AUTOEXTENSION, FILEOPEN_SIMPLE
-from com.sun.star.ui.dialogs.ExtendedFilePickerElementIds import CHECKBOX_AUTOEXTENSION
+from com.sun.star.ui.dialogs.TemplateDescription import \
+    FILESAVE_AUTOEXTENSION, FILEOPEN_SIMPLE
+from com.sun.star.ui.dialogs.ExtendedFilePickerElementIds import \
+    CHECKBOX_AUTOEXTENSION
 from com.sun.star.awt import WindowDescriptor
 from com.sun.star.awt.WindowClass import MODALTOP
 from com.sun.star.lang import IllegalArgumentException
@@ -30,25 +31,24 @@ from com.sun.star.awt.VclWindowPeerAttribute import OK
 
 class SystemDialog(object):
 
-    '''
-    @param xMSF
-    @param ServiceName
-    @param type  according to com.sun.star.ui.dialogs.TemplateDescription
-    '''
-
     def __init__(self, xMSF, ServiceName, Type):
         try:
             self.xMSF = xMSF
             self.systemDialog = xMSF.createInstance(ServiceName)
             self.xStringSubstitution = self.createStringSubstitution(xMSF)
 
+			# Add a name textbox to the filepicker
+            if self.systemDialog is not None:
+				self.systemDialog.initialize((Type,))
+
         except Exception, exception:
             traceback.print_exc()
 
     @classmethod
     def createStoreDialog(self, xmsf):
         return SystemDialog(
-            xmsf, "com.sun.star.ui.dialogs.FilePicker",FILESAVE_AUTOEXTENSION)
+            xmsf, "com.sun.star.ui.dialogs.FilePicker",
+                FILESAVE_AUTOEXTENSION)
 
     @classmethod
     def createOpenDialog(self, xmsf):
@@ -73,13 +73,6 @@ class SystemDialog(object):
             traceback.print_exc()
             return path
 
-    '''
-    @param displayDir
-    @param defaultName
-    given url to a local path.
-    @return
-    '''
-
     def callStoreDialog(self, displayDir, defaultName, sDocuType=None):
         if sDocuType is not None:
             self.addFilterToDialog(defaultName[-3:], sDocuType, True)
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
index 980a28f..a475fa5 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
@@ -173,8 +173,8 @@ class FaxWizardDialogImpl(FaxWizardDialog):
             self.myFaxDoc.keepTypeFrame = \
                 (self.chkUseCommunicationType.State is not 0)
             self.myFaxDoc.killEmptyFrames()
-            self.bSaveSuccess = OfficeDocument.store(self.xMSF, TextDocument.xTextDocument,
-                self.sPath, "writer8_template")
+            self.bSaveSuccess = OfficeDocument.store(self.xMSF,
+				TextDocument.xTextDocument, self.sPath, "writer8_template")
             if self.bSaveSuccess:
                 self.saveConfiguration()
                 xIH = self.xMSF.createInstance( \


More information about the Libreoffice-commits mailing list