diff options
author | Behrend Cornelius <bc@openoffice.org> | 2001-06-22 13:25:07 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2001-06-22 13:25:07 +0000 |
commit | d107c6cd26b6985166f9b0d9dee60ca0a1387d95 (patch) | |
tree | bec7df49ec28afc04a640c8bfb9465cc6b81fc11 /wizards/source/formwizard/FormWizard.xba | |
parent | 4d06f5e20dee83b8c0547c1f8bde56e95d3b34bd (diff) |
#88615# Storing improved, finetuning
Diffstat (limited to 'wizards/source/formwizard/FormWizard.xba')
-rw-r--r-- | wizards/source/formwizard/FormWizard.xba | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/wizards/source/formwizard/FormWizard.xba b/wizards/source/formwizard/FormWizard.xba index bcf9c049f..f1e0460a4 100644 --- a/wizards/source/formwizard/FormWizard.xba +++ b/wizards/source/formwizard/FormWizard.xba @@ -2,6 +2,8 @@ <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> <script:module xmlns:script="http://openoffice.org/2000/script" script:name="FormWizard" script:language="StarBasic">Option Explicit +' Todo: Gruppieren der DBControls mit den Textfeldern einbinden +' Evtl könnte dies auch am Ende geschehen Public DocumentName as String Public FormPath$, FormDBName$, FormReturnValue$ Public TemplatePath$ @@ -105,7 +107,7 @@ Dim i as Integer GlobalError: MsgBox(sMsgErrMsg , 16, sMsgWizardName) ToggleWindow(True) - DlgFormDB.EndExecute() + DlgFormDB.Execute() Reset Stop End Sub @@ -139,6 +141,7 @@ NOFIELDS: MsgBox sMsgErrCouldNotOpenObject, 16, sMsgWizardName End Sub + Sub CancelFormWizard() DlgFormDB.EndExecute() DlgFormDB.Dispose() @@ -226,23 +229,28 @@ Sub StoreForm() Dim oFileDialog Dim iAccept as Integer Dim sPath as String -Dim oStoreProperties(0) as New com.sun.star.beans.PropertyValue Dim ListAny(0) -' Todo: Laut DV soll hierfür ein integer Wert gesetzt werden - ListAny(0) = "FileSave_AutoextPwdBox" - oFileDialog = CreateUnoService("com.sun.star.ui.FilePicker") - oFileDialog.AppendFilter("Writer 6.0", "*.sxw") - oFileDialog.AppendFilter("Writer 6.0 Vorlage", "*.stw") + ListAny(0) = com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS + oFileDialog = CreateUnoService("com.sun.star.ui.dialogs.FilePicker") + oFileDialog.AppendFilter(sWriterFiltername, "*.sxw") + oFileDialog.AppendFilter(sWriterTemplateFiltername, "*.stw") oFileDialog.SetCurrentFilter("Writer 6.0") oFileDialog.Initialize(ListAny()) oFileDialog.SetDisplayDirectory(WorkPath) oFileDialog.SetDefaultName("Form_" & sDBName & "." & TableName iAccept = oFileDialog.Execute() If iAccept = 1 Then - sPath = oFileDialog.Path(0) - oStoreProperties(0).Name = "FilterName" - oStoreProperties(0).Value = oFileDialog.GetCurrentFilter - oDocument.StoreAsUrl(sPath, oStoreProperties()) + sPath = oFileDialog.Files(0) + If oFileDialog.GetCurrentFilter() = sWriterTemplateFiltername Then + Dim oStoreProperties(0) as New com.sun.star.beans.PropertyValue + oStoreProperties(0).Name = "FilterName" + oStoreProperties(0).Value = "swriter: writer_StarOffice_XML_Writer_Template" + oDocument.StoreAsUrl(sPath, oStoreProperties()) + Else + Dim NoArgs() as New com.sun.star.beans.PropertyValue + oDocument.StoreAsUrl(sPath, NoArgs()) + End If DlgFormDB.EndExecute() End If -End Sub</script:module>
\ No newline at end of file +End Sub +</script:module>
\ No newline at end of file |