summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2023-01-23 15:35:47 +0100
committerJean-Pierre Ledure <jp@ledure.be>2023-01-24 14:25:01 +0000
commitbc8c1d45ac91a1b3855eec8358260a8720d4c081 (patch)
tree32ae7474059a67f14a1a23bb51c23da51377db83 /wizards
parenta771945f982a228e9076195bae5bdd0c8aaf60b3 (diff)
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 <jp@ledure.be>
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/sfdialogs/SF_Dialog.xba14
1 files changed, 12 insertions, 2 deletions
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
@@ -153,6 +153,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
Caption = _PropertyGet(&quot;Caption&quot;)
@@ -189,6 +194,11 @@ Property Get Name() As String
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
OnFocusGained = _PropertyGet(&quot;OnFocusGained&quot;)