Kaydet (Commit) 6e5c06d0 authored tarafından Matthias Seidel's avatar Matthias Seidel

Cleaning up FormWizard, moving graphics from bmp to png

üst 31df7841
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<!--*********************************************************** <!--***********************************************************
* *
* Licensed to the Apache Software Foundation (ASF) under one * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information * distributed with this work for additional information
...@@ -9,16 +9,16 @@ ...@@ -9,16 +9,16 @@
* to you under the Apache License, Version 2.0 (the * to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance * "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at * with the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an * software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
* *
***********************************************************--> ***********************************************************-->
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="FormWizard" script:language="StarBasic">Option Explicit <script:module xmlns:script="http://openoffice.org/2000/script" script:name="FormWizard" script:language="StarBasic">Option Explicit
...@@ -189,7 +189,7 @@ Dim LocList() as String ...@@ -189,7 +189,7 @@ Dim LocList() as String
ControlCaptionsToStandardLayout() ControlCaptionsToStandardLayout()
oDocument.GetCurrentController().Frame.ComponentWindow.Enable = True oDocument.GetCurrentController().Frame.ComponentWindow.Enable = True
oProgressBar.Value = 90 oProgressBar.Value = 90
DialogModel.imgTheme.ImageURL = FormPath &amp; &quot;FormWizard_1.bmp&quot; DialogModel.imgTheme.ImageURL = FormPath &amp; &quot;FormWizard_1.png&quot;
DialogModel.imgTheme.BackGroundColor = RGB(0,60,126) DialogModel.imgTheme.BackGroundColor = RGB(0,60,126)
ToggleDatabasePage(True) ToggleDatabasePage(True)
oProgressBar.Value = 100 oProgressBar.Value = 100
...@@ -202,11 +202,11 @@ Dim LocList() as String ...@@ -202,11 +202,11 @@ Dim LocList() as String
oFormDocuments = oDataSource.getFormDocuments() oFormDocuments = oDataSource.getFormDocuments()
DlgFormDB.Dispose() DlgFormDB.Dispose()
oDocument.dispose() oDocument.dispose()
Dim bLinkExists as Boolean Dim bLinkExists as Boolean
i = 1 i = 1
Dim FormBaseName as String Dim FormBaseName as String
FormBaseName = FormName FormBaseName = FormName
Do Do
bLinkExists = oFormDocuments.HasbyHierarchicalName(FormName) bLinkExists = oFormDocuments.HasbyHierarchicalName(FormName)
If bLinkExists Then If bLinkExists Then
i = i + 1 i = i + 1
...@@ -227,7 +227,7 @@ Dim LocList() as String ...@@ -227,7 +227,7 @@ Dim LocList() as String
End If End If
If ((Not IsNull(oDBConnection)) And (Not bConnectionIsovergiven)) Then If ((Not IsNull(oDBConnection)) And (Not bConnectionIsovergiven)) Then
oDBConnection.Dispose() oDBConnection.Dispose()
End If End If
WIZARDERROR: WIZARDERROR:
If Err &lt;&gt; 0 Then If Err &lt;&gt; 0 Then
Msgbox(sMsgErrMsg, 16, GetProductName()) Msgbox(sMsgErrMsg, 16, GetProductName())
...@@ -262,7 +262,7 @@ Dim QueryIndex as Integer ...@@ -262,7 +262,7 @@ Dim QueryIndex as Integer
CurCommandType = iCommandTypes(SelIndex) CurCommandType = iCommandTypes(SelIndex)
End If End If
If CurCommandType = com.sun.star.sdb.CommandType.QUERY Then If CurCommandType = com.sun.star.sdb.CommandType.QUERY Then
QueryIndex = SelIndex - Ubound(Tablenames()) - 1 QueryIndex = SelIndex - Ubound(Tablenames()) - 1
Tablename = QueryNames(QueryIndex) Tablename = QueryNames(QueryIndex)
oColumns = oDBConnection.Queries.GetByName(TableName).Columns oColumns = oDBConnection.Queries.GetByName(TableName).Columns
Else Else
...@@ -292,7 +292,7 @@ Sub PreviousStep() ...@@ -292,7 +292,7 @@ Sub PreviousStep()
.cmdGoOn.Enabled = True .cmdGoOn.Enabled = True
.lstSelFields.Tag = Not bControlsareCreated .lstSelFields.Tag = Not bControlsareCreated
.cmdGoOn.Label = sGoOn .cmdGoOn.Label = sGoOn
.imgTheme.ImageUrl = FormPath &amp; &quot;FormWizard_1.bmp&quot; .imgTheme.ImageUrl = FormPath &amp; &quot;FormWizard_1.png&quot;
End With End With
FormSetMoveRights() FormSetMoveRights()
WIZARDERROR: WIZARDERROR:
...@@ -327,7 +327,7 @@ Sub NextStep() ...@@ -327,7 +327,7 @@ Sub NextStep()
DlgFormDB.EndExecute() DlgFormDB.EndExecute()
exit Sub exit Sub
End Select End Select
DialogModel.imgTheme.ImageUrl = FormPath &amp; &quot;FormWizard_&quot; &amp; DialogModel.Step &amp; &quot;.bmp&quot; DialogModel.imgTheme.ImageUrl = FormPath &amp; &quot;FormWizard_&quot; &amp; DialogModel.Step &amp; &quot;.png&quot;
DlgFormDB.Title = WizardTitle(DialogModel.Step) DlgFormDB.Title = WizardTitle(DialogModel.Step)
WIZARDERROR: WIZARDERROR:
If Err &lt;&gt; 0 Then If Err &lt;&gt; 0 Then
...@@ -391,7 +391,7 @@ End Sub ...@@ -391,7 +391,7 @@ End Sub
Sub StoreFormInDatabase() Sub StoreFormInDatabase()
Dim NoArgs() as new com.sun.star.beans.PropertyValue Dim NoArgs() as new com.sun.star.beans.PropertyValue
FormName = &quot;Form_&quot; &amp; sDBName &amp; &quot;_&quot; &amp; TableName &amp; &quot;.sxw&quot; FormName = &quot;Form_&quot; &amp; sDBName &amp; &quot;_&quot; &amp; TableName &amp; &quot;.sxw&quot;
sFormUrl = TempPath &amp; &quot;/&quot; &amp; FormName sFormUrl = TempPath &amp; &quot;/&quot; &amp; FormName
oDocument.StoreAsUrl(sFormUrl, NoArgs()) oDocument.StoreAsUrl(sFormUrl, NoArgs())
...@@ -400,7 +400,6 @@ Sub StoreFormInDatabase() ...@@ -400,7 +400,6 @@ Sub StoreFormInDatabase()
End Sub End Sub
Sub StoreForm() Sub StoreForm()
Dim sTargetPath as String Dim sTargetPath as String
Dim TypeNames(0,2) as String Dim TypeNames(0,2) as String
...@@ -416,7 +415,6 @@ Dim oTypes() as Object ...@@ -416,7 +415,6 @@ Dim oTypes() as Object
End Sub End Sub
Sub EmptyFieldsListboxes() Sub EmptyFieldsListboxes()
Dim NullList() as String Dim NullList() as String
ToggleListboxControls(DialogModel, False) ToggleListboxControls(DialogModel, False)
...@@ -438,9 +436,9 @@ dim iSelPos as Integer ...@@ -438,9 +436,9 @@ dim iSelPos as Integer
sFirstItem = oListBox.getItem(0) sFirstItem = oListBox.getItem(0)
If sFirstItem = DelEntryName Then If sFirstItem = DelEntryName Then
iSelPos = oListBox.getSelectedItemPos() iSelPos = oListBox.getSelectedItemPos()
oListBox.removeItems(0, 1) oListBox.removeItems(0, 1)
If iSelPos &gt; 0 Then If iSelPos &gt; 0 Then
oListBox.selectItemPos(iSelPos-1, True) oListBox.selectItemPos(iSelPos-1, True)
End If End If
End If End If
End Sub End Sub
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment