summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards
diff options
context:
space:
mode:
authorXisco <anistenis@gmail.com>2012-09-23 23:07:09 +0200
committerMichael Meeks <michael.meeks@suse.com>2012-09-24 10:28:15 +0000
commitad895bc43aafc1589ed0ca239fb0c966dd0589eb (patch)
treec584f43dc6f1cfc7d45dc771dfb4cce0e20516f6 /wizards/com/sun/star/wizards
parent293a144126b13a78aef01bd72586432056b8ca80 (diff)
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@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'wizards/com/sun/star/wizards')
-rw-r--r--wizards/com/sun/star/wizards/common/SystemDialog.py27
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py4
2 files changed, 12 insertions, 19 deletions
diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py
index 21756fc172fc..3a89f9837ecf 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 980a28f3ffd0..a475fa5f1c7b 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( \