From 0bb042d4427b746b547c31c25e6594ec5c064116 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Ledure Date: Sun, 27 Oct 2013 15:05:18 +0100 Subject: Access2Base : Reference to documentation added in every module + workaround for setPosSize issue (LO 4.1) + "Sidebar" argument for RunCommand + Trace dialog layout revisit for cleaner display in Linux Change-Id: I0d5c4da5681ab1649d062a7133d507163163343e Reviewed-on: https://gerrit.libreoffice.org/6449 Reviewed-by: Lionel Elie Mamane Tested-by: Lionel Elie Mamane --- wizards/source/access2base/Application.xba | 7 ++++- wizards/source/access2base/Collect.xba | 7 ++++- wizards/source/access2base/Compatible.xba | 7 ++++- wizards/source/access2base/Control.xba | 9 ++++-- wizards/source/access2base/DataDef.xba | 7 ++++- wizards/source/access2base/Database.xba | 9 ++++-- wizards/source/access2base/Dialog.xba | 7 ++++- wizards/source/access2base/DoCmd.xba | 22 +++++++++++---- wizards/source/access2base/Event.xba | 7 ++++- wizards/source/access2base/Field.xba | 7 ++++- wizards/source/access2base/Form.xba | 41 ++++++++++++++++++++-------- wizards/source/access2base/L10N.xba | 7 ++++- wizards/source/access2base/Methods.xba | 7 ++++- wizards/source/access2base/OptionGroup.xba | 7 ++++- wizards/source/access2base/PropertiesGet.xba | 7 ++++- wizards/source/access2base/PropertiesSet.xba | 7 ++++- wizards/source/access2base/Property.xba | 7 ++++- wizards/source/access2base/Recordset.xba | 9 ++++-- wizards/source/access2base/SubForm.xba | 7 ++++- wizards/source/access2base/Trace.xba | 7 ++++- wizards/source/access2base/Utils.xba | 7 ++++- wizards/source/access2base/_License.xba | 10 ++++--- wizards/source/access2base/acConstants.xba | 7 ++++- wizards/source/access2base/dlgTrace.xdl | 19 +++++++------ 24 files changed, 186 insertions(+), 52 deletions(-) (limited to 'wizards') diff --git a/wizards/source/access2base/Application.xba b/wizards/source/access2base/Application.xba index 680c546f13b6..3497669db5fe 100644 --- a/wizards/source/access2base/Application.xba +++ b/wizards/source/access2base/Application.xba @@ -1,6 +1,11 @@ -Option Explicit +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Explicit 'DATABASE ' Name property diff --git a/wizards/source/access2base/Collect.xba b/wizards/source/access2base/Collect.xba index 43cd91a2a2f2..34abbfb8ee06 100644 --- a/wizards/source/access2base/Collect.xba +++ b/wizards/source/access2base/Collect.xba @@ -1,6 +1,11 @@ -Option Compatible +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Compatible Option ClassModule Option Explicit diff --git a/wizards/source/access2base/Compatible.xba b/wizards/source/access2base/Compatible.xba index 1e263000674f..f3d3ad940626 100644 --- a/wizards/source/access2base/Compatible.xba +++ b/wizards/source/access2base/Compatible.xba @@ -1,6 +1,11 @@ -Option Compatible +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Compatible Option Explicit REM ----------------------------------------------------------------------------------------------------------------------- diff --git a/wizards/source/access2base/Control.xba b/wizards/source/access2base/Control.xba index b922416f9fde..42ff713ea7ff 100644 --- a/wizards/source/access2base/Control.xba +++ b/wizards/source/access2base/Control.xba @@ -1,6 +1,11 @@ -Option Compatible +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Compatible Option ClassModule Option Explicit @@ -471,7 +476,7 @@ Dim vRowSource() As Variant, iCount As Integer, i As Integer If pvIndex < -1 Or pvIndex > iCount + 1 Then Goto Error_Index ReDim Preserve vRowSource(0 To iCount + 1) If pvIndex = -1 Then pvIndex = iCount + 1 - For i =iCount + 1 To pvIndex + 1 Step -1 + For i = iCount + 1 To pvIndex + 1 Step -1 vRowSource(i) = vRowSource(i - 1) Next i vRowSource(pvIndex) = pvItem diff --git a/wizards/source/access2base/DataDef.xba b/wizards/source/access2base/DataDef.xba index ed8b386466d5..2de30f866bff 100644 --- a/wizards/source/access2base/DataDef.xba +++ b/wizards/source/access2base/DataDef.xba @@ -1,6 +1,11 @@ -Option Compatible +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Compatible Option ClassModule Option Explicit diff --git a/wizards/source/access2base/Database.xba b/wizards/source/access2base/Database.xba index 0eab34147c54..b09b7dd5eb5b 100644 --- a/wizards/source/access2base/Database.xba +++ b/wizards/source/access2base/Database.xba @@ -1,6 +1,11 @@ -Option Compatible +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Compatible Option ClassModule Option Explicit @@ -22,7 +27,7 @@ Private FindRecord As Object Private StatusBar As Object Private Dialogs As Object ' Collection Private RecordsetMax As Integer -Private RecordsetsColl As Object ' Collection of actice recordsets +Private RecordsetsColl As Object ' Collection of active recordsets REM ----------------------------------------------------------------------------------------------------------------------- REM --- CONSTRUCTORS / DESTRUCTORS --- diff --git a/wizards/source/access2base/Dialog.xba b/wizards/source/access2base/Dialog.xba index befa7d18d483..146e060d88eb 100644 --- a/wizards/source/access2base/Dialog.xba +++ b/wizards/source/access2base/Dialog.xba @@ -1,6 +1,11 @@ -Option Compatible +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Compatible Option ClassModule Option Explicit diff --git a/wizards/source/access2base/DoCmd.xba b/wizards/source/access2base/DoCmd.xba index 1489d4847f49..91abb0408e84 100644 --- a/wizards/source/access2base/DoCmd.xba +++ b/wizards/source/access2base/DoCmd.xba @@ -1,6 +1,11 @@ -Option Explicit +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Explicit Type _FindParams FindRecord As Integer ' Set to 1 at first invocation of FindRecord @@ -690,10 +695,16 @@ Dim iPosSize As Integer Dim oWindow As Object Set oWindow = _SelectWindow() - If Not IsNull(oWindow.Frame) Then - oWindow.Frame.ContainerWindow.setPosSize(pvRight, pvDown, pvWidth, pvHeight, iPosSize) - MoveSize = True - End If + With oWindow + If Not IsNull(.Frame) Then + If Utils._hasUNOProperty(.Frame.ContainerWindow, "IsMaximized") Then ' Ignored when <= OO3.2 + .Frame.ContainerWindow.IsMaximized = False + .Frame.ContainerWindow.IsMinimized = False + End If + .Frame.ContainerWindow.setPosSize(pvRight, pvDown, pvWidth, pvHeight, iPosSize) + MoveSize = True + End If + End With Exit_Function: Utils._ResetCalledSub("MoveSize") @@ -1319,6 +1330,7 @@ Dim iVBACommand As Integer, sOOCommand As String, sDispatch As String Case iVBACommand = acCmdSelectAllRecords Or UCase(sOOCommand) = "SELECTALL" : sDispatch = "SelectAll" Case iVBACommand = acCmdSendToBack Or UCase(sOOCommand) = "SENDTOBACK" : sDispatch = "SendToBack" Case UCase(sOOCommand) = "SHOWFMEXPLORER" : sDispatch = "ShowFmExplorer" + Case UCase(sOOCommand) = "SIDEBAR" : sDispatch = "Sidebar" Case iVBACommand = acCmdSortDescending Or UCase(sOOCommand) = "SORTDOWN" : sDispatch = "SortDown" Case iVBACommand = acCmdSortAscending Or UCase(sOOCommand) = "SORTUP" : sDispatch = "Sortup" Case UCase(sOOCommand) = "SPINBUTTON" : sDispatch = "SpinButton" diff --git a/wizards/source/access2base/Event.xba b/wizards/source/access2base/Event.xba index ec2ee2474456..65d38f735eb3 100644 --- a/wizards/source/access2base/Event.xba +++ b/wizards/source/access2base/Event.xba @@ -1,6 +1,11 @@ -Option Compatible +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Compatible Option ClassModule Option Explicit diff --git a/wizards/source/access2base/Field.xba b/wizards/source/access2base/Field.xba index 78431f564587..39fbfeca3306 100644 --- a/wizards/source/access2base/Field.xba +++ b/wizards/source/access2base/Field.xba @@ -1,6 +1,11 @@ -Option Compatible +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Compatible Option ClassModule Option Explicit diff --git a/wizards/source/access2base/Form.xba b/wizards/source/access2base/Form.xba index 43581aa84555..da4673b0e4b3 100644 --- a/wizards/source/access2base/Form.xba +++ b/wizards/source/access2base/Form.xba @@ -1,6 +1,11 @@ -Option Compatible +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Compatible Option ClassModule Option Explicit @@ -119,14 +124,14 @@ Property Let Height(ByVal pvValue As Variant) End Property ' Height (set) REM ----------------------------------------------------------------------------------------------------------------------- -Property Get IsLoaded() As Boolean +Function IsLoaded() As Boolean 'Return True if form open - If _ErrorHandler() Then On Local Error Goto Error_Property + If _ErrorHandler() Then On Local Error Goto Error_Function Utils._SetCalledSub("Form.getIsLoaded") If _IsLoaded Then ' For performance reasons, a form object, once detected as loaded, is presumed remaining loaded IsLoaded = True - Goto Exit_Property + Goto Exit_Function End If IsLoaded = False @@ -168,13 +173,13 @@ Dim i As Integer Set oComp = Nothing IsLoaded = _IsLoaded -Exit_Property: +Exit_Function: Utils._ResetCalledSub("Form.getIsLoaded") - Exit Property -Error_Property: + Exit Function +Error_Function: TraceError(TRACEABORT, Err, "Form.getIsLoaded", Erl) - GoTo Exit_Property -End Property + GoTo Exit_Function +End Function REM ----------------------------------------------------------------------------------------------------------------------- Property Get Name() As String @@ -438,7 +443,13 @@ Dim iPosSize As Integer If pvTop >= 0 Then iPosSize = iPosSize + com.sun.star.awt.PosSize.Y If pvWidth > 0 Then iPosSize = iPosSize + com.sun.star.awt.PosSize.WIDTH If pvHeight > 0 Then iPosSize = iPosSize + com.sun.star.awt.PosSize.HEIGHT - If iPosSize > 0 Then ContainerWindow.setPosSize(pvLeft, pvTop, pvWidth, pvHeight, iPosSize) + If iPosSize > 0 Then + If Utils._hasUNOProperty(ContainerWindow, "IsMaximized") Then ' Ignored when <= OO3.2 + ContainerWindow.IsMaximized = False + ContainerWindow.IsMinimized = False + End If + ContainerWindow.setPosSize(pvLeft, pvTop, pvWidth, pvHeight, iPosSize) + End If Move = True Exit_Function: @@ -605,7 +616,7 @@ Dim oObject As Object Case UCase("Bookmark") On Local Error Resume Next ' Disable error handler because bookmarking does not always react well in events ... If DatabaseForm.IsBookmarkable Then vBookmark = DatabaseForm.getBookmark() Else vBookmark = Nothing - On Local Error Goto Error_Function + If _ErrorHandler() Then On Local Error Goto Error_Function Else On Local Error Goto 0 If IsNull(vBookmark) Then Goto Trace_Error _PropertyGet = vBookmark Case UCase("Caption") @@ -727,6 +738,10 @@ Dim oDatabase As Object DatabaseForm.reload() Case UCase("Height") If Not Utils._CheckArgument(pvValue, iArgNr, Utils._AddNumeric(), , False) Then Goto Trace_Error_Value + If Utils._hasUNOProperty(ContainerWindow, "IsMaximized") Then ' Ignored when <= OO3.2 + ContainerWindow.IsMaximized = False + ContainerWindow.IsMinimized = False + End If ContainerWindow.setPosSize(0, 0, 0, pvValue, com.sun.star.awt.PosSize.HEIGHT) Case UCase("RecordSource") If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value @@ -739,6 +754,10 @@ Dim oDatabase As Object ContainerWindow.setVisible(pvValue) Case UCase("Width") If Not Utils._CheckArgument(pvValue, iArgNr, Utils._AddNumeric()) Then Goto Trace_Error_Value + If Utils._hasUNOProperty(ContainerWindow, "IsMaximized") Then ' Ignored when <= OO3.2 + ContainerWindow.IsMaximized = False + ContainerWindow.IsMinimized = False + End If ContainerWindow.setPosSize(0, 0, pvValue, 0, com.sun.star.awt.PosSize.WIDTH) Case Else Goto Trace_Error diff --git a/wizards/source/access2base/L10N.xba b/wizards/source/access2base/L10N.xba index d95a8ce387c7..b8abab0075ee 100644 --- a/wizards/source/access2base/L10N.xba +++ b/wizards/source/access2base/L10N.xba @@ -1,6 +1,11 @@ -Option Explicit +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Explicit REM ----------------------------------------------------------------------------------------------------------------------- REM --- PRIVATE FUNCTIONS --- diff --git a/wizards/source/access2base/Methods.xba b/wizards/source/access2base/Methods.xba index ac274c8261d0..609fda01bb9f 100644 --- a/wizards/source/access2base/Methods.xba +++ b/wizards/source/access2base/Methods.xba @@ -1,6 +1,11 @@ -Option Explicit +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Explicit REM ----------------------------------------------------------------------------------------------------------------------- Public Function AddItem(Optional pvBox As Variant, ByVal Optional pvItem As Variant, ByVal Optional pvIndex) As Boolean diff --git a/wizards/source/access2base/OptionGroup.xba b/wizards/source/access2base/OptionGroup.xba index 4a4b6ae8343d..2276dfc70d83 100644 --- a/wizards/source/access2base/OptionGroup.xba +++ b/wizards/source/access2base/OptionGroup.xba @@ -1,6 +1,11 @@ -Option Compatible +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Compatible Option ClassModule Option Explicit diff --git a/wizards/source/access2base/PropertiesGet.xba b/wizards/source/access2base/PropertiesGet.xba index 12e7ed2e3574..eec79ba8c560 100644 --- a/wizards/source/access2base/PropertiesGet.xba +++ b/wizards/source/access2base/PropertiesGet.xba @@ -1,6 +1,11 @@ -Option Explicit +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Explicit REM ----------------------------------------------------------------------------------------------------------------------- Public Function getAbsolutePosition(Optional pvObject As Variant) As Boolean diff --git a/wizards/source/access2base/PropertiesSet.xba b/wizards/source/access2base/PropertiesSet.xba index 8f9a7b2e7eda..58a3eeaa1952 100644 --- a/wizards/source/access2base/PropertiesSet.xba +++ b/wizards/source/access2base/PropertiesSet.xba @@ -1,6 +1,11 @@ -Option Explicit +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Explicit REM ----------------------------------------------------------------------------------------------------------------------- Public Function setAbsolutePosition(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean diff --git a/wizards/source/access2base/Property.xba b/wizards/source/access2base/Property.xba index 7d59ef7bd304..f7ca59240897 100644 --- a/wizards/source/access2base/Property.xba +++ b/wizards/source/access2base/Property.xba @@ -1,6 +1,11 @@ -Option Compatible +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Compatible Option ClassModule Option Explicit diff --git a/wizards/source/access2base/Recordset.xba b/wizards/source/access2base/Recordset.xba index ae6c4d2576df..b357cbf10959 100644 --- a/wizards/source/access2base/Recordset.xba +++ b/wizards/source/access2base/Recordset.xba @@ -1,6 +1,11 @@ -Option Compatible +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Compatible Option ClassModule Option Explicit @@ -260,7 +265,7 @@ Dim vTemp As Variant End If Next i End With - On Local Error Goto Error_Function + If _ErrorHandler() Then On Local Error Goto Error_Function Else On Local Error Goto 0 _EditMode = dbEditAdd AddNew = True diff --git a/wizards/source/access2base/SubForm.xba b/wizards/source/access2base/SubForm.xba index dc93a988d9e2..0efe7ff05ad0 100644 --- a/wizards/source/access2base/SubForm.xba +++ b/wizards/source/access2base/SubForm.xba @@ -1,6 +1,11 @@ -Option Compatible +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Compatible Option ClassModule Option Explicit diff --git a/wizards/source/access2base/Trace.xba b/wizards/source/access2base/Trace.xba index 42209d7ce6e4..5ceaf865af4d 100644 --- a/wizards/source/access2base/Trace.xba +++ b/wizards/source/access2base/Trace.xba @@ -1,6 +1,11 @@ -Option Explicit +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Explicit Public Const cstLogMaxEntries = 20 diff --git a/wizards/source/access2base/Utils.xba b/wizards/source/access2base/Utils.xba index f136c574950d..93e7ad9da87c 100644 --- a/wizards/source/access2base/Utils.xba +++ b/wizards/source/access2base/Utils.xba @@ -1,6 +1,11 @@ -Option Explicit +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Explicit Global _A2B_ As Variant diff --git a/wizards/source/access2base/_License.xba b/wizards/source/access2base/_License.xba index 8bcce9ea5f14..4fc58ca39958 100644 --- a/wizards/source/access2base/_License.xba +++ b/wizards/source/access2base/_License.xba @@ -1,10 +1,12 @@ ' Copyright 2012-2013 Jean-Pierre LEDURE -' -' The files in this directory are part of Access2Base, a part of the LibreOffice project. -' Documentation is available on http://www.access2base.com -' + +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + ' Access2Base is distributed in the hope that it will be useful, ' but WITHOUT ANY WARRANTY; without even the implied warranty of ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/wizards/source/access2base/acConstants.xba b/wizards/source/access2base/acConstants.xba index 5ebcbd231abe..7f5700c536ff 100644 --- a/wizards/source/access2base/acConstants.xba +++ b/wizards/source/access2base/acConstants.xba @@ -1,6 +1,11 @@ -Option Explicit +REM ======================================================================================================================= +REM === The Access2Base library is a part of the LibreOffice project. === +REM === Full documentation is available on http://www.access2base.com === +REM ======================================================================================================================= + +Option Explicit REM Access2Base ----------------------------------------------------- Global Const Access2Base_Version = "1.0.0" diff --git a/wizards/source/access2base/dlgTrace.xdl b/wizards/source/access2base/dlgTrace.xdl index b60558d6665a..749245078299 100644 --- a/wizards/source/access2base/dlgTrace.xdl +++ b/wizards/source/access2base/dlgTrace.xdl @@ -1,19 +1,20 @@ - + - + + - - + + - + - - - + + + @@ -27,6 +28,6 @@ - + \ No newline at end of file -- cgit