summaryrefslogtreecommitdiff
path: root/wizards
AgeCommit message (Collapse)Author
2022-08-31These 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> (cherry picked from commit e61701e1ee6763de72b397e6ade1124eca9400f3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138980 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-12ScriptForge - tdf#149983 dialog.EndExecute() failureJean-Pierre Ledure
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 Controls EndExecute Execute (Controls is already hardcoded because returning an array) Patch on master: https://gerrit.libreoffice.org/c/core/+/137084 Patch on libreoffice-7-4: https://gerrit.libreoffice.org/c/core/+/137113 Change-Id: I1d2ef4d6e5d5e2863ac39ce646084cbd9265fe84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138093 Tested-by: Jenkins Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
2022-03-16ScriptForge - (SF_Form) fix use of BaseFormJean-Pierre Ledure
Context: Base documents. In a form or formcontrol event, a user script might need the name of the form document in which the form or control is located, f.i. to close it. The name of the form document is supposed to be found in the SF_Form.BaseForm property. The property is set correctly when the Base form document to form/formcontrol path is taken (top-down), not when the opposite path is taken (bottom-up), typically in events. In the latter case BaseForm is equal to an empty string. The actual commit initializes correctly the BaseForm property with the hierarchical name of the form document. Fix on master: https://gerrit.libreoffice.org/c/core/+/131618 Change-Id: I1fc98c87c8f72a6b92d456fa74395c7919ce284c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131649 Tested-by: Jenkins Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2022-02-10ScriptForge - (SF_Utils) review optional argument of _Repr()Jean-Pierre Ledure
As from LO 7.3, optional missing arguments must not be used in assignments and comparisons. The Basic interpreter tolerated it before 7.3. Probable commit having changed Basic behaviour: https://gerrit.libreoffice.org/c/core/+/121794 A unique case of this singularity was found in the SF_Utils._Repr() method. The bad consequence was that the commonly used SF_Exception.DebugPrint() method calls above method. This broke in fact the whole ScriptForge library. Equivalent commit on master: https://gerrit.libreoffice.org/c/core/+/129728 Change-Id: I6b1a8aa9cf8e534c645d1944e75de3b73d285e1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129771 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2022-02-05ScriptForge - (SF_Calc) fix range parsing error when leading $Jean-Pierre Ledure
When sheet name contains - a leading $ - surrounding single quotes an error message was errorneously displayed to the user. Corrected in the SF_Calc._ParseAddress() function Correction on master: https://git.libreoffice.org/core/+/de03a5ca23ddb09a55014f9d79ebcd6df54503bb%5E%21 Change-Id: I588c07132b9d98a3351f03e3e876ef81812d2f04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129426 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-11-27ScriptForge - (SF_Calc) fix ShiftXXX() methods with negative offsetJean-Pierre Ledure
Example: oCalc.ShiftDown("A10:D15", , -1) gives an "Object variable not set" Basic runtime error. Fixed by replacing 4x '= 0' by '<= 0' test in If statements checking the argument value. Change-Id: I272112a1addd303b7b38d3d9eb2ef73034e28727 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125939 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> (cherry picked from commit ec18e2545c752c2d33e16f23de6b2dfd6a04e0e7) Change-Id: I708f17fb5d646b1e159fbe47184f4abbd014863e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125899 Tested-by: Jenkins Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-11-25ScriptForge - (SF_Platform) fix Locale should return the OS localeJean-Pierre Ledure
So far it returned the LO locale. Discussed on Telegram Change-Id: I2cf66ca3acebe695354de9185e0698ffa4d8cf05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125820 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-11-18Fix typosAndrea Gelmini
Change-Id: Idd21ee0026d8a36653f0fb25b350dae37315f603 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125336 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-15ScriptForge - (SF_Calc) new OpenRangeSelector() methodJean-Pierre Ledure
The method activates the Calc document, opens a non-modal dialog with a text box, let the user make a selection in the current or another sheet and returns the selected area as a string. This method does not change the current selection. Arguments: Title: the title to display on the top of the dialog Selection: a default preselection as a String. When absent, the first element of the current selection is preselected. SingleCell: When True, only a single cell may be selected. Default = False CloseAfterSelect: When True (default-, the dialog is closed immediately after the selection. When False, the user may change his/her mind and must close the dialog manually. Returns: The selected range as a string, or the empty string when the user cancelled the request (close window button) Example: Dim sSelect As String, vValues As Variant sSelect = oDoc.OpenRangeSelector("Select a range ...") If sSelect = "" Then Exit Function vValues = oDoc.GetValue(sSelect) The implementation requires a new module: SF_DocumentListener.xba The method is available for Basic and Python user scripts. Change-Id: I2d67a9c900ea8ac661cd6b6fb43bb4a34e6abd8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125201 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-11-11ScriptForge - (SF_Calc) new Printf() methodJean-Pierre Ledure
Returns the input string after substitution of its tokens by their values in the given range This method is usually used in combination with SetFormula() The accepted tokens are: - %S The sheet name containing the range, including single quotes when necessary - %R1 The row number of the top-left part of the range - %C1 The column letter of the top-left part of the range - %R2 The row number of the bottom-right part of the range - %C2 The column letter of the bottom-right part of the range The default token character (%) may be modified. The method is available both for Basic and Python user scripts Change-Id: If9c3a042abf22ba760d1410b105b04716d092418 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125044 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-11-11ScriptForge - (SFWidgets) fix New PopupMenu without eventJean-Pierre Ledure
Invoking the service without an event object was supposed to work. For instance: Dim myPopup As Object Set myPopup = CreateScriptService("PopupMenu", , 300, 300) This would create the PopupMenu in position (300, 300) without an event object... however this does not work. Getting an error saying that "Event is EMPTY" => Add an IsEmpty() test. Change-Id: I86a1baf83264921088facbd35bf8fa299a5aa132 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125005 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-11-09ScriptForge - (SF_Calc) First/Last * Row/Column/Cell accept sheets and rangesJean-Pierre Ledure
The methods FirstCell FirstColumn FirstRow LastCell LastColumn LastRow SheetName accept uniformly either a sheet name or a range name. They return a single cell as an absolute address (First/LastCell), a String (SheetName) or a Long. The range name is to be understood as the extended notation for ranges. FirstCell/Column/Row accept sheet names. However they will then always return either the "A1" cell or the value 1. The LastCell/Column/Row return the real last xxx for ranges, and the last USED xxx when the argument is a sheet. The A1Style() method surrounds from now on sheet names with single quotes only when necessary. The GetRangeAddress() method has been dropped as redundant with the actual methods. (Was new in 7.3 => no effect on upward compatibiity) Change-Id: Iff1ce437ee27dfb8481361f648b3f7a33ae2c4b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124904 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-11-04ScriptForge - (SF_Calc) _ParseAddress() reuse last parsed addressJean-Pierre Ledure
Implementation to improve performance of a simple cache of the last already parsed range. The address is reused when the sheet name is explicit and that the range to parse, as a string, is identical to the previous parsing request. Change-Id: I0137689e9697686e76e07e037129983baba6ecfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124711 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-11-04ScriptForge - (SF_PopupMenu) Fix com.sun.star.awt.MenuItemStyle.AUTOCHECKJean-Pierre Ledure
To have checkboxes displayed correctly in KDE, it is necessary to use com.sun.star.awt.MenuItemStyle.CHECKABLE instead. No regression in behaviour observed so far in other environments. Change-Id: If15b2ff597f1cdffe2df65fe2352ffef0f770cb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124639 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-11-04Resolves: tdf#97046 ensure build system variables start with gb_Sabyasachi Bhoi
Change the variable name: var2file to gb_var2file Change-Id: Ib7d64b76cfe10e6c2df1a176674a360b28704070 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124666 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01Fix typoAndrea Gelmini
Change-Id: Ida6978ed843615504fac7ce0a0a6a08a66f10367 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124320 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-01ScriptForge - (SF_Calc) new GetRangeAddress() methodJean-Pierre Ledure
The GetRangeAddress() method accepts 2 arguments: GetRangeAddress(Range, AddressItem) - a range as a string, to be understood as the extended definition described in the help pages - the item to be extracted from the given range, either: firstrow firstcol lastrow lastcol sheet The returned value is either: - a Long - a String when sheet is requested - an array of all these values when no item is given The method is available for both Basic and Python user scripts Change-Id: I6156b176e29cf47207a079d10552443467dd2f6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124551 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-10-31ScriptForge - (SF_Calc) new ShiftDown, ShiftLeft, ShiftRight, ShiftUp methodsJean-Pierre Ledure
ShiftRight()/ShiftDown() insert empty cells at the left/on the top of a given range and move all cells at the right/bottom of the range accordingly. They are similar to the Insert Cells ... menu commands ShiftLeft()/ShiftUp() delete cells at the left/top of a given range and move all cells at the right/below the range accordingly. They are similar to the Delete Cells ... menu commands The insertion/deletion may be done for a whole column/row. The number of columns/rows to insert/delete may be chosen. All methods are available in Basic and Python user scripts. Change-Id: I14555a3966c26054925dd71b0696f3dfc773fc21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124530 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-10-28ScriptForge - (SF_Chart) fix Resize() method must return a BooleanJean-Pierre Ledure
Change-Id: I8acccd3036c8a08d6fd52b64623f2c9ab3ded5ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124323 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-10-28ScriptForge - (SF_Calc) new XSheetCellCursor propertyJean-Pierre Ledure
The XSheetCellCursor property requires one mandatory argument, a range as a string. It returns a UNO object of type com.sun.star.sheet.XSheetCellCursor. Such an object is designed to navigate thru the spreadsheet. After the user script has used one or more navigation verbs (gotoNext(), ...) the resulting range can be got back in the script by using the cursor.AbsoluteName UNO property. The new range can be given as input to further ScriptForge methods. XSheetCellCursor is available both from Basic and Python user scripts. Change-Id: I62fb18a6f496d81b01036aef2ca6733f07632d9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124280 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-10-27ScriptForge - (SF_Calc) new Region() propertyJean-Pierre Ledure
The Region() property expects one mandatory argument, a range given as a string. It returns a new range as a string, including the sheet name, corresponding with the smallest area - containing the input range - completely surrounded with empty cells It is complementary to Offset() and A1Style() to make easy the definition of new ranges relative to known ranges The property is available both in Basic and Python user scripts. Change-Id: Ifc9ce07b76e72fe580baf2c8103387cab56a6ef0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124230 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-10-25ScriptForge - (SF_Calc) new A1Style() methodJean-Pierre Ledure
Returns a range expressed in A1-style as defined by its coordinates If only one pair of coordinates is given, the range will embrace only a single cell Arguments: Row1 : the row number of the first coordinate Column1 : the column number of the first coordinates Row2 : optional, the row number of the second coordinate Column2 : optional, the column number of the second coordinates SheetName: Default = the current sheet. If present, the sheet must exist Is complementary to the Offset() method to compute ranges easily Available both from Basic and Python user scripts Change-Id: Ib9323441bbd579beb867329c8b0930653462d00e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124093 Tested-by: Jenkins Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-10-16Fix typoAndrea Gelmini
Change-Id: I66712db3b74e45728e3104c24823a962fd498037 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123677 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-16Fix typoAndrea Gelmini
Change-Id: I101231dc8daa99254a086bd635817e20c23a8ff4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123679 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-15ScriptForge - new SFWidgets library, new PopupMenu serviceJean-Pierre Ledure
The SFWidgets library is intended to host the Toolbar, ToolbarControl (both future) and PopupMenu services. A popup menu is usually triggered by a mouse action (typically a right-click) on a dialog, a form, or one of their controls. In these cases the menu will be displayed below the clicked area. When triggered by other events, including in the normal flow of a user script, the script should provide the coordinates of the topleft edge of the menu versus the actual component. The menu is described from top to bottom with next methods: AddItem() AddCheckBox() AddRadioButton() Example: .AddCheckBox("View>Toolbars>Dialog") .AddCheckBox("View>Toolbars>Find", Status := True) .AddCheckBox("View>Status Bar", Status := True) .AddItem("View>Full Screen", Name := "FULLSCREEN") The SubmenuCharacter (Default = ">") is modifiable. Each menu item receives a numeric and a string identifier. The execute() method returns the item selected by the user. The service is available both from Basic and Python user scripts. The commit includes the review of build files to include the new library and the new modules. Change-Id: I2940be25313cc8fff7b337766edd348b04a20584 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123654 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-10-02ScriptForge - (SF_Platform) increase speed of Fonts propertyJean-Pierre Ledure
Tests have proven that the use of a case sensitive search on long strings improves significantly the execution performance. The number of fonts being potentially huge (2-3K), the change in the InStr() Basic function of the Compare argument can divide the execution duration by factors in the range > 5. Change-Id: I248ff88cd2cb5a2753e7749f8d512ad44b5fc8d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122979 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-10-02tdf#141724 package qtz properties file as well, if presentAndras Timar
Change-Id: I7e7efdf6331f36c59d4632758492bcd342db70d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122965 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-09-28ScriptForge - (SF_Platform) new Fonts propertyJean-Pierre Ledure
The Fonts property returns the list of available fonts as an unsorted array of unique font names The size of the array being potentially huge, the choice has been made to not sort the list at each invocation of the property. To get it sorted, use the SF_Array.Sort() method. The property is available both from Basic and Python scripts. It is read-only. Change-Id: I49233d279dc7257d3b97e5a17be0bc8807f18d67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122780 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-09-12Typo: bIsSuccessfull->bIsSuccessfulJulien Nabet
Change-Id: Ib811f39fea5c0e78405f805f6c278b4b529b17d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121964 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-09-08Fix typosAndrea Gelmini
Change-Id: Ic3793bd77a7db52e59797cc6b2153850b1cec42e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121737 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-09-03ScriptForge - add AddTextsFromDialog and GetTextsFromL10N methodsJean-Pierre Ledure
The objective is to facilitate the automatic translation of all fixed texts in dialogs and dialog controls. Concerned items are: - the title of the dialog - the caption associated with next control types: Button, CheckBox, FixedLine, FixedText, GroupBox and RadioButton - the content of list- and comboboxes - the tip- or helptext displayed when the mouse is hovering the control ScriptForge.SF_L10N.AddTextsFromDialog(dialog) store all fixed texts of the dialog in the list of translatable strings of a L10N object to prepare a POT file SFDialogs.Dialog.GetTextsFromL10N(l10n) get the translated versions of all fixed texts in the dialog from a L10N object and apply them on the dialog before display Both methods are executable from Basic and Python user scripts Change-Id: I3dc9fbbce287d7af4040df713f9d11e0ff928b1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121514 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-08-28Fix typosAndrea Gelmini
Change-Id: Ie4e2ef5a884b51250863d3384d5e703232f31258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121179 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-08-27ScriptForge - (SF_DialogControl) add management of table controls in dialogsJean-Pierre Ledure
With the method SetTableData(), feed a tablecontrol with a sortable and selectable array of data. Columns and rows may receive a header. Column widths are adjusted manually by the user or with the same method. Alignments can be set as well by script. oControl.SetTableData(DataArray, Widths, Alignments) DataArray: the set of data to display in the table control, including optional column/row headers Is a 2D array in Basic, is a tuple of tuples inPython Widths: the column's relative widths as a 1D array, each element corresponding with a column. If the array is shorter than the number of columns, the last value is kept for the next columns. Example: Widths := Array(1, 2) means that the first column is half as wide as all the other columns. When the argument is absent, the columns are evenly spreaded over the control. Alignments: the column's horizontal alignment as a string with length = number of columns. Possible characters are: L(EFT), C(ENTER), R(IGHT) or space (default behaviour) Default: LEFT for strings, RIGHT for numbers Impact on existing properties: ListIndex, Value New properties: XGridColumnModel, XGridDataModel All properties and methods are available from user scripts written either in Basic or in Python. Change-Id: I70582cd0ba48ee3b9b9a292d8a47dbc1229b1fe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121148 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-08-19ScriptForge - (PDF Export) get/set options, export as PDF fileJean-Pierre Ledure
Next methods are introduced in SF_Session: - GetPDFExportOptions to extract a dictionary of the 40+ existing options for PDF export - SetPDFExportOptions to update the existing options When applied the options are permanent also for user manual exports Those methods are not available in Python. Next method to export a document to PDF: - ExportAsPDF: it uses the options set above and/or takes next specific and transitional options: pages, password, watermark This method is implemented for use from Basic and Python Change-Id: Ic5c4190cff579e62137930f422638aad98e61a16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120740 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-08-03Fix typo in codeAndrea Gelmini
Change-Id: I0ceb5910fec2dfd4ef5d360b47ae4e147eabec35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119931 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-08-03Fix typosAndrea Gelmini
Change-Id: Ie4809d5367d15dc155033db034d86aaa75cb5abe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119932 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2021-08-02ScriptForge - (SF_Chart) new service to manage Calc chartsJean-Pierre Ledure
New methods in the SF_Calc service: Charts(), to list charts or to instantiate a chart service CreateChart, to create a new chart in a given Calc sheet The SF_Chart service has next properties to parameter the type and the characteristics of the (new or pre-existing) chart ChartType, Deep, Dim3d, Exploded, Filled, Legend, Percent, Stacked, Title, XTitle, YTitle Next methods are available: Resize, to move and resize the chart shape ExportToFile, to export the chart as a graphical object Supported: gif, jpeg, png, svg and tiff New error messages in SF_Root and SF_Exception. Corresponding labels are integrated in the POT file Full support under Basic and Python Review of make file of the SFDocuments library Change-Id: Id8db3098ff24fbf2efcbdd9c6dcd4f02ff5972af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119824 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-07-23ScriptForge - Change copyright dates and namesJean-Pierre Ledure
Change-Id: Iac45dca972c294ed3772bcdcd0b3f05484ce912a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119418 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-07-22ScriptForge - (scriptforge.py/CreateScriptService) allow keyword argumentsJean-Pierre Ledure
For Python scripts only: the CreateScriptService() method accepts now both positional (as before) and keyword arguments. The impacted services are: - l10n - timer Done with the ReviewServiceArgs() class method that returns the input arguments as a tuple in the correct sequence. This method is inserted in each of the impacted service definitions. Implied a review of the creation of the L10N service to replace absent arguments by zero-length default arguments Change-Id: I3cc3b98847a395a2fd9f5e5bb15f45b398858b12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119359 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-07-14ScriptForge - (SF_Base) new CloseFormDocument() methodJean-Pierre Ledure
The closure of a form document is available from the SF_Form service. A form document is since recent commits associated with actions like PrintOut() that do not require to access its internal forms. As a consequence, the closure of a form document from the SF_Base service gains in relevance. Hence the actual commit. Change-Id: I9d4af078e6631d18c2d92c17249be6025ac9dfdd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118857 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-07-13ScriptForge - (SF_L10N) FIX return value of AddText()Jean-Pierre Ledure
Return value should be True when successful. Was erroneously False. Minor bug. No correction in 7.1 and 7.2 Change-Id: I71040f2ba8fec80297428b0ca317e9d67c79a25e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118815 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-07-13ScriptForge - (SFDocuments) new PrintOut() methodJean-Pierre Ledure
The PrintOut() method launches the printing of a LO document to a printer previously defined by default, by the user or by the SetPrinter() method. It is applicable on any document, on a Calc sheet, a Base form document. For a Writer document specific arguments may be provided. Implemented both for Basic and Python user scripts. Change-Id: I51ce897b66d3e5624cec97a46e5eb28d9132357a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118786 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-07-09ScriptForge - (SF_Document) new SetPrinter() methodJean-Pierre Ledure
The SetPrinter() method is applicable to any document type, except Base documents. It is also applicable to Base form documents with an additional "FormDocument" argument. Implemented in Basic and in Python. The method defines next printer settings: - the printer name - the orientation - the paper format The settings are kept per document or form document To bypass array management troubles in Basic, the SF_Utils._SetPropertyValue() Sub is converted to a Function. (no user scripts impact, only internal use). Change-Id: I39290d924646ff3b2a65a6d9282f1265ca7543b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118685 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-07-07ScriptForge - (SF_Writer) move Forms() method from SF_DocumentJean-Pierre Ledure
The Forms() method was placed in the SF_Document service but was applicable only on Writer documents Now it is placed correctly in the recently created Writer service. Effective in Basic and Python. Additionally redundant parentheses have been removed in scriptforge.py Change-Id: I0d328b40577ddf81a188fdf72611f84751bcb506 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118559 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-07-07ScriptForge - (SFDocuments) New SF_Writer serviceJean-Pierre Ledure
Addition of the skeleton of the new SF_Writer service as a subclass of SF_Document. Entry points in CreateScriptService are provided both for Basic and Python user scripts. Full compatibility with existing user scripts. Specific properties and methods will be provided in later commits. Change-Id: Ib00a9ea52023707d1429e8ad9dcb4dca2ca63174 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118515 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-07-02ScriptForge - (SF_Exception) new PythonPrint() methodJean-Pierre Ledure
Send from BASIC the arguments of the method to the Python shell (APSO) console. The same string is added to the ScriptForge debug console. From PYTHON use simply the builtin print() statement instead. Change-Id: Iac175b2f7c5773e0369361c3f26bbc33485848db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118225 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-07-01ScriptForge - Backdoor to alternate Python helper scriptJean-Pierre Ledure
While developing a new version of ScriptForgeHelper.py the dev should be sure to invoke the new version instead of the standard version shipped with its LO release. This can be done now by setting - in Python a specific ScriptForge class property ScriptForge.pythonhelpermodule2 = 'user#QA/ScriptForgeHelper.py' - in Basic a specific property of the root class _SF_.PythonHelper2 = "QA/ScriptForgeHelper.py" both in the test script Testing a new version of scriptforge.py can be configured entirely from the test script by inserting next statements import sys sys.path.reverse() sys.path.append('/home/jean-pierre/.config/libreoffice/4/user/Scripts/python/QA') sys.path.reverse() Change-Id: Iab6db518932e9dde9030b7e5bbe00a50dee31840 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118171 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-06-30Add Portuguese support to ScriptForge library (l10n)Rafael Lima
Change-Id: I04341059becb36467795a2aa1d5c2f573fe1bc6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118092 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-06-25ScriptForge - (SF_Platform) new Printers propertyJean-Pierre Ledure
The SF_Platform.Printers property returns the list of available printers as a zero-based array. The default printer is put in the 1st position of the list (index = [0]). The property is available in Basic and Python. Change-Id: I3f02b1b5e37aa9866491d9285683fc45d17fb664 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117776 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-06-22ScriptForge - (SF_UI) CreateBaseDocument() new CalcFileName argumentJean-Pierre Ledure
Syntax of CreateBaseDocument() becomes FileName, [EmbeddedDatabase=HSQLDB|FIREBIRD|CALC], [RegistrationName=""], [CalcFileName] Only when EmbedddedDatabase = "CALC", the new argument CalcFileName represents the file containing the tables as Calc sheets. The file must exist or an error is raised. Example: Dim myBase As Object, myCalcBase As Object Set myBase = ui.CreateBaseDocument("C:\Databases\MyBaseFile.odb", "FIREBIRD") Set myCalcBase = ui.CreateBaseDocument("C:\Databases\MyCalcBaseFile.odb", _ "CALC", , "C:\Databases\MyCalcFile.ods") Both Basic and Python are supported. Change-Id: I9912b110dcec12fe451a47abb61ab143fb543b94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117665 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>