summaryrefslogtreecommitdiffstats
path: root/source/text/sbasic/shared/03132000.xhp
diff options
context:
space:
mode:
Diffstat (limited to 'source/text/sbasic/shared/03132000.xhp')
-rw-r--r--source/text/sbasic/shared/03132000.xhp22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/text/sbasic/shared/03132000.xhp b/source/text/sbasic/shared/03132000.xhp
index 7cbb593874..86aec48335 100644
--- a/source/text/sbasic/shared/03132000.xhp
+++ b/source/text/sbasic/shared/03132000.xhp
@@ -32,7 +32,7 @@
<bookmark_value>CreateUnoListener function</bookmark_value>
</bookmark>
-<h1 id="hd_id3155150" xml-lang="en-US"><variable id="CreateUnoListener"><link href="text/sbasic/shared/03132000.xhp" name="CreateUnoListener Function">CreateUnoListener Function</link></variable></h1>
+<h1 id="hd_id3155150" xml-lang="en-US"><variable id="CreateUnoListener"><link href="text/sbasic/shared/03132000.xhp">CreateUnoListener Function</link></variable></h1>
<paragraph id="par_id3149346" role="paragraph" xml-lang="en-US">Creates a Listener instance.</paragraph>
</section>
<paragraph id="par_id3153681" role="paragraph" xml-lang="en-US">Many Uno objects let you register listeners with dedicated listener interfaces. This allows to listen for specific events and call up the appropriate listener method. The <literal>CreateUnoListener</literal> function sets a listener interface associated to an UNO object. The listener interface is then bound to its associated object.</paragraph>
@@ -53,16 +53,16 @@
<paragraph id="par_idm1340546224" role="bascode" localize="false" xml-lang="en-US">oListener = CreateUnoListener( "ContListener_","com.sun.star.container.XContainerListener" )</paragraph>
</bascode>
<paragraph id="par_id3149294" role="paragraph" xml-lang="en-US">The <literal>CreateUnoListener</literal> method requires two parameters. The first is <emph>Prefix</emph> and is explained in detail below. <emph>Typename</emph> second parameter is the fully qualified name of the listener interface.</paragraph>
-<paragraph id="par_id3149670" role="paragraph" xml-lang="en-US">Every listener must be registered to %PRODUCTNAME broadcaster feature. This is performed by binding each listener to its associated object. Bind methods always follow the pattern '<literal>add</literal>Foo<literal>Listener</literal>', where 'Foo' is the object type of the listener interface, without the 'X'. In this example, the <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XContainer.html#a69e03a743cfa3e99935cac90b5f4e291" name="com.sun.star.container.XContainer"><literal>addContainerListener</literal></link> method is called to register the <literal>XContainerListener</literal>:</paragraph>
+<paragraph id="par_id3149670" role="paragraph" xml-lang="en-US">Every listener must be registered to %PRODUCTNAME broadcaster feature. This is performed by binding each listener to its associated object. Bind methods always follow the pattern '<literal>add</literal>Foo<literal>Listener</literal>', where 'Foo' is the object type of the listener interface, without the 'X'. In this example, the <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XContainer.html#a69e03a743cfa3e99935cac90b5f4e291"><literal>addContainerListener</literal></link> method is called to register the <literal>XContainerListener</literal>:</paragraph>
<bascode>
<paragraph id="par_idm1340540544" role="bascode" localize="false" xml-lang="en-US">Dim oLib As Object</paragraph>
<paragraph id="par_id3154940" role="bascode" xml-lang="en-US">oLib = BasicLibraries.Library1 ' Library1 must exist!</paragraph>
<paragraph id="par_id3150359" role="bascode" xml-lang="en-US">oLib.addContainerListener( oListener ) ' Register the listener</paragraph>
</bascode>
-<paragraph id="par_id3154138" role="paragraph" xml-lang="en-US">The listener is now registered. When an event occurs, the active listener calls the appropriate method defined in <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XContainerListener.html" name="XContainerListener interface">com.sun.star.container.XContainerListener</link> interface.</paragraph>
+<paragraph id="par_id3154138" role="paragraph" xml-lang="en-US">The listener is now registered. When an event occurs, the active listener calls the appropriate method defined in <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XContainerListener.html">com.sun.star.container.XContainerListener</link> interface.</paragraph>
<paragraph id="par_id3148922" role="paragraph" xml-lang="en-US">Event-driven registered BASIC subroutines require to use a defined <emph>Prefix</emph>. The BASIC run-time system searches for subroutines or functions that have the name 'Prefix+ListenerMethod' and calls them when found. Otherwise, a run-time error occurs.</paragraph>
-<paragraph id="par_id3150768" role="paragraph" xml-lang="en-US">In this example, <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XContainerListener-members.html" name="container.XContainerListener">com.sun.star.container.XContainerListener</link> interface defines the following methods:</paragraph>
+<paragraph id="par_id3150768" role="paragraph" xml-lang="en-US">In this example, <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XContainerListener-members.html">com.sun.star.container.XContainerListener</link> interface defines the following methods:</paragraph>
<table id="tab_id591666342054257">
<tablerow>
<tablecell>
@@ -77,7 +77,7 @@
<paragraph id="par_id11666342054257" role="tablecontent"><literal>disposing</literal></paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id841666342054257" role="tablecontent"><link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1lang_1_1XEventListener.html" name="lang.XEventListener">com.sun.star.lang.XEventListener</link> base interface for all Listener Interfaces</paragraph>
+ <paragraph id="par_id841666342054257" role="tablecontent"><link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1lang_1_1XEventListener.html">com.sun.star.lang.XEventListener</link> base interface for all Listener Interfaces</paragraph>
</tablecell>
</tablerow>
<tablerow>
@@ -85,7 +85,7 @@
<paragraph id="par_id11666342054258" role="tablecontent"><literal>elementInserted</literal></paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id841666342054258" role="tablecontent">Method of the <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XContainerListener-members.html" name="container.XContainerListener">com.sun.star.container.XContainerListener</link> interface</paragraph>
+ <paragraph id="par_id841666342054258" role="tablecontent">Method of the <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XContainerListener-members.html">com.sun.star.container.XContainerListener</link> interface</paragraph>
</tablecell>
</tablerow>
<tablerow>
@@ -93,7 +93,7 @@
<paragraph id="par_id11666342054259" role="tablecontent">elementRemoved</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id841666342054259" role="tablecontent">Method of the <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XContainerListener-members.html" name="container.XContainerListener">com.sun.star.container.XContainerListener</link> interface</paragraph>
+ <paragraph id="par_id841666342054259" role="tablecontent">Method of the <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XContainerListener-members.html">com.sun.star.container.XContainerListener</link> interface</paragraph>
</tablecell>
</tablerow>
<tablerow>
@@ -101,7 +101,7 @@
<paragraph id="par_id11666342054267" role="tablecontent">elementReplaced</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id841666342054267" role="tablecontent">Method of the <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XContainerListener-members.html" name="container.XContainerListener">com.sun.star.container.XContainerListener</link> interface</paragraph>
+ <paragraph id="par_id841666342054267" role="tablecontent">Method of the <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XContainerListener-members.html">com.sun.star.container.XContainerListener</link> interface</paragraph>
</tablecell>
</tablerow>
</table>
@@ -146,7 +146,7 @@
<paragraph id="par_idm1340658096" role="bascode" localize="false">End Sub</paragraph>
</bascode>
<warning id="par_id621666343214282" xml-lang="en-US">Listener methods must <emph>always</emph> be implemented to avoid BASIC run-time errors.</warning>
-<tip id="par_id101666620765251">Use <link href="text/sbasic/shared/03/sf_exception.xhp" name="ScriptForge"><literal>ScriptForge</literal></link> library console when the BASIC IDE is not easily accessible, that is during events processing. Use the <link href="text/sbasic/shared/03/sf_exception.xhp#DebugPrint" name="DebugPrint"><literal>DebugPrint</literal></link> method to add any relevant information to the console. Console entries can be dumped to a text file or visualized in a dialog window. Use <literal>Trace</literal> module of <link href="text/sbasic/guide/access2base.xhp" name="Access2Base library"><literal>Access2Base</literal></link> library as an alternative</tip>
+<tip id="par_id101666620765251">Use <link href="text/sbasic/shared/03/sf_exception.xhp"><literal>ScriptForge</literal></link> library console when the BASIC IDE is not easily accessible, that is during events processing. Use the <link href="text/sbasic/shared/03/sf_exception.xhp#DebugPrint"><literal>DebugPrint</literal></link> method to add any relevant information to the console. Console entries can be dumped to a text file or visualized in a dialog window. Use <literal>Trace</literal> module of <link href="text/sbasic/guide/access2base.xhp"><literal>Access2Base</literal></link> library as an alternative</tip>
<bascode>
<paragraph role="bascode" id="bas_id871666620966333">Sub SF_Trace</paragraph>
<paragraph role="bascode" id="bas_id361666620966645"> GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")</paragraph>
@@ -164,8 +164,8 @@
<section id="relatedtopics" >
<embed href="text/sbasic/python/python_listener.xhp#pythonlistener"/>
- <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>
+ <paragraph role="paragraph" id="N0506"><link href="text/swriter/01/05060700.xhp">Events mapping to objects</link></paragraph>
+ <paragraph role="paragraph" id="N0509">See also <link href="text/sbasic/shared/01040000.xhp">Document events</link>, <link href="text/shared/02/01170202.xhp">Form events</link>.</paragraph>
<embed href="text/sbasic/python/python_handler.xhp#pythonhandler_h1"/>
<embed href="text/sbasic/python/python_document_events.xhp#pythonmonitor"/>
</section>