From 993399c7c55d58bf084234713b07ac6ef8442b03 Mon Sep 17 00:00:00 2001 From: Alain Romedenne Date: Tue, 19 Oct 2021 18:49:06 +0200 Subject: Fixing L10N issues Change-Id: I45c83f083b861fbe594cb83a82b419aa51b29526 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/123786 Tested-by: Jenkins Reviewed-by: Rafael Lima --- source/text/sbasic/python/python_document_events.xhp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source') diff --git a/source/text/sbasic/python/python_document_events.xhp b/source/text/sbasic/python/python_document_events.xhp index 445d425e39..f0785b1f2e 100644 --- a/source/text/sbasic/python/python_document_events.xhp +++ b/source/text/sbasic/python/python_document_events.xhp @@ -45,7 +45,7 @@ Next to assigning macros to events, one can monitor events raised by %PRODUCTNAME documents. Application Programming Interface (API) broadcasters are responsible for calling event scripts. Unlike listeners that require to define all supported methods, even if unused, document monitors require only two methods next to hooked event scripts.

Monitoring Document Events

- Monitoring is illustrated herewith for Basic and Python languages using object-oriented programming. Assigning OnLoad script, to the Open Document event, suffices to initiate and terminate document event monitoring. Tools - Customize menu Events tab is used to assign either scripts. + Monitoring is illustrated herewith for Basic and Python languages using object-oriented programming. Assigning OnLoad script, to the Open Document event, suffices to initiate and terminate document event monitoring. Tools - Customize menu Events tab is used to assign either scripts. Intercepting events helps setting scripts pre- and post-conditions such as loading and unloading libraries or track script processing in the background. Access2Base.Trace module usage is illustrating that second context.

With Python

@@ -54,7 +54,7 @@ API;script.provider.XScript: Monitoring Document Event Events monitoring starts from object instantiation and ultimately stops when Python releases the object. Raised events are reported using Access2Base console. - OnLoad and OnUnload events can be used to respectively set and unset Python programs path. They are described as Open document and Document closed. + OnLoad and OnUnload events can be used to respectively set and unset Python programs path. They are described as Open document and Document closed. # -*- coding: utf-8 -*- from __future__ import unicode_literals @@ -117,7 +117,7 @@ Console.show() def OnLoad(*args): # 'Open Document' event - listener = UiDocument() # Initiates listening + listener = UiDocument() # Initiates listening def OnUnload(*args): # 'Document has been closed' event pass # (optional) performed when disposed @@ -152,7 +152,7 @@ @staticmethod def _a2bScript(script: str, library='Access2Base', module='Trace') -> XScript: - ''' Grab application-based Basic script ''' + ''' Grab application-based Basic script ''' sm = uno.getComponentContext().ServiceManager mspf = sm.createInstanceWithContext( "com.sun.star.script.provider.MasterScriptProviderFactory", @@ -163,7 +163,7 @@ return xScript Mind the misspelled documentEventOccured method that inherits a typo from %PRODUCTNAME Application Programming Interface (API). - Start application and Close application events can respectively be used to set and to unset Python path for user scripts or %PRODUCTNAME scripts. In a similar fashion, document based Python libraries or modules can be loaded and released using Open document and Document closed events. Refer to Importing Python Modules for more information. + Start application and Close application events can respectively be used to set and to unset Python path for user scripts or %PRODUCTNAME scripts. In a similar fashion, document based Python libraries or modules can be loaded and released using Open document and Document closed events. Refer to Importing Python Modules for more information.

With %PRODUCTNAME Basic

API;GlobalScope.BasicLibraries -- cgit