summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorLibreOfficiant <LibreOfficiant@sfr.fr>2019-07-23 17:16:46 +0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2019-07-26 13:30:28 +0200
commit6880ed4b733994558cd6d906850624a6fdc94321 (patch)
tree1943719dd476c9110431f63f8e5f3b788782a55e /source
parentFormat some Basic UNO pages (diff)
downloadhelp-6880ed4b733994558cd6d906850624a6fdc94321.tar.gz
help-6880ed4b733994558cd6d906850624a6fdc94321.zip
Python dialog handler new topic
'Dialog Handler' new topic bunch of x-ref between pages make & toc OH: - fixed broken file path - fixed broken links Change-Id: I37e94fea48c394310298ff6f4b13f22c71c523c4 Reviewed-on: https://gerrit.libreoffice.org/76191 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'source')
-rw-r--r--source/auxiliary/sbasic.tree1
-rw-r--r--source/text/sbasic/guide/basic_examples.xhp2
-rw-r--r--source/text/sbasic/python/python_document_events.xhp4
-rw-r--r--source/text/sbasic/python/python_examples.xhp2
-rw-r--r--source/text/sbasic/python/python_handler.xhp168
-rw-r--r--source/text/sbasic/python/python_listener.xhp8
-rw-r--r--source/text/sbasic/shared/main0601.xhp2
7 files changed, 176 insertions, 11 deletions
diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree
index 308f10f997..a5eadb85ba 100644
--- a/source/auxiliary/sbasic.tree
+++ b/source/auxiliary/sbasic.tree
@@ -325,6 +325,7 @@
<topic id="sbasic/text/sbasic/shared/01020200.xhp">Using Objects</topic>
<topic id="sbasic/text/sbasic/shared/01030300.xhp">Debugging a Basic Program</topic>
<topic id="sbasic/text/sbasic/shared/01040000.xhp">Event-Driven Macros</topic>
+ <topic id="sbasic/text/sbasic/guide/basic_examples.xhp">%PRODUCTNAME Basic Programming Examples</topic>
<topic id="sbasic/text/sbasic/guide/access2base.xhp">Access2Base, the API for Base users</topic>
</node>
</node>
diff --git a/source/text/sbasic/guide/basic_examples.xhp b/source/text/sbasic/guide/basic_examples.xhp
index 888903b39e..c89999ece9 100644
--- a/source/text/sbasic/guide/basic_examples.xhp
+++ b/source/text/sbasic/guide/basic_examples.xhp
@@ -22,9 +22,9 @@
<h1 id="hd_id471559139063621"><variable id="basicexamplestit"><link href="text/sbasic/guide/basic_examples.xhp" name="Basic Programming Examples">Basic Programming Examples</link></variable></h1>
</section>
<!-- WIP
- <embed href="text/sbasic/python/python_dialog_handler#pythonhandler1"/>
<embed href="text/sbasic/python/python_from_basic.xhp#pythonfrombasic"/>
-->
+ <embed href="text/sbasic/python/python_handler.xhp#pythonhandler_h1"/>
<embed href="text/sbasic/python/python_listener.xhp#pythonlistener"/>
<embed href="text/sbasic/python/python_session.xhp#pythonsession"/>
<embed href="text/sbasic/python/python_platform.xhp#pythonplatform"/>
diff --git a/source/text/sbasic/python/python_document_events.xhp b/source/text/sbasic/python/python_document_events.xhp
index 49e7303d4d..34a3f5a5b1 100644
--- a/source/text/sbasic/python/python_document_events.xhp
+++ b/source/text/sbasic/python/python_document_events.xhp
@@ -267,9 +267,7 @@
<section id="relatedtopics" >
<embed href="text/sbasic/python/python_listener.xhp#pythonlistener"/>
<embed href="text/sbasic/python/python_import.xhp#pythonimporth1"/>
- <!--
- <embed href="text/sbasic/python/python_dialog_handler.xhp#pythonhandler1"/>
- -->
+ <embed href="text/sbasic/python/python_handler.xhp#pythonhandler_h1"/>
<embed href="text/sbasic/python/python_examples.xhp#pythonexamples2"/>
<embed href="text/sbasic/python/python_programming.xhp#pythonprogrammingheading"/>
<embed href="text/sbasic/python/python_2_basic.xhp#py2ba_h1"/>
diff --git a/source/text/sbasic/python/python_examples.xhp b/source/text/sbasic/python/python_examples.xhp
index 84330a6400..8878962d00 100644
--- a/source/text/sbasic/python/python_examples.xhp
+++ b/source/text/sbasic/python/python_examples.xhp
@@ -26,7 +26,6 @@
<h1 id="hd_id201901031407"><variable id="pythonexamples2"><link href="text/sbasic/python/python_examples.xhp" name="python examples">Python programming examples</link></variable></h1>
</section>
<!-- WIP
- <embed href="text/sbasic/python/python_dialog_handler#pythonhandler1"/>
<embed href="text/sbasic/python/python_from_basic.xhp#pythonfrombasic"/>
-->
<embed href="text/sbasic/python/python_session.xhp#pythonsession"/>
@@ -35,6 +34,7 @@
<embed href="text/sbasic/python/python_screen.xhp#ioscreen"/>
<embed href="text/sbasic/python/python_document_events.xhp#pythonmonitor"/>
<embed href="text/sbasic/python/python_dialogs.xhp#pythondialog"/>
+ <embed href="text/sbasic/python/python_handler.xhp#pythonhandler_h1"/>
<embed href="text/sbasic/python/python_listener.xhp#pythonlistener"/>
<embed href="text/sbasic/python/python_2_basic.xhp#py2ba_h1"/>
<section id="relatedtopics">
diff --git a/source/text/sbasic/python/python_handler.xhp b/source/text/sbasic/python/python_handler.xhp
new file mode 100644
index 0000000000..31b59f06cb
--- /dev/null
+++ b/source/text/sbasic/python/python_handler.xhp
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<helpdocument version="1.0">
+ <!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ -->
+ <meta>
+ <topic id="text/sbasic/python/python_handler">
+ <title id="tit" xml-lang="en-US">Creating A Dialog Handler</title>
+ <filename>/text/sbasic/python/python_handler.xhp</filename>
+ </topic>
+ </meta>
+ <body>
+ <bookmark branch="index" id="N0664">
+ <bookmark_value>Basic;Dialog Handler</bookmark_value>
+ <bookmark_value>Python;Dialog Handler</bookmark_value>
+ <bookmark_value>Access2Base;dlgTrace</bookmark_value>
+ <bookmark_value>Access2Base;_DumpToFile</bookmark_value>
+ <bookmark_value>API;DialogProvider2</bookmark_value>
+ <bookmark_value>API;XDialogEventHandler</bookmark_value>
+ </bookmark>
+ <h1 id="N0665"><variable id="pythonhandler_h1"><link href="text/sbasic/python/python_handler.xhp" name="Creating a Dialog Handler">Creating a Dialog Handler</link></variable></h1>
+ <paragraph role="paragraph" id="N0666">Next to <link href="text/sbasic/shared/01040000.xhp" name ="Assigning macros to events">assigning macros to events</link> or <link href="text/sbasic/basic/python/python_listener" name ="creating event listeners">creating event listeners</link>, one can use dialog handlers, whose principle is to define UNO keywords, or methods, that are mapped to events to watch for. The event handler is responsible for executing methods using the <literal>vnd.sun.star.UNO:&lt;method_name&gt;</literal> protocol. Unlike listeners that require to define all supported methods, even if unused, dialog handlers require only two methods on top of intended control hook scripts.</paragraph>
+ <paragraph role="paragraph" id="N0667">The advantages of this approach are:</paragraph>
+ <list type="unordered">
+ <listitem><paragraph role="listitem" id="N0668">It packs the code that handles event-driven macros,</paragraph></listitem>
+ <listitem><paragraph role="listitem" id="N0669">it decorrelates events from macros names which facilitates maintenance or updates, in particular when moving macros or modules.</paragraph></listitem>
+ </list>
+ <paragraph role="paragraph" id="N0670">This mechanism is illustrated herewith for Basic and Python languages using an imported copy of <literal>Access2Base</literal> <literal>dlgTrace</literal> dialog. Exception handling and localisation are omitted for clarity.</paragraph>
+ <h2 id="N0671">Assigning Dialog methods</h2>
+ <paragraph role="paragraph" id="N0672">Export <literal>Access2Base</literal> <literal>dlgTrace</literal> dialog and import it into <literal>MyLib</literal> application library.</paragraph>
+ <paragraph role="paragraph" id="N0673">Inside the control properties pane of the <link href="text/sbasic/guide/create_dialog.xhp" name ="Dialog Editor">Dialog Editor</link>, use the Events tab to replace macro assignments by component assignments, and type in the intended method names:</paragraph>
+ <list type="unordered">
+ <listitem><paragraph role="listitem" id="N0674">Set <literal>Dump to file</literal> dialog button component method name to <literal>_dump2File</literal></paragraph></listitem>
+ <listitem><paragraph role="listitem" id="N0675">Optionnally define <literal>txtTracelog</literal> key pressed and mouse button pressed events component method names as <literal>_openHelp</literal></paragraph></listitem>
+ <listitem><paragraph role="listitem" id="N0676">Optionnally define <literal>Ok</literal> button receiving focus event component method name as <literal>onOkHasfocus</literal></paragraph></listitem>
+ </list>
+ <paragraph role="paragraph" id="N0677">Events assigned actions should mention the <literal>vnd.sun.star.UNO:</literal> protocol.</paragraph>
+ <h2 id="N0678">Creating the handler</h2>
+ <paragraph role="paragraph" id="N0679"><literal>createDialogWithHandler</literal> method of <link href="https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1awt_1_1DialogProvider2.html" name ="com.sun.star.awt.DialogProvider2">com.sun.star.awt.DialogProvider2</link> service is used to set the dialog and its handler. The handler is responsible for implementing <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1awt_1_1XDialogEventHandler.html" name ="com.sun.star.awt.XDialogEventHandler">com.sun.star.awt.XDialogEventHandler</link> interface.</paragraph>
+ <warning id="N0680">All component method names must be explicitly declared when using a dialog handler.</warning>
+ <h3 id="N0681">With Python</h3>
+ <paragraph role="paragraph" id="N0682">In this example the dialog is located on the computer.</paragraph>
+ <pycode>
+ <paragraph role="pycode" localize="false" id="N0683"># -*- coding: utf-8 -*-</paragraph>
+ <paragraph role="pycode" localize="false" id="N0684">from __future__ import unicode_literals</paragraph>
+ <paragraph role="pycode" localize="false" id="N0685"> </paragraph>
+ <paragraph role="pycode" localize="false" id="N0686">import uno, unohelper</paragraph>
+ <paragraph role="pycode" localize="false" id="N0687">from com.sun.star.awt import XDialogEventHandler</paragraph>
+ <paragraph role="pycode" localize="false" id="N0688"> </paragraph>
+ <paragraph role="pycode" localize="false" id="N0689">_DLG_PROVIDER = &quot;com.sun.star.awt.DialogProvider2&quot;</paragraph>
+ <paragraph role="pycode" localize="false" id="N0690"> </paragraph>
+ <paragraph role="pycode" localize="false" id="N0691">class Console(unohelper.Base, XDialogEventHandler):</paragraph>
+ <paragraph role="pycode" xml-lang="en-US" id="N0692"> &quot;&quot;&quot; Access2Base Console Handler &quot;&quot;&quot;</paragraph>
+ <paragraph role="pycode" xml-lang="en-US" id="N0693"> &apos;&apos;&apos; adapted from « Créer un dialogue avec gestionnaire d&apos;événements » by JM Zambon</paragraph>
+ <paragraph role="pycode" localize="false" id="N0694"> https://wiki.openoffice.org/wiki/FR/Documentation/Python/Creating_Dialog_with_Handler &apos;&apos;&apos;</paragraph>
+ <paragraph role="pycode" localize="false" id="N0695"> def show(self):</paragraph>
+ <paragraph role="pycode" localize="false" id="N0696"> dialog = self.getDialog(&quot;MyLib.dlgTrace&quot;, embedded=True)</paragraph>
+ <paragraph role="pycode" localize="false" id="N0697"> dialog.Title = &quot;Konsole&quot;</paragraph>
+ <paragraph role="pycode" localize="false" id="N0698"> dialog.execute()</paragraph>
+ <paragraph role="pycode" localize="false" id="N0699"> </paragraph>
+ <paragraph role="pycode" localize="false" id="N0700"> def callHandlerMethod(self, dialog, event, method):</paragraph>
+ <paragraph role="pycode" localize="false" id="N0701"> if method == &apos;_dump2File&apos;:</paragraph>
+ <paragraph role="pycode" localize="false" id="N0702"> event.Source.setLabel(&quot;dump requested&quot;)</paragraph>
+ <paragraph role="pycode" localize="false" id="N0703"> scr = getBasicScript(script=&quot;_DumpToFile&quot;, module=&quot;Trace&quot;,</paragraph>
+ <paragraph role="pycode" localize="false" id="N0704"> library=&apos;Access2Base&apos;)</paragraph>
+ <paragraph role="pycode" localize="false" id="N0705"> scr.invoke((event,), (), ())</paragraph>
+ <paragraph role="pycode" localize="false" id="N0706"> elif method == &apos;_openHelp&apos;:</paragraph>
+ <paragraph role="pycode" localize="false" id="N0707"> _msgbox(&apos;Not yet implemented&apos;)</paragraph>
+ <paragraph role="pycode" localize="false" id="N0708"> dialog.endDialog(1)</paragraph>
+ <paragraph role="pycode" localize="false" id="N0709"> else:</paragraph>
+ <paragraph role="pycode" localize="false" id="N0710"> return False</paragraph>
+ <paragraph role="pycode" localize="false" id="N0711"> </paragraph>
+ <paragraph role="pycode" localize="false" id="N0712"> def getSupportedMethodNames(self):</paragraph>
+ <paragraph role="pycode" localize="false" id="N0713"> return (&apos;_dump2File&apos;, &apos;_openHelp&apos;)</paragraph>
+ <paragraph role="pycode" localize="false" id="N0714"> </paragraph>
+ <paragraph role="pycode" localize="false" id="N0715"> def getDialog(self, libr_dlg: str, embedded=False):</paragraph>
+ <paragraph role="pycode" xml-lang="en-US" id="N0716"> &quot;&quot;&quot; Create a Dialog from its location &quot;&quot;&quot;</paragraph>
+ <paragraph role="pycode" localize="false" id="N0717"> smgr = XSCRIPTCONTEXT.getComponentContext().ServiceManager</paragraph>
+ <paragraph role="pycode" localize="false" id="N0718"> if embedded:</paragraph>
+ <paragraph role="pycode" localize="false" id="N0719"> model = XSCRIPTCONTEXT.getDocument()</paragraph>
+ <paragraph role="pycode" localize="false" id="N0720"> dp = smgr.createInstanceWithArguments(_DLG_PROVIDER, (model,))</paragraph>
+ <paragraph role="pycode" localize="false" id="N0721"> location = &quot;?location=document&quot;</paragraph>
+ <paragraph role="pycode" localize="false" id="N0722"> else:</paragraph>
+ <paragraph role="pycode" localize="false" id="N0723"> dp = smgr.createInstanceWithContext(_DLG_PROVIDER, ctx)</paragraph>
+ <paragraph role="pycode" localize="false" id="N0724"> location = &quot;?location=application&quot;</paragraph>
+ <paragraph role="pycode" localize="false" id="N0725"> dlg = dp.createDialogWithHandler(&quot;vnd.sun.star.script:&quot;+libr_dlg+location, self)</paragraph>
+ <paragraph role="pycode" localize="false" id="N0726"> return dlg</paragraph>
+ <paragraph role="pycode" localize="false" id="N072A"> </paragraph>
+ <!-- WIP need extra work to embed remote code
+ <embed href="text/sbasic/python/Python_2_Basic.xhp#Python_getBasicScript" /> -->
+ <paragraph role="pycode" localize="false" id="N072B"># def getBasicScript() # see note</paragraph>
+ <paragraph role="pycode" localize="false" id="N0727"> </paragraph>
+ <paragraph role="pycode" localize="false" id="N0728">def _msgbox(prompt=&apos;&apos;, title=&apos;&apos;):</paragraph>
+ <paragraph role="pycode" xml-lang="en-US" id="N0729"> &apos;&apos;&apos; Ugly MsgBox &apos;&apos;&apos;</paragraph>
+ <paragraph role="pycode" localize="false" id="N0730"> import msgbox</paragraph>
+ <paragraph role="pycode" localize="false" id="N0731"> mb = msgbox.MsgBox(uno.getComponentContext())</paragraph>
+ <paragraph role="pycode" localize="false" id="N0732"> mb.addButton(&apos;Howdy&apos;)</paragraph>
+ <paragraph role="pycode" localize="false" id="N0733"> mb.show(prompt,0,title)</paragraph>
+ <paragraph role="pycode" localize="false" id="N0734"> </paragraph>
+ <paragraph role="pycode" localize="false" id="N0735">def ConsoleHandler():</paragraph>
+ <paragraph role="pycode" localize="false" id="N0736"> Console().show()</paragraph>
+ <paragraph role="pycode" localize="false" id="N0737"> </paragraph>
+ <paragraph role="pycode" localize="false" id="N0738">g_exportedScripts = (ConsoleHandler,)</paragraph>
+ <paragraph role="pycode" localize="false" id="N0739"> </paragraph>
+ </pycode>
+ <note id="N0740">As expected, <literal>onOkHasFocus</literal> missing method throws an exception.</note>
+ <tip id="N0741">Refer to <link href="text/sbasic/python/python_2_basic.xhp" name ="Python calls to %PRODUCTNAME Basic">Python calls to %PRODUCTNAME Basic</link> page for <literal>getBasicScript</literal> routine description and for details about cross-language scripting execution.</tip>
+ <h3 id="N0742">With %PRODUCTNAME Basic</h3>
+ <paragraph role="paragraph" id="N0743">In this example the dialog is embedded in a document, and can equally be located on the computer.</paragraph>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="N0744">&apos; &lt;MyLib&gt;.&lt;Handler&gt; module</paragraph>
+ <paragraph role="bascode" localize="false" id="N0745"> </paragraph>
+ <paragraph role="bascode" localize="false" id="N0746">Public Sub Console_Show()</paragraph>
+ <paragraph role="bascode" localize="false" id="N0747"> Dim dp as Object &apos; com.sun.star.awt.DialogProvider2</paragraph>
+ <paragraph role="bascode" localize="false" id="N0748"> Dim dialog As Object &apos; com.sun.star.awt.XDialog, com.sun.star.awt.XDialogEventHandler</paragraph>
+ <paragraph role="bascode" localize="false" id="N0749"> Dim eventHandler As Object &apos; com.sun.star.awt.XDialogEventHandler</paragraph>
+ <paragraph role="bascode" localize="false" id="N0750"> dp = CreateUnoService(&quot;com.sun.star.awt.DialogProvider2&quot;)</paragraph>
+ <paragraph role="bascode" xml-lang="en-US" id="N0751"> dp.Initialize(Array(ThisComponent)) &apos; if doc-embedded dialog</paragraph>
+ <paragraph role="bascode" localize="false" id="N0752"> eventHandler = CreateUnoListener(&quot;Console_&quot;, &quot;com.sun.star.awt.XDialogEventHandler&quot;)</paragraph>
+ <paragraph role="bascode" localize="false" id="N0753"> dialog = dp.createDialogWithHandler(&quot;vnd.sun.star.script:MyLib.dlgTrace?location=document&quot;, eventHandler)</paragraph>
+ <paragraph role="bascode" localize="false" id="N0754"> dialog.Title = &quot;Konsole&quot;</paragraph>
+ <paragraph role="bascode" localize="false" id="N0755"> dialog.execute()</paragraph>
+ <paragraph role="bascode" localize="false" id="N0756">End Sub &apos; &lt;Handler&gt;.Console_Show()</paragraph>
+ <paragraph role="bascode" localize="false" id="N0757"> </paragraph>
+ <paragraph role="bascode" localize="false" id="N0758a">Private Function Console_callHandlerMethod(dialog as Object, _</paragraph>
+ <paragraph role="bascode" localize="false" id="N0758b"> event As com.sun.star.document.DocumentEvent, _</paragraph>
+ <paragraph role="bascode" xml-lang="en-US" id="N0958c"> method As String) As Boolean</paragraph>
+ <paragraph role="bascode" localize="false" id="N0759"> &apos;&apos;&apos; Intercept dialog events using .UNO protocol &apos;&apos;&apos;</paragraph>
+ <paragraph role="bascode" localize="false" id="N0760"> Console_callHandlerMethod = True</paragraph>
+ <paragraph role="bascode" localize="false" id="N0761"> Select Case method</paragraph>
+ <paragraph role="bascode" localize="false" id="N0762"> Case &quot;_dump2File&quot;</paragraph>
+ <paragraph role="bascode" localize="false" id="N0763"> event.Source.setLabel(&quot;dump requested&quot;)</paragraph>
+ <paragraph role="bascode" localize="false" id="N0764"> With GlobalScope.BasicLibraries</paragraph>
+ <paragraph role="bascode" localize="false" id="N0765"> If Not .IsLibraryLoaded(&quot;Access2Base&quot;) Then .LoadLibrary(&quot;Access2Base&quot;)</paragraph>
+ <paragraph role="bascode" localize="false" id="N0766"> End With</paragraph>
+ <paragraph role="bascode" localize="false" id="N0767"> Access2Base.Trace._DumpToFile</paragraph>
+ <paragraph role="bascode" localize="false" id="N0768"> Case &quot;_openHelp&quot; </paragraph>
+ <paragraph role="bascode" localize="false" id="N0769"> MsgBox &quot;Not yet implemented&quot;,0 , &quot;Howdy&quot;</paragraph>
+ <paragraph role="bascode" xml-lang="en-US" id="N0770"> &apos;dialog.endDialog(1) if computer-based dialog</paragraph>
+ <paragraph role="bascode" localize="false" id="N0771"> Case Else : Console_callHandlerMethod = False</paragraph>
+ <paragraph role="bascode" localize="false" id="N0772"> End Select</paragraph>
+ <paragraph role="bascode" localize="false" id="N0773">End Function &apos; &lt;Handler&gt;.Console_callHandlerMethod</paragraph>
+ <paragraph role="bascode" localize="false" id="N0774"> </paragraph>
+ <paragraph role="bascode" localize="false" id="N0775">Private Function Console_getSupportedMethodNames()</paragraph>
+ <paragraph role="bascode" localize="false" id="N0776"> Console_getSupportedMethodNames = Array(&quot;_dump2File&quot;, &quot;_openHelp&quot;)</paragraph>
+ <paragraph role="bascode" localize="false" id="N0777">End Function &apos; &lt;Handler&gt;.Console _getSupportedMethodNames</paragraph>
+ <paragraph role="bascode" localize="false" id="N0778"> </paragraph>
+ <paragraph role="bascode" xml-lang="en-US" id="N0779">&apos; adapted from « Créer un dialogue avec gestionnaire d&apos;événements » by JM Zambon</paragraph>
+ <paragraph role="bascode" localize="false" id="N0780">&apos; https://wiki.openoffice.org/wiki/FR/Documentation/Python/Creating_Dialog_with_Handler</paragraph>
+ </bascode>
+ <note id="N0781">As expected, <literal>onOkHasFocus</literal> missing method throws an exception.</note>
+ <section id="relatedtopics" >
+ <embed href="text/sbasic/python/python_2_basic.xhp#py2ba_h1"/>
+ <embed href="text/sbasic/guide/show_dialog.xhp#show_dialog"/>
+ <paragraph role="paragraph" id="N0505"><link href="text/sbasic/shared/03132000.xhp" name ="CreateUnoListener Function">CreateUnoListener Function</link></paragraph>
+ <embed href="text/sbasic/python/python_listener.xhp#pythonlistener"/>
+ <embed href="text/sbasic/python/python_dialogs.xhp#pythondialog"/>
+ <embed href="text/sbasic/python/python_document_events.xhp#pythonmonitor"/>
+ <embed href="text/sbasic/python/python_examples.xhp#pythonexamples2"/>
+ <embed href="text/sbasic/python/main0000.xhp#pythonscriptshelp"/>
+ </section>
+ </body>
+</helpdocument>
diff --git a/source/text/sbasic/python/python_listener.xhp b/source/text/sbasic/python/python_listener.xhp
index e4359f08d3..c6cdd39f56 100644
--- a/source/text/sbasic/python/python_listener.xhp
+++ b/source/text/sbasic/python/python_listener.xhp
@@ -158,11 +158,9 @@
<paragraph role="paragraph" id="N0505"><link href="text/sbasic/shared/03132000.xhp" name ="CreateUnoListener Function">CreateUnoListener Function</link></paragraph>
<paragraph role="paragraph" id="N0506"><link href="text/swriter/01/05060700.xhp" name ="Events mapping to objects">Events mapping to objects</link></paragraph>
<paragraph role="paragraph" id="N0509">See also <link href="text/sbasic/shared/01040000.xhp" name ="Document events">Document events</link>, <link href="text/shared/02/01170202.xhp" name ="Form events">Form events</link>.</paragraph>
- <!-- WIP
- <embed href="text/sbasic/python/python_dialog_handler.xhp#pythonhandler1"/>
- -->
- <embed href="text/sbasic/python/python_document_events.xhp#pythonmonitor"/>
- <embed href="text/sbasic/python/python_examples.xhp#pythonexamples2"/>
+ <embed href="text/sbasic/python/python_handler.xhp#pythonhandler_h1"/>
+ <embed href="text/sbasic/python/python_document_events.xhp#pythonmonitor"/>
+ <embed href="text/sbasic/python/python_examples.xhp#pythonexamples2"/>
</section>
</body>
</helpdocument>
diff --git a/source/text/sbasic/shared/main0601.xhp b/source/text/sbasic/shared/main0601.xhp
index a93bdd268a..19bf5c3c1b 100644
--- a/source/text/sbasic/shared/main0601.xhp
+++ b/source/text/sbasic/shared/main0601.xhp
@@ -53,7 +53,7 @@
<h3 id="hd_id191548155077269">Working with Macros in Python</h3>
<embed href="text/sbasic/python/main0000.xhp#pythonscriptshelp"/>
-
+<embed href="text/sbasic/python/python_examples.xhp#pythonexamples2"/>
<paragraph role="heading" id="hd_id51528998827009" level="3" xml-lang="en-US">%PRODUCTNAME internal Basic macro libraries</paragraph>
<paragraph role="paragraph" id="par_id441528998842556" xml-lang="en-US">%PRODUCTNAME installs a set of Basic macro libraries that can be accessed from your Basic macros.</paragraph>