diff options
author | Behrend Cornelius <bc@openoffice.org> | 2001-11-22 11:27:32 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2001-11-22 11:27:32 +0000 |
commit | d362836a4af4d019db188e9511c094f34caef6a7 (patch) | |
tree | 7cb933caa4b1e3da924ec5e1b69b7536580e0247 | |
parent | 436bd3d99a71d9433ec9bb06ec887c989b25e2fb (diff) |
#94903# Errorhandling improved
-rw-r--r-- | wizards/source/formwizard/DBMeta.xba | 2 | ||||
-rw-r--r-- | wizards/source/formwizard/FormWizard.xba | 4 | ||||
-rw-r--r-- | wizards/source/formwizard/Language.xba | 2 | ||||
-rw-r--r-- | wizards/source/formwizard/Layouter.xba | 21 | ||||
-rw-r--r-- | wizards/source/formwizard/develop.xba | 6 | ||||
-rw-r--r-- | wizards/source/formwizard/script.xlb | 16 | ||||
-rw-r--r-- | wizards/source/formwizard/tools.xba | 4 |
7 files changed, 26 insertions, 29 deletions
diff --git a/wizards/source/formwizard/DBMeta.xba b/wizards/source/formwizard/DBMeta.xba index 38517b979..fba9d99f1 100644 --- a/wizards/source/formwizard/DBMeta.xba +++ b/wizards/source/formwizard/DBMeta.xba @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-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="DBMeta" script:language="StarBasic">REM ***** BASIC ***** + <script:module xmlns:script="http://openoffice.org/2000/script" script:name="DBMeta" script:language="StarBasic">REM ***** BASIC ***** Option Explicit Public sDatabaseList() diff --git a/wizards/source/formwizard/FormWizard.xba b/wizards/source/formwizard/FormWizard.xba index f2ca54e82..9e806ed08 100644 --- a/wizards/source/formwizard/FormWizard.xba +++ b/wizards/source/formwizard/FormWizard.xba @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-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 + <script:module xmlns:script="http://openoffice.org/2000/script" script:name="FormWizard" script:language="StarBasic">Option Explicit Public DocumentName as String Public FormPath as String @@ -65,7 +65,7 @@ Dim i as Integer Dim SelCount as Integer BasicLibraries.LoadLibrary("Tools") BasicLibraries.LoadLibrary("WebWizard") - bDebug = False + bDebug = True If Not bDebug Then On Local Error GoTo WIZARDERROR End If diff --git a/wizards/source/formwizard/Language.xba b/wizards/source/formwizard/Language.xba index 3253b4e53..999dfedc3 100644 --- a/wizards/source/formwizard/Language.xba +++ b/wizards/source/formwizard/Language.xba @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-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="Language" script:language="StarBasic">Option Explicit + <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit Global Const RID_COMMON = 1000 diff --git a/wizards/source/formwizard/Layouter.xba b/wizards/source/formwizard/Layouter.xba index ae9c7ae7f..a13b6fef1 100644 --- a/wizards/source/formwizard/Layouter.xba +++ b/wizards/source/formwizard/Layouter.xba @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-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="Layouter" script:language="StarBasic">Option Explicit + <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Layouter" script:language="StarBasic">Option Explicit Public oProgressbar as Object Public ProgressValue as Integer @@ -103,9 +103,7 @@ Dim i as Integer Case cTabled PositionGridControl(MaxIndex) Case Else - oDocument.LockControllers() PositionControls(MaxIndex) - oDocument.UnlockControllers() End Select ToggleLayoutPage(True) oProgressbar.End @@ -148,10 +146,10 @@ Dim oLocPeer as Object XPixelFactor = 100000/oLocPeer.GetInfo.PixelPerMeterX YPixelFactor = 100000/oLocPeer.GetInfo.PixelPerMeterY aLabelSize = GetPeerSize(oLabelModel, oLocControl, "The quick brown fox...") - nTCHeight = aLabelSize.Height * YPixelFactor + nTCHeight = (aLabelSize.Height+1) * YPixelFactor aTBSize = GetPeerSize(oTBModel, oLocControl, "The quick brown fox...") - nDBRefHeight = aTBSize.Height * YPixelFactor - LabelDiffHeight = Clng((aTBSize.Height - aLabelSize.Height)/2) * YPixelFactor + nDBRefHeight = (aTBSize.Height+1) * YPixelFactor + LabelDiffHeight = Clng((nDBRefHeight - nTCHeight)/2) oDrawPage.Remove(oLabelShape) oDrawPage.Remove(oTBShape) End Sub @@ -187,7 +185,6 @@ Dim sLocText as String oModel = oEvent.Source.Model SwitchBorderMode(Val(Right(oModel.Name,1))) ToggleLayoutPage(False) - oDocument.LockControllers ' Todo: Auch unsichtbare Controls müssen eine neue Border bekommen ' Am besten wird hierbei das dynamische Array oDBShapeList() abgegriffen @@ -206,6 +203,7 @@ WIZARDERROR: Resume LOCERROR LOCERROR: End If + ToggleLayoutPage(True) End Sub @@ -219,7 +217,6 @@ Dim oModel as Object oModel = oEvent.Source.Model SwitchAlignMode(Val(Right(oModel.Name,1))) ToggleLayoutPage(False) - oDocument.LockControllers() If OldAlignMode <> CurAlignMode Then For i = 0 To MaxIndex oTCShapeList(i).GetControl.Align = CurAlignmode @@ -232,14 +229,14 @@ Dim oModel as Object oTCShapeList(i).Size = oSize Next i End If + WIZARDERROR: If Err <> 0 Then Msgbox(sMsgErrMsg, 16, GetProductName()) Resume LOCERROR LOCERROR: End If -' oDocument.UnlockControllers() -' ToggleLayoutPage(True) + ToggleLayoutPage(True) End Sub @@ -248,7 +245,6 @@ Dim oModel as Object If Not bDebug Then On Local Error GoTo WIZARDERROR End If - oModel = oEvent.Source.Model SwitchArrangementButtons(Val(Right(oModel.Name,1))) oModel.State = 1 @@ -306,9 +302,12 @@ End Sub Sub ToggleLayoutPage(bDoEnable as Boolean, Optional FocusControlName as String) oDialogModel.Enabled = bDoEnable If bDoEnable Then + oDocument.UnlockControllers() ToggleOptionButtons(oDialogModel,(bWithBackGraphic = True)) ToggleAlignGroup(bDoEnable) ToggleBorderGroup(bDoEnable) + Else + oDocument.LockControllers() End If If Not IsMissing(FocusControlName) Then DlgFormDB.GetControl(FocusControlName).SetFocus() diff --git a/wizards/source/formwizard/develop.xba b/wizards/source/formwizard/develop.xba index ceca8a7bb..aa4242f56 100644 --- a/wizards/source/formwizard/develop.xba +++ b/wizards/source/formwizard/develop.xba @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-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="develop" script:language="StarBasic">REM ***** BASIC ***** + <script:module xmlns:script="http://openoffice.org/2000/script" script:name="develop" script:language="StarBasic">REM ***** BASIC ***** Option Explicit Public oDBShapeList() as Object @@ -441,7 +441,7 @@ 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() +' oDocument.LockControllers() If bControlsareCreated Then ShapesToNirwana() End If @@ -465,7 +465,7 @@ Dim aSize as New com.sun.star.awt.Size End If oProgressbar.Value = n next n - oDocument.UnlockControllers() +' oDocument.UnlockControllers() End Function diff --git a/wizards/source/formwizard/script.xlb b/wizards/source/formwizard/script.xlb index abb47d8a7..7dd447b94 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="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>
\ No newline at end of file + <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>
\ No newline at end of file diff --git a/wizards/source/formwizard/tools.xba b/wizards/source/formwizard/tools.xba index 5af5dcb84..2f4e218e1 100644 --- a/wizards/source/formwizard/tools.xba +++ b/wizards/source/formwizard/tools.xba @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-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="tools" script:language="StarBasic">REM ***** BASIC ***** + <script:module xmlns:script="http://openoffice.org/2000/script" script:name="tools" script:language="StarBasic">REM ***** BASIC ***** Option Explicit @@ -145,11 +145,9 @@ Dim OldIndex as Integer CurIndex = GetCurIndex(oDialogModel.lstStyles, Styles(), NumberofStyles,8) If CurIndex <> OldIndex Then ToggleLayoutPage(False) - oDocument.LockControllers SetImportStyle() ToggleOptionButtons(oDialogModel, bWithBackGraphic) ToggleLayoutPage(True, "lstStyles") - oDocument.UnlockControllers() End If WIZARDERROR: If Err <> 0 Then |