diff options
-rw-r--r-- | wizards/source/formwizard/DlgFormDB.xdl | 13 | ||||
-rw-r--r-- | wizards/source/formwizard/FormWizard.xba | 27 | ||||
-rw-r--r-- | wizards/source/formwizard/Language.xba | 5 | ||||
-rw-r--r-- | wizards/source/formwizard/Layouter.xba | 16 | ||||
-rw-r--r-- | wizards/source/formwizard/develop.xba | 4 | ||||
-rw-r--r-- | wizards/source/formwizard/dialog.xlb | 4 | ||||
-rw-r--r-- | wizards/source/formwizard/script.xlb | 4 | ||||
-rw-r--r-- | wizards/source/formwizard/tools.xba | 20 |
8 files changed, 39 insertions, 54 deletions
diff --git a/wizards/source/formwizard/DlgFormDB.xdl b/wizards/source/formwizard/DlgFormDB.xdl index ac577e8a244c..6b5e9ee12d55 100644 --- a/wizards/source/formwizard/DlgFormDB.xdl +++ b/wizards/source/formwizard/DlgFormDB.xdl @@ -10,9 +10,7 @@ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="FormWizard.FormWizard.FormGetFields" script:language="StarBasic"/> </dlg:menulist> <dlg:img dlg:id="imgTheme" dlg:tab-index="3" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26"/> - <dlg:button dlg:id="cmdCancel" dlg:tab-index="4" dlg:left="6" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34401" dlg:value="cmdCancel"> - <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.FormWizard.CancelFormWizard" script:language="StarBasic"/> - </dlg:button> + <dlg:button dlg:id="cmdCancel" dlg:tab-index="4" dlg:left="6" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34401" dlg:value="cmdCancel" dlg:button-type="cancel"/> <dlg:button dlg:id="cmdHelp" dlg:tab-index="5" dlg:left="63" dlg:top="190" dlg:width="53" dlg:height="14" dlg:tag="34400" dlg:value="cmdHelp" dlg:button-type="help"/> <dlg:button dlg:id="cmdBack" dlg:tab-index="6" dlg:left="155" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34402" dlg:value="cmdBack"> <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.FormWizard.PreviousStep" script:language="StarBasic"/> @@ -83,7 +81,7 @@ </dlg:radiogroup> <dlg:fixedline dlg:id="hlnBinaries" dlg:tab-index="29" dlg:left="6" dlg:top="158" dlg:width="258" dlg:height="8" dlg:page="1" dlg:value="hlnBinaries"/> <dlg:radiogroup> - <dlg:radio dlg:id="optTiled" dlg:tab-index="30" dlg:left="156" dlg:top="154" dlg:width="81" dlg:height="10" dlg:page="2" dlg:tag="11" dlg:help-url="HID:34444" dlg:value="optTiled"> + <dlg:radio dlg:id="optTiled" dlg:tab-index="30" dlg:left="156" dlg:top="154" dlg:width="81" dlg:height="10" dlg:page="2" dlg:tag="11" dlg:help-url="HID:34444" dlg:value="optTiled" dlg:checked="true"> <script:event script:event-name="on-mouseup" script:location="application" script:macro-name="WebWizard.Common.SetBackGraphicStyle" script:language="StarBasic"/> </dlg:radio> <dlg:radio dlg:id="optArea" dlg:tab-index="31" dlg:left="156" dlg:top="168" dlg:width="81" dlg:height="10" dlg:page="2" dlg:tag="10" dlg:help-url="HID:34445" dlg:value="optArea"> @@ -94,15 +92,14 @@ <dlg:fixedline dlg:id="hlnAlign" dlg:tab-index="33" dlg:left="6" dlg:top="143" dlg:width="137" dlg:height="8" dlg:page="2" dlg:value="hlnAlign"/> <dlg:fixedline dlg:id="hlnBorderLayout" dlg:tab-index="34" dlg:left="6" dlg:top="83" dlg:width="137" dlg:height="8" dlg:page="2" dlg:value="hlnBorderLayout"/> <dlg:fixedline dlg:id="hlnArrangements" dlg:tab-index="35" dlg:left="6" dlg:top="39" dlg:width="137" dlg:height="8" dlg:page="2" dlg:value="hlnArrangements"/> - <dlg:button dlg:id="CommandButton1" dlg:tab-index="36" dlg:left="-15" dlg:top="138" dlg:width="0" dlg:height="2" dlg:page="2" dlg:tag="1" dlg:value="CommandButton1"/> <dlg:radiogroup> - <dlg:radio dlg:id="optAlign0" dlg:tab-index="37" dlg:left="12" dlg:top="154" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34441" dlg:value="optAlign0"> + <dlg:radio dlg:id="optAlign0" dlg:tab-index="36" dlg:left="12" dlg:top="154" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34441" dlg:value="optAlign0"> <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.Layouter.ChangeLabelAlignments" script:language="StarBasic"/> </dlg:radio> - <dlg:radio dlg:id="optAlign2" dlg:tab-index="38" dlg:left="12" dlg:top="168" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34442" dlg:value="optAlign2"> + <dlg:radio dlg:id="optAlign2" dlg:tab-index="37" dlg:left="12" dlg:top="168" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34442" dlg:value="optAlign2"> <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.Layouter.ChangeLabelAlignments" script:language="StarBasic"/> </dlg:radio> </dlg:radiogroup> - <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="39" dlg:left="6" dlg:top="180" dlg:width="258" dlg:height="6"/> + <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="38" dlg:left="6" dlg:top="180" dlg:width="258" dlg:height="6"/> </dlg:bulletinboard> </dlg:window>
\ No newline at end of file diff --git a/wizards/source/formwizard/FormWizard.xba b/wizards/source/formwizard/FormWizard.xba index 7b3a6a3abbe4..fd0f7c40601a 100644 --- a/wizards/source/formwizard/FormWizard.xba +++ b/wizards/source/formwizard/FormWizard.xba @@ -90,6 +90,7 @@ Dim SelCount as Integer TexturePath = GetOfficeSubPath("Gallery", "www-back/") WorkPath = GetPathSettings("Work") OpenFormDocument() + ToggleWindow(False) GetDatabaseNames() InitializeWidthList() LoadLanguage @@ -126,7 +127,7 @@ Dim SelCount as Integer DlgFormDB.GetControl("lstTables").SelectItemPos(SelIndex, True) ElseIf CommandType = com.sun.star.sdb.CommandType.TABLE Then SelIndex = IndexInArray(sContent, TableNames() - DlgFormDB.GetControl("lstTables").SelectItemPos(Ubound(QueryNames()+1 + SelIndex, True) + DlgFormDB.GetControl("lstTables").SelectItemPos(Ubound(QueryNames()+1 + SelIndex, True) End If End If CurCommandType = CommandType @@ -141,26 +142,25 @@ Dim SelCount as Integer ' Scenario 1: No parameters are given ToggleListboxControls(oDialogModel, False) End If - DlgFormDB.Title = WizardTitle(1) NumberofStyles = FillupWebListbox(oUcb, "/stl", DlgFormDB, "lstStyles", Styles()) - ImportStyles() + CurIndex = GetCurIndex(oDialogModel.lstStyles, Styles(), NumberofStyles,8) + SetImportStyle() + ConfigurePageStyle() ToggleWindow(True) oDialogModel.imgTheme.ImageURL = FormPath & "FormWizard_1.bmp" ToggleDatabasePage(True) DlgFormDB.GetControl("lstDatabases").SetFocus() - oDialogModel.cmdGoOn.DefaultButton = True DlgFormDB.Execute() DlgFormDB.Dispose If Not IsNull(oDBConnection) Then oDBConnection.Dispose() End If If bDisposeDoc Then - oDocument.Dispose + oDocument.Dispose() End If WIZARDERROR: ShowErrorMessage(True) - ToggleWindow(True) End Sub @@ -203,10 +203,6 @@ NOFIELDS: End Sub -Sub CancelFormWizard() - DlgFormDB.EndExecute() -End Sub - Sub PreviousStep() If Not bDebug Then @@ -227,13 +223,10 @@ End Sub Sub NextStep() -Dim bOldVisible as Boolean If Not bDebug Then On Local Error GoTo WIZARDERROR End If - ' Note: Unfortunately it is not possible to query the visibility of the imagecontrol directly - bOldVisible = oDialogModel.Height > 40 Select Case oDialogModel.Step Case 1 bControlsAreCreated = Not (CBool(oDialogModel.lstSelFields.Tag)) @@ -251,7 +244,6 @@ Dim bOldVisible as Boolean Case 2 StoreForm() End Select - DlgFormDB.GetControl("imgTheme").Visible = bOldVisible oDialogModel.imgTheme.ImageUrl = FormPath & "FormWizard_" & oDialogModel.Step & ".bmp" DlgFormDB.Title = WizardTitle(oDialogModel.Step) WIZARDERROR: @@ -260,11 +252,6 @@ End Sub Sub InitializeLayoutSettings() - If oPageStyle.BackGraphicLocation = com.sun.star.style.GraphicLocation.TILED Then - oDialogModel.optTiled.State = 1 - Else - oDialogModel.optArea.State = 1 - End If SwitchArrangementButtons(cTabled) SwitchAlignMode(SBALIGNLEFT) SwitchBorderMode(SB3DBORDER) @@ -305,7 +292,7 @@ Dim sBaseBookmarkName as String FilterNames(0,0) = oFilters.GetByName("swriter: StarOffice XML (Writer)").UIName FilterNames(0,1) = "*.sxw" FilterNames(0,2) = "" - sTargetPath = StoreDocument(oDocument, FilterNames(), "Form_" & sDBName & "_" & TableName, WorkPath) + sTargetPath = StoreDocument(oDocument, FilterNames(), "Form_" & sDBName & "_" & TableName & ".sxw", WorkPath) If sTargetPath <> "" Then sBookmarkName = GetFileNamewithoutExtension(FileNameoutofPath(sTargetPath)) sBaseBookmarkName = sBookmarkName diff --git a/wizards/source/formwizard/Language.xba b/wizards/source/formwizard/Language.xba index 9f37d078151a..2296926387f1 100644 --- a/wizards/source/formwizard/Language.xba +++ b/wizards/source/formwizard/Language.xba @@ -27,9 +27,6 @@ Dim sMsgCreatedForm as String Dim sMsgErrCouldNotOpenObject as String Dim sMsgErrNameToLong as String - -Dim Form_ilFormTitleSuggestPrefix as String - Dim sTimeAppendix as String Dim sDateAppendix as String @@ -58,7 +55,6 @@ Sub LoadLanguage () sMsgErrCouldNotOpenObject = GetResText (RID_COMMON + 13) ' Internal Logic - Form_ilFormTitleSuggestPrefix = GetResText(RID_FORM + 3) sDateAppendix = GetResText(RID_FORM + 4) sTimeAppendix = GetResText(RID_FORM + 5) @@ -70,6 +66,7 @@ End Sub Sub SetDialogLanguage () DlgFormDB = LoadDialog("FormWizard", "DlgFormDB") oDialogModel = DlgFormDB.Model + With oDialogModel .cmdCancel.Label = GetResText(RID_COMMON + 1) .cmdBack.Label = GetResText(RID_COMMON + 2) diff --git a/wizards/source/formwizard/Layouter.xba b/wizards/source/formwizard/Layouter.xba index ca6ae99119d7..5a4c23e851fa 100644 --- a/wizards/source/formwizard/Layouter.xba +++ b/wizards/source/formwizard/Layouter.xba @@ -172,7 +172,7 @@ Dim sLocText as String End If WIZARDERROR: ShowErrorMessage(True) - oDocument.UnlockControllers + oDocument.UnlockControllers() ToggleLayoutPage(True) End Sub @@ -184,7 +184,6 @@ Dim oModel as Object If Not bDebug Then On Local Error GoTo WIZARDERROR End If - oModel = oEvent.Source.Model SwitchAlignMode(Val(Right(oModel.Name,1))) ToggleLayoutPage(False) @@ -203,7 +202,7 @@ Dim oModel as Object End If WIZARDERROR: ShowErrorMessage(True) - oDocument.UnlockControllers(False) + oDocument.UnlockControllers() ToggleLayoutPage(True) End Sub @@ -265,15 +264,16 @@ End Sub Sub ToggleLayoutPage(bDoEnable as Boolean, Optional FocusControlName as String) - oDialogModel.Enabled = bDoEnable - If Not IsMissing(FocusControlName) Then - DlgFormDB.GetControl(FocusControlName).SetFocus() - End If +' Todo: Diese Zeile wieder reinnehmen und schauen, ob alles richtig getogglet wird. +' oDialogModel.Enabled = bDoEnable If bDoEnable Then ToggleOptionButtons(oDialogModel,(bWithBackGraphic = True)) ToggleAlignGroup(bDoEnable) ToggleBorderGroup(bDoEnable) End If + If Not IsMissing(FocusControlName) Then + DlgFormDB.GetControl(FocusControlName).SetFocus() + End If End Sub @@ -283,7 +283,7 @@ Dim oShape as Object For i = oDrawPage.Count-1 To 0 Step -1 oShape = oDrawPage.GetByIndex(i) If oShape.ShapeType = "com.sun.star.drawing.ControlShape" Then - oShape.Dispose + oShape.Dispose() End If Next i End Sub diff --git a/wizards/source/formwizard/develop.xba b/wizards/source/formwizard/develop.xba index 0fc9a4583894..02894118a93c 100644 --- a/wizards/source/formwizard/develop.xba +++ b/wizards/source/formwizard/develop.xba @@ -445,10 +445,9 @@ Dim n as Integer Dim oColumn as Object Dim aPoint as New com.sun.star.awt.Point Dim aSize as New com.sun.star.awt.Size + oDocument.LockControllers() If bControlsareCreated Then - oDocument.LockControllers() ShapesToNirwana() - oDocument.UnlockControllers() End If oGridModel = CreateUnoService(oModelService(cGridControl)) oGridModel.Name = "Grid1" @@ -470,6 +469,7 @@ Dim aSize as New com.sun.star.awt.Size End If oProgressbar.Value = n next n + oDocument.UnlockControllers() End Function diff --git a/wizards/source/formwizard/dialog.xlb b/wizards/source/formwizard/dialog.xlb index d680f29292e8..517308bc2196 100644 --- a/wizards/source/formwizard/dialog.xlb +++ b/wizards/source/formwizard/dialog.xlb @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> -<library:library xmlns:library="http://openoffice.org/2000/library" library:name="FormWizard" library:readonly="true" library:passwordprotected="false"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="FormWizard" library:readonly="false" library:passwordprotected="false"> <library:element library:name="DlgFormDB"/> -</library:library> +</library:library>
\ No newline at end of file diff --git a/wizards/source/formwizard/script.xlb b/wizards/source/formwizard/script.xlb index 0b79b7f078ba..abb47d8a7061 100644 --- a/wizards/source/formwizard/script.xlb +++ b/wizards/source/formwizard/script.xlb @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> -<library:library xmlns:library="http://openoffice.org/2000/library" library:name="FormWizard" library:readonly="true" library:passwordprotected="false"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="FormWizard" library:readonly="false" library:passwordprotected="false"> <library:element library:name="FormWizard"/> <library:element library:name="Layouter"/> <library:element library:name="Language"/> <library:element library:name="DBMeta"/> <library:element library:name="tools"/> <library:element library:name="develop"/> -</library:library> +</library:library>
\ No newline at end of file diff --git a/wizards/source/formwizard/tools.xba b/wizards/source/formwizard/tools.xba index c45c9beea17c..99e92829aa8e 100644 --- a/wizards/source/formwizard/tools.xba +++ b/wizards/source/formwizard/tools.xba @@ -140,7 +140,6 @@ End Function Sub ImportStyles() Dim OldIndex as Integer -Dim sImportPath as String If Not bDebug Then On Local Error GoTo WIZARDERROR End If @@ -149,19 +148,24 @@ Dim sImportPath as String If CurIndex <> OldIndex Then ToggleLayoutPage(False) oDocument.LockControllers - sImportPath = Styles(8,CurIndex) - bWithBackGraphic = LoadNewStyles(oDocument, oDialogModel, CurIndex, sImportPath, Styles(), TexturePath) - ControlCaptionsToStandardLayout() + SetImportStyle() ToggleOptionButtons(oDialogModel, bWithBackGraphic) - ConfigurePageStyle() ToggleLayoutPage(True, "lstStyles") - oDocument.UnlockControllers + oDocument.UnlockControllers() End If WIZARDERROR: ShowErrorMessage(True) End Sub +Sub SetImportStyle() +Dim sImportPath as String + sImportPath = Styles(8,CurIndex) + bWithBackGraphic = LoadNewStyles(oDocument, oDialogModel, CurIndex, sImportPath, Styles(), TexturePath) + ControlCaptionsToStandardLayout() +End Sub + + Function SetNumerics(ByVal oLocObject as Object, iLocFieldType as Integer) as Object Select Case iLocFieldType Case com.sun.star.sdbc.DataType.BIGINT @@ -278,9 +282,9 @@ Sub ShowErrorMessage(bEndExecute as Boolean) ToggleWindow(True) Resume LOCERROR LOCERROR: + On Local Error Goto 0 If bEndExecute Then DlgFormDB.EndExecute() End If End If -End Sub -</script:module>
\ No newline at end of file +End Sub</script:module>
\ No newline at end of file |