wizards/source/sfdialogs/SF_Dialog.xba |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit bc8c1d45ac91a1b3855eec8358260a8720d4c081
Author:     Jean-Pierre Ledure <j...@ledure.be>
AuthorDate: Mon Jan 23 15:35:47 2023 +0100
Commit:     Jean-Pierre Ledure <j...@ledure.be>
CommitDate: Tue Jan 24 14:25:01 2023 +0000

    ScriptForge (SF_Dialog) define constants as properties
    
    OKBUTTON and CANCELBUTTON are defined in the help
    as properties, both for Basic and Python user scripts.
    
    To make
      dialog.OKBUTTON
    valid in Basic, OKBUTTON should be defined either as (1)
      Public Const OKBUTTON = 1
    or (2)
      Property Get OKBUTTON()
    
    Actually, it if a Private constant. <= wrong
    
    Choice is made to make it a full property (2).
    
    Python equivalent is OK, no change required.
    
    No impact on help documentation.
    
    Change-Id: Id4cf7dfbaff68fc8cc48a5c4779374ce1e7cc88b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146008
    Tested-by: Jenkins
    Reviewed-by: Jean-Pierre Ledure <j...@ledure.be>

diff --git a/wizards/source/sfdialogs/SF_Dialog.xba 
b/wizards/source/sfdialogs/SF_Dialog.xba
index 507e5ac72c00..081584f56e81 100644
--- a/wizards/source/sfdialogs/SF_Dialog.xba
+++ b/wizards/source/sfdialogs/SF_Dialog.xba
@@ -99,8 +99,8 @@ Private _ControlCache         As Variant              &apos; 
Array of control objects sorted like E
 REM ============================================================ MODULE 
CONSTANTS
 
 &apos; Dialog usual buttons
-Private Const OKBUTTON                 = 1
-Private Const CANCELBUTTON             = 0
+Private Const cstOKBUTTON              = 1
+Private Const cstCANCELBUTTON  = 0
 
 &apos; Page management
 Private Const PILOTCONTROL             = 1
@@ -152,6 +152,11 @@ End Function       &apos;  SFDialogs.SF_Dialog Explicit 
Destructor
 
 REM ================================================================== 
PROPERTIES
 
+REM 
-----------------------------------------------------------------------------
+Property Get CANCELBUTTON() As Variant
+       CANCELBUTTON = cstCANCELBUTTON
+End Property   &apos;  SFDialogs.SF_Dialog.CANCELBUTTON (get)
+
 REM 
-----------------------------------------------------------------------------
 Property Get Caption() As Variant
 &apos;&apos;&apos;     The Caption property refers to the title of the dialog
@@ -188,6 +193,11 @@ Property Get Name() As String
        Name = _PropertyGet(&quot;Name&quot;)
 End Property   &apos;  SFDialogs.SF_Dialog.Name
 
+REM 
-----------------------------------------------------------------------------
+Property Get OKBUTTON() As Variant
+       OKBUTTON = cstOKBUTTON
+End Property   &apos;  SFDialogs.SF_Dialog.OKBUTTON (get)
+
 REM 
-----------------------------------------------------------------------------
 Property Get OnFocusGained() As Variant
 &apos;&apos;&apos;     Get the script associated with the OnFocusGained event

Reply via email to