summaryrefslogtreecommitdiff
path: root/wizards
AgeCommit message (Collapse)Author
2023-03-01Fix typoAndrea Gelmini
Change-Id: I53e2a2f57ca1f00a07c62918e6e34c57a53fdcf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148022 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-01Fix typoAndrea Gelmini
Change-Id: I7a1302f472473171b31a4c2b21c9bfbfe1517904 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148020 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-01Fix typoAndrea Gelmini
Change-Id: Ib620227c38d27d3de1a774f9c3aebfbcc5edd0a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148021 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-02-28ScriptForge (SFWidgets) new Toolbar and ToolbarButton servicesJean-Pierre Ledure
Each component has its own set of toolbars, depending on the component type (Calc, Writer, Basic IDE, ...). In the context of the actual class, a toolbar is presumed defined statically: - either by the application - or by a customization done by the user. The definition of a toolbar can be stored in the application configuration files or in the current document. Changes made by scripts to toolbars stored in the application are persistent. They are valid for all documents of the same type. Note that the menubar and the statusbar are not considered toolbars in this context. A toolbar consists in a series of graphical controls to trigger actions. The "Toolbar" service gives access to the "ToolbarButton" service to manage the individual buttons belonging to the toolbar. The "Toolbar" service is triggered from next services: Document, Calc, Writer, Base, FormDocument and Datasheet. All those components might host toolbars. Proposed properties in the Toolbar service: BuiltIn Docked HasGlobalScope Name ResourceURL Visible (r/w) XUIElement Proposed method: ToolbarButtons() Proposed properties in the ToolbarButton service: Caption Height Index OnClick (r/w) Parent TipText (r/w) Visible (r/w) X Y (The Height, Width, X, Y properties allow for easy hook of a popup menu to tye button) Proposed method: Execute() Both services are available both from Basic and Python user scripts. An update of the dcumentation help is required. Change-Id: I43cb523b52e3d6362994557d74c4ef9faa220507 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147925 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2023-02-13Fix/simplify some vnd.sun.star.expand: handlingMike Kaganski
The vnd.sun.star.expand: payload must be URL-decoded prior to passing it to expandMacros; the protocol must be checked case-insensitively. Use startsWithIgnoreAsciiCase for that. Change-Id: I2be993a0400a27cb7dc57207cd0824b4505afd2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146855 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-27ScriptForge (SF_Document) Echo() method freezes screen updatesJean-Pierre Ledure
While a script is executed any display update resulting from that execution is done immediately. For performance reasons it might be an advantage to differ the display updates up to the end of the script. This is where pairs of Echo() methods to set and reset the removal of the immediate updates may be beneficial. Optionally the actual mouse pointer can be modified to the image of an hourglass. Arguments: EchoOn: when False, the display updates are suspended. Default = True. Multiple calls with EchoOn = False are harmless. Hourglass: when True, the mouse pointer is changed to an hourglass. Default = False. The mouse pointer needs to be inside the actual document's window. Note that it is very likely that at the least manual movement of the mouse, the operating system or the LibreOffice process will take back the control of the mouse icon and its usual behaviour. The method may be called from any document, including Calc and Writer, or form document. It may be invoked from Basic and Python user scripts. Echo() should be documented in the sfdocument.xhp help page. Change-Id: I4d669f5e332131bd1b2efcd33b7a98b304796ad1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146258 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2023-01-26ScriptForge (SF_Calc) more accurate commentsJean-Pierre Ledure
Impact only on comments, code left unchanged Change-Id: I5549f2549d2b9ff351ad6174b9dba458525db210 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146139 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2023-01-24ScriptForge (SF_Dialog) define constants as propertiesJean-Pierre Ledure
OKBUTTON and CANCELBUTTON are defined in the help as properties, both for Basic and Python user scripts. To make dialog.OKBUTTON valid in Basic, OKBUTTON should be defined either as (1) Public Const OKBUTTON = 1 or (2) Property Get OKBUTTON() Actually, it if a Private constant. <= wrong Choice is made to make it a full property (2). Python equivalent is OK, no change required. No impact on help documentation. Change-Id: Id4cf7dfbaff68fc8cc48a5c4779374ce1e7cc88b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146008 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2023-01-22ScriptForge (SF_Calc) fix typoJean-Pierre Ledure
Change-Id: I086d4f9f6490ecce773aef598049af07b5f852d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145978 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2023-01-22ScriptForge Upgrade version number to 7.6Jean-Pierre Ledure
Change-Id: Ifbf5ba5b28b7afff64ed36965eadfa68a750cfd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145976 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2023-01-21Fix typosAndrea Gelmini
Change-Id: Ie6dcedee4a1202f43feee99169172e2a3b1523b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145959 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-01-21ScriptForge (SF_Calc) new RemoveDuplicates() methodJean-Pierre Ledure
Remove duplicate values from a range of values. The comparison between rows is done on a subset of the columns in the range. The resulting range replaces the input range, in which, either: all duplicate rows are cleared from their content all duplicate rows are suppressed and rows below are pushed upwards. Anyway, the first copy of each set of duplicates is kept and the initial sequence is preserved. Arguments of the method: Range: the range, as a string, from which the duplicate rows should be removed Columns: an array of column numbers to compare; items are in the interval [1 .. range width] Default = the first column in the range Header: when True, the first row is a header row. Default = False. CaseSensitive: for string comparisons. Default = False. Mode: either "CLEAR" or "COMPACT" (Default) For large ranges, the "COMPACT" mode is probably significantly slower. The method has been implemented for Basic and Python user scripts. The calc.xhp help page should be updated accordingly. Change-Id: I352b2f3da98974d9482575850550cec4e27d2e01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145954 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2023-01-18ScriptForge - (SF_Calc) sort ranges on more than 3 keysJean-Pierre Ledure
The Calc.SortRange() method sorts the given range on any number of columns/rows. The sorting order may vary by column/row. The sorting algorithm allows for maximum 3 keys. When the number of sort keys is > 3 then the range is sorted several times, by groups of 3 keys, starting from the last key. In this context the algorithm used by Calc to sort ranges is presumed STABLE, i.e. it maintains the relative order of records with equal keys. Change-Id: If7f4920f7ab8f8ffb71edf648ed9accc8eb62dce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145681 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2023-01-17ScriptForge - (SF_Calc) fix CompactUp/CompactLeft methodsJean-Pierre Ledure
When - WholeRow/WholeColumn = False - no row or column matches the FilterFormula the cells below or at the right were erroneously shifted down or right. Future behaviour: - when nothing to compact, the initial range is left unchanged the return value = the initial range - when all rows/columns are impacted, the initial range is cleared the return value = zero-length string - otherwise the initial range is compacted the return value is the compacted range In either case, the surrounding cells are unchanged. Change-Id: I27288878dcadeb4ded297b7bb1e6897947ed5e56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145622 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2023-01-05Fix typoAndrea Gelmini
Change-Id: I963f340e0da9a0e7bc50bd1ee8c73f28c8edb6de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145101 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-01-05Fix typoAndrea Gelmini
Change-Id: I6a15118c9e0b686c7157a162990b7776362865f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145100 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-01-05ScriptForge - (SFDocuments) new FormDocument serviceJean-Pierre Ledure
The SF_FormDocument service is focused on : - The orchestration of Base form documents (aka Base Forms, but this is confusing) and the identification of and the access to their controls. - Form documents are always contained in a Base document. A form document may be opened either: - via code or user interface from the Base file welcome page - via code only, without having its Base container opened first In any mode, a form document can be opened only in 1 single copy. The FormDocument service is triggered either by base.OpenFormDocument(...) database.OpenFormDocument(...) ' Base file may be closed ui.GetDocument(...) Specific methods: CloseDocument() Forms() GetDatabase() PrintOut() Next methods are inherited from the Document superclass: Activate() CreateMenu(), RemoveMenu() ExportAsPdf() RunCommand() SaveCopyAs() SetPrinter() As a consequence, next methods remain available but should be declared as deprecated in the help: base.CloseFormDocument() base.Forms() base.PrintOut() base.SetPrinter() Above changes have several more minor impacts : - beside IsCalc, IsWriter, ... , a new IsFormDocument property - the UI service identifies open form documents - a new service means a new entry to register in the Services catalog - management of form events has been reviewed - the connection between Base, FormDocument, Form and Database services is reinforced - menus were available on components, now also on sub-components The new service is available for both Basic and Python user scripts. It requires in the help - a new sf_formdocument page - a review of the sf_base, sf_database, sf_form, sf_ui pages Change-Id: Ib06d1c4565ca093af2f068fa5b8082082641752e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145080 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-12-16ScriptForge - (SF_Datasheet) default values in GetText() and GetValue()Jean-Pierre Ledure
Before this commit, the 'column' argument was manadatory. Now the argument becomes optional and designates the current column, i.e. the column containing the cursor. Additionally, when a datasheet is closed by code, any filter is better removed to avoid eventual user misunderstandings when the datasheet is reopened manually during the same session. Change-Id: I904cfa56a9407539a89b7d2451dcf6b45292f660 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144242 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-12-15ScriptForge - (SF_Datasheet) minor changes in commentsJean-Pierre Ledure
No effect on code execution. Hence no cherry-picks to previous release(s). Change-Id: I724c05ee2807e2783655cbb8889a721a5a5e1b75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144224 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-12-13gb_var2file: remove now unused chunk-size parameterChristian Lohmaier
that parameter did specify how many entries of the list the workaround method could use to not exceed commandline length limits, so it was a guess of sorts and many places didn't actually bother with tweaking that value anyway and just used 100. the $(file …) function doesn't care about that, so the parameter was always ignored in that case. Change-Id: If89ec3a1968be297c0fe7c65336c5a965598f0c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143911 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-13SF_Dictionary: tdf#152351 Fix ReplaceItem does not accept array as valueJean-Pierre Ledure
Next basic code Dim myDict as Variant myDict = CreateScriptService("Dictionary") myDict.Add("key", Array()) myDict.ReplaceItem("key", Array(1, 2, 3)) produces an error message incriminating the user code. While it should run normally ... Fixed by enlarging the validation rules. Change-Id: I667abc81cb712308764c342d0e74b95821e46a5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144041 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-12-12PRODUCTNAME -> %PRODUCTNAMEJulien Nabet
Spotted thanks to: grep -nR PRODUCTNAME *|grep -v \%PRODUCTNAME|grep -v '${PRODUCTNAME}'|grep -v '\[PRODUCTNAME\]'|grep -v '\[FULLPRODUCTNAME\]' suggested in tdf#152265 UI: "tip of the day: placeholder "PRODUCTNAME" in text of the tip" Change-Id: I5292eeb1767404f2aa31f4b51b410a29afafcd6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143851 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-11-06ScriptForge - (SF_Datasheet) Filter, OrderBy propertiesJean-Pierre Ledure
For homogeneity with the Form service, the ApplyFilter() OrderBy() methods are replaced by the Filter OrderBy updatable properties respectively. Functionally there is no change. This substitution is valid both for Basic and Python user scripts. Change-Id: I63a1d5c4554437b6a2cd634677e6eee246cb59ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142355 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-11-05ScriptForge - (SF_Datasheet) new menu methodsJean-Pierre Ledure
Next 2 methods are added: CreateMenu() RemoveMenu() They allow the addition of a menu entry in the menubar of datasheets in the same way as in documents. The implementation required to make the SFWidgets.SF_Menu SFWidgets.SF_MenuListener SFWidgets.SF_Register classes and modules more generic to be applicable in several contexts. In addition, 2 properties are added: DatabaseFileName ParentDatabase to better identify the database from which the datasheet is derived. New properties and methods are applicable both for Basic and Python user scripts. Change-Id: Iac6318287e89b18810a53ec5928a68e921ea96db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142285 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-11-03Fix typo in codeAndrea Gelmini
Change-Id: I30dc89340942c1fc21a889e611b8a4510553476a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142169 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-11-03Fix typo in codeAndrea Gelmini
Change-Id: I3df6a2b0b6600d4d9e37723c902e03310aab22c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142171 Tested-by: Jenkins Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-11-03Fix typo in codeAndrea Gelmini
Change-Id: I3e4e076e8fc71d3999d5c58f05d34a866da3aa5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142168 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2022-11-02Fix typoAndrea Gelmini
Change-Id: Ic658024df51bd53cb704af7c006ee5300c0922cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142170 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-11-02Fix typoAndrea Gelmini
Change-Id: Icdd19c1165134867ed532c82a2663d1545c64739 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142174 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-11-02ScriptForge = (SFDatabases) New Datasheet serviceJean-Pierre Ledure
A datasheet is the visual representation of tabular data produced by a database. In the user interface of LibreOffice it is the result of the opening of a table or a query. In this case the concerned Base document must be open. In the context of ScriptForge, a datasheet may be opened automatically by script code : - either by reproducing the behaviour of the user interface - or at any moment. In this case the Base document does not need to be open. Additionally, any SELECT SQL statement may define the datasheet display. The proposed API allows for either datasheets (opened manually of by code) in particular to know which cell is selected and its content. Properties: ColumnHeaders CurrentColumn CurrentRow LastRow Source SourceType XComponent XControlModel XTabControllerModel Methods Activate ApplyFilter CloseDatasheet GetValue GetText GoToCell OrderBy The Base and Database services are enriched with the OpenTable OpenQuery methods. The Database service gets also a new OpenSql method. The whole set of properties and methods is available both for Basic and Python scripts. This new service requires a new help page dedicated to this service, as well as an update of the pages about the Base and Database services. Change-Id: Ib409ce74d95de78f2792ba53e7ae554eab0867ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142118 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2022-10-16ScriptForge - (SF_Basic) new CreateUnoStruct() methodJean-Pierre Ledure
The method extends the set of functions compatible with their corresponding Basic builtin functions. BTW it might avoid the need for the user to import uno in his/her Python scripts. Of course (s)he remains free to prefer the latter. Impact only on Python scripts. Basic part is unchanged. An update of the help page about the Basic service is reuired. Change-Id: I3b01eb76aa52f62fa54bae49ddb45755126bc3fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141429 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-10-14ScriptForge - (Dialogs) tdf#151510 fix CreateScriptService("dialog")Jean-Pierre Ledure
Bug description: Programmatic access to doc-based dialog is not possible using ScriptForge.Dialog service The relevant component was identified incorrectly in routine SFDialogs.SF_Register_NewDialog() Change-Id: I13f6302330ca097b8aef8fd3cdbd0b3d05a1b58c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141337 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-10-13Fix typoAndrea Gelmini
Change-Id: I4bfa53602b34d18ae9229aa8e110b85dfd160f94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141307 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-10-13Fix typoAndrea Gelmini
Change-Id: If62e035cf92f5fad359da9dd426f0975b1da6b23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141308 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-10-13Fix typoAndrea Gelmini
Change-Id: I4171730123186c8b057e6a05e382f253f81a0013 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141310 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-10-13Fix typoAndrea Gelmini
Change-Id: Ia4d7dd731e24c89c3228fdaf18cc0558a9c5ee66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141311 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-10-12ScriptForge - (SF_Dialog) new SetPageManager methodJean-Pierre Ledure
The SetPageManager() method Define how the dialog displays pages. The page manager is an alternative to the direct use of the Page property of the dialog and dialogcontrol objects. The arguments define which controls are involved in the orchestration of the displayed pages. Possible options: - select a value in a list- or combobox - select an item in a group of radio buttons - select a button linked to a page placed side-by-side the buttons can simulate a tabbed interface - press a NEXT or BACK button like in many wizards Those options may be combined. The control updates will be synchronized. The method will set the actual page number to 1. Afterwards the Page property may be used to display any other page The SetPageManager() method is to be run only once and before the Execute() statement. If invoked several times, subsequent calls will be ignored. The method will define new listeners on the concerned controls, addressing generic routines. The corresponding events will be fired during the dialog execution. Preset events (in the Basic IDE) will be preserved and executed immediately AFTER the page change. The listeners will be removed at dialog termination. The implementation has next parts: 1. Store the arguments in the Dialog instance 2. Set appropriate listeners on involved controls 3. Page change synchronizes the values in the involved controls (be it by user code or by page manager) 4. Events triggered by listeners change page number The method is available both in Basic and Python contexts. This commit require the Dialog help page to be updated. Change-Id: I00a0212414f283102c73de4ceb488aa1aeddf746 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141257 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-09-12ofz#1509303 DCN: Don't Catch NullPointer ExceptionCaolán McNamara
this is since: commit 8e63258a355d1b74fff89c39369e0ec72091e625 Date: Wed Jun 25 13:32:18 2008 +0000 INTEGRATION: CWS rptwizard01 (1.12.68); FILE MERGED 2008/05/21 10:14:32 lla 1.12.68.3: RESYNC: (1.12-1.13); FILE MERGED 2008/04/14 09:11:53 lla 1.12.68.2: #i86092# handle nullpointer, add TODO 2008/02/14 13:00:48 lla 1.12.68.1: #i86092# changes for new Report Wizard Change-Id: I6cb8938c311cf0432728ae06b08e16bffba39be3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139808 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-11ScriptForge - (scriptforge.py) ignore PythonShell in bridge modeJean-Pierre Ledure
Bridge mode = python dialogs with LO process via socket. Behaviour before actual patch: the exception.PythonShell() method gives a Python error on the from apso_utils import console statement, because the APSO libraries are not in the pythonpath. (They are set in the path by the exension in macro mode) New behaviour: the exception.PythonShell() method does nothing, the import statement is not executed, hence no error. The rationale behind is: - in bridge mode, the macro run is started in practice from either a Python console or an IDE console that receive evntual print() statements outputs - there is no need for an APSO console that, anyway, should not receive any output of print() statements, except if redirection of the output towards the APSO console (run in the [LO] process) was possible, quod non. - the same script may be executed in both bridge and macro modes without change Change-Id: Id7c8eb19cd074bf39f470d84b5eb48880e908f39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139772 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2022-08-30These commands are always URLs alreadyStephan Bergmann
Change-Id: I5083765c879689d7f933bbe00ad70bb68e635a21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139042 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-23ScriptForge - (SF_Document) fix Import/ExportFilters propertiesJean-Pierre Ledure
in the internal method _GetFilterNames(), in an array of PropertyValues, 2 indexes were hardcoded to optimize their access. The sequence of items has been changed in LO 7.4. The search of the correct Name-Value pairs is reviewed to make it independent of their position in the array. No impact on documentation. The function is of minor importance. Patch for LO 7.4 to make only if bug reported in bugzilla. Change-Id: I2d3147c9c7624bf79a4e077469223794dc2398bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138695 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-08-22ScriptForge - (SF_Calc) support of 16384 columns in a sheetJean-Pierre Ledure
Alignment with Calc support of 2^14 columns as from LO 7.4 instead of 2^10. Review of comments accordingly. Minor optimization of internal method _GetColumnName() More accurate control of boundaries in internal method _Offset() Change-Id: I590ae9a4fab0b90a6e9cc9bbacf6c1b582f9c6e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138666 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-08-20ScriptForge - (Calc) extend use cases of FilterFormulaJean-Pierre Ledure
A FilterFormula is a Calc formula that returns TRUE or FALSE The formula is expressed in terms of - the top-left cell of the range when FilterScope = "CELL" - the topmost row of the range when FilterScope = "ROW" - the leftmost column of the range when FilterScope = "COLUMN" After pasting, the relative and absolute references will be interpreted correctly. The FilterScope indicates the way the formula is applied, once by row, column or individual cell. The requested action is done only on the rows/columns/cells for which the FilterFormula returns True. Next methods receive 2 new arguments: => FilterFormula and FilterScope: ClearAll() ClearFormats() ClearValues() SetCellStyle() These changes are valid for Basic and Python user scripts. Without these new arguments above methods behave as before. The documentation needs to be adapted: - inclusion of FilterFormula and FilterScope concepts in the DEFINITIONS section of the SF_Calc help page - new arguments to add in resp. methods Change-Id: I657b231252106b91ed7e27a49ef3331c1fcee917 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138590 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-08-18Fix typoAndrea Gelmini
Change-Id: I6daee630eb433998711091780452dc0534398f79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138460 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-17Update SF translation to PortugueseRafael Lima
Change-Id: I96ae7fabb65e44e6d70f0c4048609f93aed8be1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137722 Tested-by: Jenkins Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
2022-08-17ScriptForge - (Calc) redesign CompactUp() and CompactLeft()Jean-Pierre Ledure
This commit is mainly about the introduction of a new internal method: _ComputeFilter(range, filterformula, filterscope) A FilterFormula is a Calc formula that returns TRUE or FALSE The formula is expressed in terms of - the top-left cell of the range when FilterScope = "CELL" - the topmost row of the range when FilterScope = "ROW" - the leftmost column of the range when FilterScope = "COLUMN" After pasting, the relative and absolute references will be interpreted correctly. The FilterScope indicates the way the formula is applied, once by row, column or individual cell. The concept of FilterFormula was already used by CompactUp() and CompactLeft(). Their implicit (Filter)scopes were resp. "ROW" and "COLUMN". The _ComputeFilter() method returns an array of subranges contained in the initial range that match the filter. The isolation the code for the management of filters applied on ranges makes the later use of the concepts of FilterFormula and FilterScope reusable for other methods. CompactUp() and CompactLeft() are functionally unchanged. No impact on documentation. Change-Id: I7c4e890b54f315486f29b5434a3c236167e2f9ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138368 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-08-02ScriptForge - tdf#150203 Use RANDBETWEEN.NV i.o. RANDBETWEENJean-Pierre Ledure
Extract of the bug report (Rafael Lima) This bug affects a method from the ScriptForge library, more specifically the GetTempName method from the FileSystem service, which relies on calling RANDBETWEEN. Because of this bug, GetTempName only works in English, but fails in other languages. Below is a sample code for testing the GetTempName error. Sub TestTempName GlobalScope.BasicLibraries.LoadLibrary("ScriptForge") fs = CreateScriptService("FileSystem") MsgBox fs.GetTempName() End sub Interestingly changing RANDBETWEEN for RANDBETWEEN.NV in the macro above will work. Occurrences of the use of RANDBETWEEN: wizards/source/scriptforge/SF_FileSystem.xba wizards/source/sfdocuments/SF_Calc.xba Change-Id: Iea38f11acb7113aa5eaab1feff7a0e64a739aada Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137691 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-07-23Related: tdf#150011 Add HRK Croatian Kuna to Euro conversion wizardEike Rathke
Maybe just for completeness, it's removed from menu but might be callable as macro. Change-Id: Iade0be845186d3deb2f00f4aaa230c0b344cea72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137372 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-07-21ScriptForge - tdf#149983 dialog.Execute() failureJean-Pierre Ledure
(patch https://gerrit.libreoffice.org/c/core/+/137084 cont'd) In SF_PythonHelper._PythonDispatcher(): Force a hardcoded call of the methods in the Dialog service which may potentially be invoked while the dialog is displayed, bypassing the generic CallByName() Basic builtin function: Activate Center EndExecute Resize Execute => was missing in the list Case when a parent dialog opens a child dialog (Controls is already hardcoded because returning an array) Change-Id: Ia12fccbb61362768301df6670161f258b32d3a78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137289 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2022-07-19ScriptForge - (SF_Dialog) trap errors caused by dialog eventsJean-Pierre Ledure
A dialog is started with the Execute() method. During its life span user scripts may be executed as a consequence of mouse clicks etc. When those scripts contain errors and they are not trapped; - in the actual situation, the error is detected by ScriptForge and considered as an internal error - this new commit considers the error as a user error. The help pages should be completed to promote the use of errors trapping inside scripts triggered by events. Change-Id: Iba3eefc75d305c17e6e1d9d416496882e0f816bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137203 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins