summaryrefslogtreecommitdiff
path: root/wizards/source/sfdialogs
AgeCommit message (Collapse)Author
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-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-06-17ScriptForge - Comments in code: pointers to help pagesJean-Pierre Ledure
Insert in each service module a pointer to the help page on https://help.libreoffice.org containing the user documentation of the given service. Example: SF_Array.xba contains a pointer to next help page https://help.libreoffice.org/latest/en-US/text/sbasic/shared/03/sf_array.html?DbPAR=BASIC Only addition of comments lines. No code change. Change-Id: I83899d9fab247d23e2d5123378e2fb3fd0ade60e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117370 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-04-27ScriptForge - (SFDialogs.SF_Register) DialogProviderJean-Pierre Ledure
When launching a dialog from a Python script while the dialog is contained in a document, the DialogProvider setup from that context was built by the wrong method. Use createInstanceWithArguments() i.o. createInstanceWithContext() This caused a LibreOffice crash. Change-Id: I3615c55068134085579662004f5bb085de008cbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114677 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-04-22Fix typosAndrea Gelmini
Change-Id: I83e1fb153601106d028641db3c9a636813b928e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114348 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-04-20ScriptForge - (scriptforge.py) Dialog and DialogControl classesJean-Pierre Ledure
New classes to manage Basic dialogs and their controls from Python. The use of UNO interfaces has been reviewed in Basic: replacement of CreateUnoDialog() by XDialogProvider.createDialog() The latter allows to run dialogs in non-modal mode. SF_UI.ShowProgressBar() and SF_Console() have been reviewed to incorporate the XSCRIPTCONTEXT shipped with Python Now the console and the progress bar are able to run in non-modal mode. Change-Id: I49b09aa41ee6f50e6d205f44fc329f91bce76beb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114296 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-02-08ScriptForge - (SF_DialogControl) Fix list of propertiesJean-Pierre Ledure
List was incomplete: trre control properties were missing Additionally, comments wre reread thanks to writing of help files Typos or approximations were reviewed Change-Id: I799011f27d89d93278027f5f3cf9853d3d2371cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110575 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-20ScriptForge - (SF_Form) manage cache entries for form instancesJean-Pierre Ledure
Event management of forms requires to being able to rebuild a Form object from its com.sun.star.form.XForm or com.sun.star.comp.forms.ODatabaseForm UNO instance For that purpose, the active forms are buffered in a global array of _FormCache types Change-Id: I004934f4b9d24ec035cc4adc798df1a2ac01d227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108047 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-09Fix typoAndrea Gelmini
Change-Id: I637cd4a9a074c1907f3547f69999dea13c8d9f4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107441 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-12-09ScriptForge - (SF_Dialog) Fix typoJean-Pierre Ledure
Change-Id: I04ef80a7aee2a3244fc1b69967e2a4e855fd4a72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107497 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-08ScriptForge: (SFDialogs) OnEvent properties are not editableJean-Pierre Ledure
The editable character of OnEvent properties is removed Structures in memory were updated correctly but without effect on behaviour of the dialog Feature is not essential NB OnNodeExpanded and OnNodeSelected remain editable: the mechanism is not via the Basic IDE and the functionality is correct Change-Id: If697120850efcc21ecf1f9004e2b64a5a69bf346 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107426 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-08ScriptForge - (SFDialogs) OnNodeSelected/Expanded for tree controlsJean-Pierre Ledure
OnNodeSelected and OnNodeExpanded cannot be defined thru the Basic IDE Those editable new properties are used to set up the relevant listeners on the control's view The listener Subs are garthered in a new module, SF_DialogListener The need to preserve these 2 properties required the existence of a cache of all control objects in the parent dialog instance This technique with listeners can be reused (mutatis mutandis) in other contexts to introduce additional event types Change-Id: I243808590e0534901e041a5f5abad64eb5e118d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107420 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-06ScriptForge - (SF_DialogControl) FindNode() for tree controlsJean-Pierre Ledure
FindNode() traverses a tree recursively and stops at the 1st node meeting either: - DisplayValue is like a given string pattern - DataValue is equal to a given scalar value The returned node can easily be made current The commit includes a check on the control type of all methods reserved for tree controls This has a minor impact on po files The version number of the po files is incremented Change-Id: I9f418df35bd4e58e0bfccc0606f5e0a5e7ac955e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107288 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-04ScriptForge: RootNode/CurrentNode for tree controlsJean-Pierre Ledure
RootNode returns the root node CurrentNode is for getting or setting a unique selected node Change-Id: Ie92761f57fe18b188769870ed7d2e0340a9e146c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107227 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-04Fix typoAndrea Gelmini
Change-Id: I26d4878c4e555c3760aec442d0a27b753ba2fc90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107184 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-03ScriptForge: AddSubNode/AddSubTree for tree controlsJean-Pierre Ledure
A new dialog control is is introduced: the tree control The proposed methods let create a root node and build a tree, either branch by branch or many branches at once when they are issued from a sorted array Change-Id: I4265fd6e413be383a7b6df3b9cd754d657066c19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107154 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-11-29ScriptForge - (SF_DialogControl) set OnEvent propertiesJean-Pierre Ledure
Applied on DialogControl class: Assign the triggered script as a string to the OnXxx properties or as a zero-length string to remove any trigger Check of control type is included Change-Id: I199fbfb565740f7ca4576c39bebf7dc9e4052289 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106807 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-11-28ScriptForge - (SF_DialogControl) get OnEvent propertiesJean-Pierre Ledure
Applied on DialogControl class: OnXxx properties return the triggered script as a string or a zero-length string when not defined Change-Id: I832f4f5ee0fcddfecd877bc710cce276bfb5b951 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106803 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-11-28ScriptForge - (SF_Dialog) set OnEvent propertiesJean-Pierre Ledure
Applied on Dialog class: Assign the triggered script as a string to the OnXxx properties or as a zero-length string to remove any trigger Change-Id: I91169a761ece7bf464f58bd3f3415d1b023c71a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106775 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-11-26ScriptForge - (SF_Dialog) get OnEvent propertiesJean-Pierre Ledure
Applied on Dialog class: OnXxx properties return the triggered script as a string or a zero-length string when not defined Change-Id: I85b6b80811e09f921f993c707002263235f70c9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106604 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-11-16ScriptForge: (dialog) Better manage default values of serviceJean-Pierre Ledure
When an argument is absent in a varying list of arguments, it is not missing, it is EMPTY Change-Id: Ib46a692292886739e69f38a9a12c6ea4a9922a41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105948 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-11-16ScriptForge: (dialog) fix when argument is ThisComponentJean-Pierre Ledure
Avoid "Object variable not set" Basic runtime error on line Set oLibraries = oComp.DialogLibraries when pvArgs(0) is a XComponent object Change-Id: Id35a492905c47d81ef02d433c98d83b4c81eafeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105921 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-11-06Fix typosAndrea Gelmini
Change-Id: Ie7b8ca46092cc151ee2ec50bfd00a7ad9930f783 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105402 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-11-05ScriptForge - SFDialogs libraryJean-Pierre Ledure
Additional "LibreOffice Macros & Dialogs" library Change-Id: I0bce9d8a19025e4184e847941a3c79f4a210b1ae