summaryrefslogtreecommitdiff
path: root/wizards
AgeCommit message (Collapse)Author
2024-10-15Fix typoAndrea Gelmini
Change-Id: I2d58d52d5f331ae9b3f3c4d3dc91d86c075c2a39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174968 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-10-15scriptforge.py Color args in exception.PythonShell()Jean-Pierre Ledure
The exception.PythonShell() method opens the APSO console. It receives 2 additional arguments background foreground which specify the back- and foreground colors of the window to open as a Python console. Typical use of the method: exc.PythonShell({**globals(), **locals()}, \ background = 0x0, foregound = 0xFFFFFF) opens the shell with all existing variables loaded and with white characters on a black background. The default values are those set in APSO: background = 0xFDF6E3 foreground = 0x657B83 No impact on existing scripts. The current change requires to be completed with the addition of the 2 arguments in the adequate help page. Additonal minor changes - typo in scriptforge.pyi - 'outsideprocess' replaced by 'remoteprocess' Change-Id: I9b1be123f049aa39bd0d814b6dd63fcc4f4ea310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174897 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2024-10-14scriptforge.py - clarify pipe modeJean-Pierre Ledure
Introduction of a ScriptForge.outsideprocess property: when True the actual mode is via socket or via pipe. The property is for internal use only. Once set it cannot be changed anymore. Previous statements similar to if ScriptForge.port > 0: which returned True when socket mode are replaced by a broader if ScriptForge.outsideprocess: No effect on user scripts. Change-Id: Ice0efd8c2ab9925511fc8c6889cab714fd208ba1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174874 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2024-10-07ScriptForge Fix tdf#163219 With blocksJean-Pierre Ledure
Reference: https://bugs.documentfoundation.org/show_bug.cgi?id=163219#c7 Everywhere the With block variable is defined or redefined inside the With block, the Basic code has been reviewed. Found in SFDatabases/SF_Database.xba/SetTransactionMode() SFDocuments/SF_Document.xba/Styles() ScriptForge/SF_Dictionary.xba/ImportFromPropertyValues() ScriptForge/SF_UI.xba/SetStatusBar() ScriptForge/SF_UI.xba/ShowProgressBar() Most changes consist in isolating the With block variable before the With block itself. No functional change. This solution is a workaround for the bug. IT DOES NOT SOLVE THE ROOT CAUSE. Change-Id: I48af29d3d9c8b1e36ef5a85c8cfe28f9639ae483 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174560 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-10-02scriptforge.pyi - TypoJean-Pierre Ledure
Change-Id: Ieff7ec790c457b1f4f67544d3f300fc68723d5aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174393 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-09-28cid#1607041 PA: Public AttributeCaolán McNamara
Change-Id: I8ec74e943232f98c861e035c0da11e8d75f8fa29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174106 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-27cid#1607206 PA: Public AttributeCaolán McNamara
Change-Id: Ic76b397921c97314005cd0e05646fc45b303ded8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-26cid#1607041 PA: Public AttributeCaolán McNamara
Change-Id: Iedea5a5e42fa311441a77ee4e18a1b3cbfdf0c44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173973 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-26cid#1607381 PA: Public AttributeCaolán McNamara
Change-Id: I44377535cabfd0c34a7f2b0815d779b17fbf8f53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173972 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-26cid#1608290 PA: Public AttributeCaolán McNamara
Change-Id: I710d0d90122f4b2a82084a32a98a3877b3fae5bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173971 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25cid#1607206 PA: Public AttributeCaolán McNamara
Change-Id: If140f3256a7e1afaae723147cb4870fa01b4e52e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173946 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25cid#1608290 PA: Public AttributeCaolán McNamara
Change-Id: I46bd84741d3958cb807df4f3080426fc2afdd6fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173945 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-25cid#1608090 PA: Public AttributeCaolán McNamara
Change-Id: I9bf9de822851bbf4f28614ae686e79a9c7438aac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173944 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25remove call to getCatalogSeparator where return is ignoredCaolán McNamara
since: commit 43cc8ad33e815522e2b23ac87a4a9c4526cd85c9 CommitDate: Mon Jan 5 08:23:29 2015 +0200 java: remove dead code Change-Id: Ib2b3e7a45ef1c9f1a7edf06ed6d474375bfe1c5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173943 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-25cid#1606775 PA: Public AttributeCaolán McNamara
Change-Id: Ie5034470b02310f329c041224ebf035769374e50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173942 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25cid#1606722 PA: Public AttributeCaolán McNamara
Change-Id: I23f518a7b492ae92417657f5a319eb1aae4dac3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173941 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-24cid#1606653 PA: Public AttributeCaolán McNamara
Change-Id: Iab539e41702f0decc071be13ef02c0fb14b11e63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173848 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-24cid#1606721 PA: Public AttributeCaolán McNamara
Change-Id: I62fbc3ee8fc05facb4c1542706c46266005c363f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173847 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-24cid#1606722 PA: Public AttributeCaolán McNamara
Change-Id: Icf37c5cc813ef80252f557d8896e163fe90e97b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173846 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-24cid#1607022 PA: Public AttributeCaolán McNamara
Change-Id: I0c0a107643b67395a2f4835aab70c58ca6edec9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173845 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-24cid#1607041 PA: Public AttributeCaolán McNamara
Change-Id: I991d0213a2f429a89e6b1431d9dc900400b60a96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173844 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-24cid#1607206 PA: Public AttributeCaolán McNamara
Change-Id: I70a2b4fbbde93f9ce839129441a17afe3d2059e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173843 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-24cid#1607381 PA: Public AttributeCaolán McNamara
Change-Id: I9aa852422a0ce3daa527599f9d3ed033b5943d04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173842 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-24cid#1607483 PA: Public AttributeCaolán McNamara
Change-Id: I4712b1523cc54feb3b84b5435960e4d5707735a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173841 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-24cid#1607639 PA: Public AttributeCaolán McNamara
Change-Id: I58d91c2d89b175dc8b8c062e1e291fe9c5192017 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173840 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-24cid#1608090 PA: Public AttributeCaolán McNamara
Change-Id: I8ea0d65e01affa7b2a7b787bebcf5bc2ca3b63f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173839 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-24cid#1608290 PA: Public AttributeCaolán McNamara
Change-Id: I3fe12f088e6bd2951a9dfdf62b156eb33a44750b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173838 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-23cid#1606721 PA: Public AttributeCaolán McNamara
Change-Id: I2d5c28e7fb220426b5a7c4881e35a4d269322883 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173778 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-22cid#1607483 PA: Public AttributeCaolán McNamara
Change-Id: Ib31c45ffb51db8ec7b3a8c8809b212515cee0437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173777 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-22cid#1608290 PA: Public AttributeCaolán McNamara
Change-Id: Id4afe36a78851205d79850800407966387cc43fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173776 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-20cid#1606721 PA: Public AttributeCaolán McNamara
Change-Id: I7f67264abf3ab6e52fe74c3e0bbac86a363b45c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173724 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-20cid#1606722 PA: Public AttributeCaolán McNamara
Change-Id: Ideb3c4523dc6210f56c978fdab52690a54b88d1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173723 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-20cid#1607041 PA: Public AttributeCaolán McNamara
Change-Id: I3e162e3b58f750b92c5939f3866fdcb8a148de99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173722 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-20cid#1607131 PA: Public AttributeCaolán McNamara
Change-Id: Ief73e86c6fa4459e25d98befa0dc383326f22a79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173721 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-20cid#1607206 PA: Public AttributeCaolán McNamara
Change-Id: I27a8247f0674c90ea16f896c1aba465aeeaa9992 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173720 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-20cid#1607639 PA: Public AttributeCaolán McNamara
Change-Id: Ie7a2e95cb46c0472692e91c57f0bbf4714a4a1e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173719 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-20cid#1608090 PA: Public AttributeCaolán McNamara
Change-Id: I9bd34262523a7eaa430824749adee6f3e326c59e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173718 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-20cid#1608290 PA: Public AttributeCaolán McNamara
Change-Id: Ifb9bedaaaf152c6c43454811b63bdf55a157cf2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173717 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-19cid#1608386 PA: Public AttributeCaolán McNamara
Change-Id: Ie82c097a6c3241a9ed3642ba4985acc77cdd7f1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173669 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-18cid#1608459 PA: Public AttributeCaolán McNamara
Change-Id: I6dccead2abe3062558a1b87c56c6efc14cf0fb19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173589 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-17scriptforge.py - improve debugging modeJean-Pierre Ledure
To facilitate the debugging of the ScriptForge Basic code called by the python scripts, 2 methods have been added to the ScriptForge() class: - initializeRoot(force = False) Initialize the global scriptforge data structure. - When force = False, only when not yet done. - When force = True, reinitialize it whatever its status. - errorHandling(standard = True) Determine how errors in the ScriptForge Basic code are handled. Either - the standard mode, i.e. display a "crash" message to the user - the debugging mode, i.e. the execution stops on the line causing the error Example (cfr. tdf#162962) from scriptforge import CreateScriptService, ScriptForge sf = ScriptForge() sf.errorHandling(False) def testSF(): srv = CreateScriptService("Calc") g_exportedScripts = (testSF,) Change-Id: I25d7d8e36e71d95ff8a04191bb8344794886d69e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173458 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-09-13scriptforge.py Connect via pipeJean-Pierre Ledure
Python scripts using ScriptForge start like: from scriptforge import CreateScriptService, \ ScriptForge ScriptForge(...) (*) sv = CreateScriptService(...) The (*) statement has next syntaxes: either (1) ScriptForge() (2) ScriptForge(host: str = ..., port: int = ...) (3) ScriptForge(pipe: str = ...) Syntax (1) is implicit at the first invocation of CreateScriptService() without a former call to ScriptForge() Syntax (2) exists in previous versions. This commit implements syntax (3) to connect a Python process to a LO process on the same system via a pipe mechanism. The change impacts only Python scripts. The documentation should be upgraded to include the new functionality. Change-Id: I50457b6fffc8c9d6a9ad5c5289de1c363c6680e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173252 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2024-09-09Fix typoAndrea Gelmini
Change-Id: I9e50718206fa2f139dca586688eb468667b28172 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173054 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-09-08ScriptForge (Dictionary) support case-sensitive keysJean-Pierre Ledure
To enhance the compatibility between - sf dictionaries - python dicts - arrays of PropertyValues it was necessary to propose the support of case-sensitive keys, i.e. keys are different if a case-sensitive comparison finds them different. So far only not case-sensitive keys were supported. This required a re-visit of the implementation of the ScriptForge.SF_Dictionary service. So far it was built upon a Basic Collection class which differentiates keys not case-sensitively. The new implementation uses sorted arrays. The invocation of the service is now: dict = CreateScriptService("Dictionary", True/False) True means case-sensitive keys. Default = False, which preserves the compatibility with the past. ScriptForge uses dictionaries internally in several places. For each of them it has been assessed if the new attribute was justified or not. For most of the contexts, it was. The functionality makes sense only for Basic user scripts. The documentation of the Dictionary page should be revised according to the new invocation syntax. Change-Id: If1f695bcbf1673a2b71c1e41487b1781caab71c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173044 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2024-09-08ScriptForge New IsAlive propertyJean-Pierre Ledure
When a document is closed inadvertently by the user during a macro run, or between two macros triggered by events, the actual behaviour is an error message and a stop of the execution of the macro. As this can be counter-productive, the macro may test at any moment if everything is ok with the IsAlive As Boolean (True = OK) property applied on next service instances: Document Base Calc FormDocument Writer Datasheet Dialog The functionality is available both for Basic and Python user scripts. The user documentation should be completed accordingly. Change-Id: I0b055dacc06c9da70c611dbb4e7bf841160168fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172970 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jean-Pierre Ledure <jp@ledure.be>
2024-09-05ScriptForge (Database) DMin, DMax return strings or datesJean-Pierre Ledure
Python only: Reset a flag in SF_Database.DMin and DMax methods to allow dates to be returned. Review typing hints to accept strings and dates Integration of remarks from Microsoft/VSCode about minor syntax issues in scriptforge.pyi (syntax was accepted by PyCharm). Now, syntax commonly accepted by both IDE's. Change-Id: I752d9f1d7a5293222d81748f8fb2e8f46f4317de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172912 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-09-04scriptforge.py - Platform & TextStreamJean-Pierre Ledure
Since https://gerrit.libreoffice.org/c/core/+/172600 a better categorization of properties has been done between 4 distinct levels. The SF_Platform and SF_TextStream services still needed an update to avoid redundancy on some of their properties. A choice had to be made, either: - put them in the serviceproperties dict - or define them explicitly with @Property Not both, for clarity. Change-Id: I787c7e57235622abf5deb5c7fd42c4c28aa82ec8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172863 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-09-04ScriptForge (scriptforge.py) fine tune getattr/setattr()Jean-Pierre Ledure
Several minor changes - comments - 'cls' used where relevant i.o. class name - dynamic getting/setting properties reviewed - SF_Platform properties: set level = 1 i.o. 0 when returned by PythonHelper module Change-Id: I4e9877bc16efd340dc14693833c032c998329b6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172836 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-09-01cid#1607081 PA: Public AttributeCaolán McNamara
Change-Id: I8b2e8bce03062ffe4c721ac3d3db64b6bd3f15eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172721 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-30scriptforge.py Improve properties performanceJean-Pierre Ledure
When considering next python user script: a = CreateScriptService(...) a.prop = ... print(a.prop) print(a.prop) so far, the evaluation of a.prop was done either once or twice depending on - a parameter of the class a is an instance of - the read-only status of prop (True/False) Now the recomputation of the expression depends on a parameter of prop which can take one of next values: 0: prop is read-only and not re-evaluated 1: prop is read-only but re-evaluated f.i. because a user action can change its value 2: prop is editable and not re-evaluated f.i. because it can be changed only by code 3: prop is editable and always re-evaluated The change will decrease the number of useless and more costly recomputations of properties. Change-Id: I11412a58772147dab2e6b9b06c31477135932603 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172600 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>