From a8a0ba510bc1b5d73d5267e1b36a0e00f4117816 Mon Sep 17 00:00:00 2001 From: LibreOļ¬ƒciant Date: Sat, 25 May 2019 11:00:14 +0200 Subject: - Pages mutual x-Refs - Relate Tools help page to Basic Dialog page - Basic page title change - extra bookmark(s) - Basic code change - loadLibrary code change - loadDialog with full path (as best practice) Change-Id: Ia9a449b1dc8cb3a5acc7a921feeedebe7ce9cefb Reviewed-on: https://gerrit.libreoffice.org/72946 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- source/text/sbasic/guide/show_dialog.xhp | 24 ++++++++++++------------ source/text/sbasic/python/python_dialogs.xhp | 4 ++-- source/text/sbasic/shared/03/lib_tools.xhp | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/source/text/sbasic/guide/show_dialog.xhp b/source/text/sbasic/guide/show_dialog.xhp index ee65960625..f59a481b00 100644 --- a/source/text/sbasic/guide/show_dialog.xhp +++ b/source/text/sbasic/guide/show_dialog.xhp @@ -1,7 +1,4 @@ - - - - - - + -Opening a Dialog With Program Code +Opening a Dialog With Basic /text/sbasic/guide/show_dialog.xhp -module/dialog toggle -dialogs;using program code to show (example) -examples; showing a dialog using program code + + module/dialog toggle + dialogs;using Basic to show (example) + examples; showing a dialog with Basic + Tools;LoadDialog Opening a Dialog With Program Code In the %PRODUCTNAME BASIC window for a dialog that you created, leave the dialog editor by clicking the name tab of the Module that the dialog is assigned to. The name tab is at the bottom of the window. Enter the following code for a subroutine called Dialog1Show. In this example, the name of the dialog that you created is "Dialog1": Sub Dialog1Show - BasicLibraries.LoadLibrary("Tools") - oDialog1 = LoadDialog("Standard", "Dialog1") + With GlobalScope.Basiclibraries + If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools") + End With + oDialog1 = Tools.ModuleControls.LoadDialog("Standard", "Dialog1") oDialog1.Execute() End Sub @@ -56,6 +55,7 @@ + diff --git a/source/text/sbasic/python/python_dialogs.xhp b/source/text/sbasic/python/python_dialogs.xhp index 6989e48f30..7f728b4950 100644 --- a/source/text/sbasic/python/python_dialogs.xhp +++ b/source/text/sbasic/python/python_dialogs.xhp @@ -10,7 +10,7 @@ --> - Python: Opening a Dialog + Opening a Dialog with Python /text/sbasic/python/python_dialogs.xhp @@ -21,7 +21,7 @@ dialogs;Python
-

Opening a Dialog in Python

+

Opening a Dialog with Python

%PRODUCTNAME static dialogs are created with the Dialog editor and are stored in varying places according to their personal (My Macros), shared (%PRODUCTNAME Macros) or document-embedded nature. In reverse, dynamic dialogs are constructed at runtime, from Basic or Python scripts, or using any other %PRODUCTNAME supported language for that matter. Opening static dialogs with Python is illustrated herewith. Exception handling and internationalization are omitted for clarity.

My Macros or %PRODUCTNAME Macros dialogs

diff --git a/source/text/sbasic/shared/03/lib_tools.xhp b/source/text/sbasic/shared/03/lib_tools.xhp index dac54b1688..97a6935ae8 100644 --- a/source/text/sbasic/shared/03/lib_tools.xhp +++ b/source/text/sbasic/shared/03/lib_tools.xhp @@ -916,6 +916,7 @@ DialogName as String, Optional oLibContainer) + Refer to Opening a Dialog with Basic for an example of LoadDialog function. -- cgit