From 8667cb70fe8fe718b7cf2717bd765e944c2e6f1e Mon Sep 17 00:00:00 2001 From: Pierre F Date: Thu, 12 Sep 2024 09:51:13 +0200 Subject: misc. href typo (lines 65, 71) Change-Id: I324a475efd194feb4a80d846aa3b206144335ece Reviewed-on: https://gerrit.libreoffice.org/c/help/+/173181 Tested-by: Jenkins Reviewed-by: Alain Romedenne --- source/text/sbasic/shared/03/sf_dialog.xhp | 258 ++++++++++++++--------------- 1 file changed, 129 insertions(+), 129 deletions(-) (limited to 'source/text/sbasic/shared') diff --git a/source/text/sbasic/shared/03/sf_dialog.xhp b/source/text/sbasic/shared/03/sf_dialog.xhp index 1c6f0110de..58f6064542 100644 --- a/source/text/sbasic/shared/03/sf_dialog.xhp +++ b/source/text/sbasic/shared/03/sf_dialog.xhp @@ -10,31 +10,31 @@ --> - SFDialogs.Dialog service + SFDialogs.Dialog service /text/sbasic/shared/03/sf_dialog.xhp
- + Dialog service
-

SFDialogs.Dialog service

- The Dialog service contributes to the management of dialogs created with the Basic Dialog Editor or dialogs created on-the-fly. Each instance of the current class represents a single dialog box displayed to the user. +

SFDialogs.Dialog service

+ The Dialog service contributes to the management of dialogs created with the Basic Dialog Editor or dialogs created on-the-fly. Each instance of the current class represents a single dialog box displayed to the user.
- A dialog box can be displayed in modal or in non-modal modes. - In modal mode, the box is displayed and the execution of the macro process is suspended until one of the OK or Cancel buttons is pressed. In the meantime, user actions executed on the box can trigger specific actions. - In non-modal mode, the dialog box is "floating" on the user desktop and the execution of the macro process continues normally. A non-modal dialog closes when it is terminated with the Terminate() method or when the %PRODUCTNAME session ends. The window close button is inactive in non-modal dialogs. - A dialog box disappears from memory after its explicit termination. - The SFDialogs.Dialog service is closely related to the SFDialogs.DialogControl service. + A dialog box can be displayed in modal or in non-modal modes. + In modal mode, the box is displayed and the execution of the macro process is suspended until one of the OK or Cancel buttons is pressed. In the meantime, user actions executed on the box can trigger specific actions. + In non-modal mode, the dialog box is "floating" on the user desktop and the execution of the macro process continues normally. A non-modal dialog closes when it is terminated with the Terminate() method or when the %PRODUCTNAME session ends. The window close button is inactive in non-modal dialogs. + A dialog box disappears from memory after its explicit termination. + The SFDialogs.Dialog service is closely related to the SFDialogs.DialogControl service. -

Service invocation and usage

+

Service invocation and usage

Before using the Dialog service the ScriptForge library needs to be loaded or imported: - The Dialog service is invoked through the CreateScriptService method. It requires three supplemental positional arguments to specify the dialog box to activate: + The Dialog service is invoked through the CreateScriptService method. It requires three supplemental positional arguments to specify the dialog box to activate: Container: "GlobalScope" for preinstalled libraries or a window name as defined by ScriptForge.UI service. Empty string "" default value stands for the current document. Library: The case-sensitive name of a library contained in the container. Default value is "Standard". DialogName: A case-sensitive string designating the dialog. @@ -54,22 +54,22 @@ Or using Python: dlg = CreateScriptService('SFDialogs.Dialog', 'GlobalScope', 'ScriptForge', 'dlgConsole') - # ... controls initialization goes here... + # ... controls initialization goes here... rc = dlg.Execute() - # Default mode is Modal + # Default mode is Modal if rc == dlg.OKBUTTON: - # ... Process controls and do what is needed here + # ... Process controls and do what is needed here dlg.Terminate() Use the string "GlobalScope" as the container argument when the dialog is stored either in My Macros & Dialogs or in Application Macros & Dialogs. - The dialog service offers methods that create new controls dynamically in an existing dialog predefined with the Dialog Editor. A dialog is initialized with controls in the Dialog Editor and new controls can be added at run-time before or after the dialog Execute() statement. + The dialog service offers methods that create new controls dynamically in an existing dialog predefined with the Dialog Editor. A dialog is initialized with controls in the Dialog Editor and new controls can be added at run-time before or after the dialog Execute() statement. The Dialog service can equally be invoked - through the CreateScriptService method - when creating dialogs on-the-fly. It requires two supplemental positional arguments after the name of the ad-hoc service "NewDialog": DialogName: A case-sensitive string designating the dialog. Place: Window location of the dialog being either : - a Basic Array or Python tuple with 4 elements: (X, Y, width, height) - a com.sun.star.awt.Rectangle [X, Y, Width, Height] object + a Basic Array or Python tuple with 4 elements: (X, Y, width, height) + a com.sun.star.awt.Rectangle [X, Y, Width, Height] object All elements are expressed in Map AppFont units. @@ -82,13 +82,13 @@ Or using Python: def newDialog(): - dlg = CreateScriptService('NewDialog', 'myDialog1', (100,200, 40, 110)) - # ... Process controls and do what is needed + dlg = CreateScriptService('NewDialog', 'myDialog1', (100,200, 40, 110)) + # ... Process controls and do what is needed All properties and methods applicable to predefined dialogs are available for such new dialogs. In particular the series of CreateXXX() methods for the addition of new dialog controls.

Retrieving the Dialog instance that triggered a dialog event

- An instance of the Dialog service can be retrieved via the SFDialogs.DialogEvent service, provided that the dialog was initiated with the Dialog service. In the example below, oDlg contains the Dialog instance that triggered the dialog event. + An instance of the Dialog service can be retrieved via the SFDialogs.DialogEvent service, provided that the dialog was initiated with the Dialog service. In the example below, oDlg contains the Dialog instance that triggered the dialog event. Sub aDialogEventHander(ByRef poEvent As Object) Dim oDlg As Object @@ -102,7 +102,7 @@ dlg = CreateScriptService("SFDialogs.DialogEvent", event) # ... - Note that in the previous examples, the prefix "SFDialogs." may be omitted when deemed appropriate. + Note that in the previous examples, the prefix "SFDialogs." may be omitted when deemed appropriate.

Handling exceptions in event handlers

When creating an event handler for dialog events it is good practice to handle errors inside the subroutine itself. For instance, suppose the event handler below is called when the mouse button is pressed in the dialog window. @@ -130,21 +130,21 @@ bas.MsgBox(str(e)) -

Properties

+

Properties

- Name + Name - ReadOnly + ReadOnly - Type + Type - Description + Description @@ -152,13 +152,13 @@ OKBUTTON - Yes + Yes Integer - Value = 1. An OK button was pressed. + Value = 1. An OK button was pressed. @@ -166,13 +166,13 @@ CANCELBUTTON - Yes + Yes Integer - Value = 0. A Cancel button was pressed. + Value = 0. A Cancel button was pressed. @@ -180,13 +180,13 @@ Caption - No + No String - Specify the title of the dialog. + Specify the title of the dialog. @@ -194,13 +194,13 @@ Height - No + No Long - Specify the height of the dialog box. + Specify the height of the dialog box. @@ -208,13 +208,13 @@ Modal - Yes + Yes Boolean - Specifies if the dialog box is currently in execution in modal mode. + Specifies if the dialog box is currently in execution in modal mode. @@ -222,13 +222,13 @@ Name - Yes + Yes String - The name of the dialog + The name of the dialog @@ -236,13 +236,13 @@ Page - No + No Integer - A dialog may have several pages that can be traversed by the user step by step. The Page property of the Dialog object defines which page of the dialog is active. + A dialog may have several pages that can be traversed by the user step by step. The Page property of the Dialog object defines which page of the dialog is active. @@ -250,13 +250,13 @@ Visible - No + No Boolean - Specify if the dialog box is visible on the desktop. By default it is not visible until the Execute() method is run and visible afterwards. + Specify if the dialog box is visible on the desktop. By default it is not visible until the Execute() method is run and visible afterwards. @@ -264,16 +264,16 @@ XDialogModel - Yes + Yes - + API;UnoControlDialogModel - UNO
object
+ UNO
object
- The UNO object representing the dialog model. Refer to XControlModel and UnoControlDialogModel in Application Programming Interface (API) documentation for detailed information. + The UNO object representing the dialog model. Refer to XControlModel and UnoControlDialogModel in Application Programming Interface (API) documentation for detailed information.
@@ -281,16 +281,16 @@ XDialogView - Yes + Yes - + API;UnoControlDialog - UNO
object
+ UNO
object
- The UNO object representing the dialog view. Refer to XControl and UnoControlDialog in Application Programming Interface (API) documentation for detailed information. + The UNO object representing the dialog view. Refer to XControl and UnoControlDialog in Application Programming Interface (API) documentation for detailed information.
@@ -298,30 +298,30 @@ Width - No + No Long - Specify the width of the dialog box. + Specify the width of the dialog box.
-

Event properties

+

Event properties

- On… properties return a URI string with the reference to the script triggered by the event. On… properties can be set programmatically.
Read its specification in the scripting framework URI specification.
+ On… properties return a URI string with the reference to the script triggered by the event. On… properties can be set programmatically.
Read its specification in the scripting framework URI specification.
- Name + Name - Read/Write + Read/Write - Basic IDE Description + Basic IDE Description @@ -329,10 +329,10 @@ OnFocusGained - Yes + Yes - When receiving focus + When receiving focus @@ -340,10 +340,10 @@ OnFocusLost - Yes + Yes - When losing focus + When losing focus @@ -351,10 +351,10 @@ OnKeyPressed - Yes + Yes - Key pressed + Key pressed @@ -362,10 +362,10 @@ OnKeyReleased - Yes + Yes - Key released + Key released @@ -373,7 +373,7 @@ OnMouseDragged - Yes + Yes Mouse moved while key presses @@ -384,10 +384,10 @@ OnMouseEntered - Yes + Yes - Mouse inside + Mouse inside @@ -395,10 +395,10 @@ OnMouseExited - Yes + Yes - Mouse outside + Mouse outside @@ -406,10 +406,10 @@ OnMouseMoved - Yes + Yes - Mouse moved + Mouse moved @@ -417,10 +417,10 @@ OnMousePressed - Yes + Yes - Mouse button pressed + Mouse button pressed @@ -428,10 +428,10 @@ OnMouseReleased - Yes + Yes - Mouse button released + Mouse button released
@@ -443,7 +443,7 @@ - List of Methods in the Dialog Service + List of Methods in the Dialog Service @@ -502,12 +502,12 @@
Activate -------------------------------------------------------------------------------------------------------------------------- - + Dialog service;Activate

Activate

Set the focus on the current Dialog instance. Return True if focusing was successful. - This method is called from a dialog or control event, or when a dialog is displayed in non-modal mode. + This method is called from a dialog or control event, or when a dialog is displayed in non-modal mode. svc.Activate(): bool @@ -529,7 +529,7 @@
Center -------------------------------------------------------------------------------------------------------------------------- - + Dialog service;Center

Center

@@ -541,10 +541,10 @@ Parent: An optional object that can be either … - a ScriptForge dialog object + a ScriptForge dialog object - a ScriptForge document (Calc, Base, ...) object + a ScriptForge document (Calc, Base, ...) object @@ -552,8 +552,8 @@ Sub TriggerEvent(oEvent As Object) Dim oDialog1 As Object, oDialog2 As Object, lExec As Long - Set oDialog1 = CreateScriptService("DialogEvent", oEvent) ' The dialog that caused the event - Set oDialog2 = CreateScriptService("Dialog", ...) ' Open a second dialog + Set oDialog1 = CreateScriptService("DialogEvent", oEvent) ' The dialog that caused the event + Set oDialog2 = CreateScriptService("Dialog", ...) ' Open a second dialog oDialog2.Center(oDialog1) lExec = oDialog2.Execute() Select Case lExec @@ -563,8 +563,8 @@ def triggerEvent(event: uno): - dlg1 = CreateScriptService('DialogEvent.Dialog', event) # The dialog having caused the event - dlg2 = CreateScriptService('Dialog', ...) # Open a second dialog + dlg1 = CreateScriptService('DialogEvent.Dialog', event) # The dialog having caused the event + dlg2 = CreateScriptService('Dialog', ...) # Open a second dialog dlg2.Center(dlg1) rc = dlg2.Execute() if rc is False: @@ -574,7 +574,7 @@
CloneControl -------------------------------------------------------------------------------------------------------------------------- - + Dialog service;CloneControl

CloneControl

@@ -599,17 +599,17 @@
Controls -------------------------------------------------------------------------------------------------------------------------- - + Dialog service;Controls

Controls

Return either: - the list of the controls contained in the dialog + the list of the controls contained in the dialog - a DialogControl class instance based on its name + a DialogControl class instance based on its name @@ -633,7 +633,7 @@
CreateButton------------------------------------------------------------------------------------------------------------------------- - + Dialog service;CreateButton

CreateButton

@@ -645,8 +645,8 @@ ControlName: the name of the new control. It must not exist yet. Place: either … - a Basic Array or Python tuple with 4 elements: (X, Y, width, height) - a com.sun.star.awt.Rectangle [X, Y, Width, Height] object + a Basic Array or Python tuple with 4 elements: (X, Y, width, height) + a com.sun.star.awt.Rectangle [X, Y, Width, Height] object All elements are expressed in Map AppFont units.
@@ -669,7 +669,7 @@
CreateCheckBox ----------------------------------------------------------------------------------------- - + Dialog service;CreateCheckBox

CreateCheckBox

@@ -692,7 +692,7 @@
CreateComboBox ----------------------------------------------------------------------------------------- - + Dialog service;CreateComboBox

CreateComboBox

@@ -717,7 +717,7 @@
CreateCurrencyField ------------------------------------------------------------------------------------ - + Dialog service;CreateCurrencyField

CreateCurrencyField

@@ -745,7 +745,7 @@
CreateDateField ------------------------------------------------------------------------------------------------------------------------- - + Dialog service;CreateDateField

CreateDateField

@@ -771,7 +771,7 @@
CreateFileControl -----------------------------------------------------------------------------------------------------------------FileControl-- - + Dialog service;CreateFileControl

CreateFileControl

@@ -794,7 +794,7 @@
CreateFixedLine ------------------------------------------------------------------------------------------------------------------------- - + Dialog service;CreateFixedLine

CreateFixedLine

@@ -818,7 +818,7 @@
CreateFixedText ------------------------------------------------------------------------------------------------------------------------- - + Dialog service;CreateFixedText

CreateFixedText

@@ -844,7 +844,7 @@
CreateFormattedField ------------------------------------------------------------------------------------------------------------------------- - + Dialog service;CreateFormattedField

CreateFormattedField

@@ -870,7 +870,7 @@
CreateGroupBox ------------------------------------------------------------------------------------------------------------------------- - + Dialog service;CreateGroupBox

CreateGroupBox

@@ -892,7 +892,7 @@