summaryrefslogtreecommitdiff
path: root/wizards
AgeCommit message (Collapse)AuthorFilesLines
5 daysmakefile simplification: replace $(call gb_CustomTarget_get_workdir,foo)Christian Lohmaier4-7/+7
…by a simple/static $(gb_CustomTarget_workdir)/foo The build system has a lot of overly complicated leftovers from when it was introduced and had not only deal with split repositories but also had to coexist with another buildsystem. Along with lots of copy'n'paste along the years the makefiles became hard to grasp for newcomers with all our calls and evals. As a first step to streamline that, the macros from TargetLocations that simply prefix a static path to the argument (and similar of the same kind) are a natural pick before simplifying the rules themselves/getting rid of a bunch of eval statements. Change-Id: Ia06dbbcd5d1994755a2ff05b84f72ccbc4e3cab5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167005 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-03-28Revert "tdf#158803 remove some unused imports, unnecessary semicolons and ↵Noel Grandin7-9/+9
related styling" This reverts commit 9d4844374395ecce6b2ff4f9a71b3c8dae23050a. Reason for revert: fails in unit tests Change-Id: Icfaf6ab331ecce691b9a9462432e07c68d0fb40c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165417 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-28tdf#158803 remove some unused imports, unnecessary semicolons and related ↵LeSasse7-9/+9
styling Change-Id: Ie413ffd72b3d2f583d697ba89035d2a5d35bafe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165406 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-24ScriptForge (session).RunApplication() redesignJean-Pierre Ledure1-3/+23
The RunApplication() method uses - either the Shell() Basic built-in function (only in asynchronous mode) - or the com.sun.star.system.SystemShellExecute() service in this order. The second is tried in case of failure of the first one. Benefits: - the method can start batch files or scripts - broader than Shell(): giving a user file as argument opens its application first based on the file suffix - more robust error handling Read discussion in tdf#160222. This change could require a light revisit of the sf_session help page. Change-Id: I1fb4717db4b971bd62885ad0e38b7c08a8e6f434 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165218 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-22ScriptForge (session).RunApplication() crash fix tdf#160222Jean-Pierre Ledure1-1/+1
Use com.sun.star.system.SystemShellExecuteFlags.DEFAULTS i.o. com.sun.star.system.SystemShellExecuteFlags.URIS_ONLY as argument of com.sun.star.system.SystemShellExecute.execute() Change-Id: I3919777cf9442387aec6ed694a2883519e4a7910 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165105 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I67c1591af46b530c3cbf46b0871d863a5c0aec24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164907 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: Ie04b3b3a96b2d4651b6dc477215f29a48c1be4c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164901 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I1264c4594bbedf7398816552795e33c489ef2863 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164902 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-16Fix typoAndrea Gelmini1-2/+2
Change-Id: I8c5c281897c53afb456b63c5f3838059bd1887d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164912 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: Iac27e35e92ec8f481d0d6ba71c87f72e10a99ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164910 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I07c180c9b659950fa0ecc4bf8ca26f2d133a393c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164913 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I5bece7e286f8ebced0f5f45fff7377037b546a37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164918 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I0db6ac0b9edfd6953d668dd0949c692630665a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164915 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I3620d218898a91293d57611d4dcf062f75045892 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164897 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I0a68811af1f5b9d32f453592ec357fa694747d35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164909 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: Ibb07cca05ef733932326ceb29aa3fd1cd1e969d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164896 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: Id099d4e9471415d572f7eac56e70d20cbae8e577 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164906 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I42521b965da582e00e4fa9186bb5de3ea3defd4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164905 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I2e38b46435d927fe4fe8d656c92e7a75a5771ba1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164911 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I3f6f98e2781dd6ca37483ca4224b76f7b474a909 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164908 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I5b5182b56259808e7c4c351f24510806bf79c9fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164916 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I58ae1ae35bef53a79dfb60ac17b485e7e22a8d87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164900 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I6e332fc1366cf6cc20f7d4bbb546996bcfcfc6f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164919 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I5c2075d5c3e87fe5e4f56d884bf7bcfb7371498b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164917 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: Ib1f5fdc8c44c62619325f6d21d834459905fab44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164921 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I54dff81d7dffda684f3e39a5ebf1dda06959b9dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164920 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I965793a29a92eedb5555b541a22b5be0350c6b98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164923 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I493fece1547f15d1e428146928e34807a96636a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164914 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: Ic25c4b9fe4fe898de328f1ea98ef69983c66a7c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164904 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-16Fix typoAndrea Gelmini1-2/+2
Change-Id: I794f03ec9fe6cc7f1adfe790432a3e252da54b70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164903 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-16Fix typoAndrea Gelmini1-2/+2
Change-Id: I8c2e3dcfddd27aa7d32feb7a3c7923b411cdafa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164899 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-16Fix typoAndrea Gelmini1-1/+1
Change-Id: I26ad4b2cc6738087bb9cbae6eb5e852d7d520c05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164898 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-03-15ScriptForge - Python typing hintsJean-Pierre Ledure3-20/+7317
Python typing hints may be stored either - inside the original .py source file - in a separate .pyi source file (aka. STUB). Choice is made to create a new scriptforge.pyi file - to allow hiding the private functions - to specialize each module: technical doc vs. user doc - to allow potential later translation - to minimize the impact at run-time: stubs are active only during code edition. The new scriptforge.pyi module - provides the static type checking of all the public interfaces (methods/properties) of the ScriptForge API. - when the user uses an IDE like PyCharm or VSCode, (s)he might benefit from the typing hints provided by the signatures and docstrings stored in the module. Visually, while editing a user script: - hovering an object instance, a method or a property displays its detailed description - a "." after an object instance displays a drop-down box listing all available interfaces - brackets after a method-name start code-completion by displaying its arguments. Limitations: SF supports ProperCase, lowercase and camelCase naming for methods and properties. Only ProperCase is described in scriptforge.pyi. Extending to the other 2 notations would be easy but would also overload needlessly the drop-down lists. The effective code (scriptforge.py) is completed with a series of importable variable types, corresponding roughly with the available service instance names in uppercase. Example from scriptforge import CALC, RANGE def userfct(c: CALC, r: RANGE) -> RANGE: r1: RANGE = "A1:K10" Objective: enrich the signatures in user scripts and benefit from the same hints when the variable types cannot be derived from the context. The help documentation should be complemented with the actual additional feature. Change-Id: I6c39939a3cdbed94828e9449cd691fe15c24c923 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164867 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2024-01-13ScriptForge (SF_Array) fix tdf#158976 Shuffle()Jean-Pierre Ledure1-1/+1
The algorithm used to shuffle a 1D array prevented any item of the array to remain in the same entry after the shuffle. This has been fixed. The potential targeted entries to receive an item include the actual entry. This change might impact existing scripts that have Randomize()d their sorts to always get the same shuffle results. This should impact test scripts only. SF_Array.Shuffle() is available in Basic only. No impact on help pages. Change-Id: If56d901f4af68f8889a7352c306bae6e3443ae97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161987 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2023-12-29tdf#158803 Remove unused imports from wizardsBogdan B11-15/+9
Used pyflakes to find unused imports from wizards module. Then, removed those unused imports. Change-Id: I27f1c38871eafb57a5f914f4de3f825889b4ac68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142522 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-12-25ScriptForge - Upgrade to version 24.8Jean-Pierre Ledure10-13/+13
Copyright years are also reviewed to include 2024. Change-Id: I1f30443922a6dc3b35c6f05616a5c4e56de1e396 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161277 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2023-12-10Update Portuguese translation of ScriptForgeRafael Lima1-7/+96
Change-Id: Ic16b782d63e84581134f2238454aa9599819f146 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160359 Tested-by: Jenkins Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
2023-12-06ScriptForge (SF_Root) Fix typosJean-Pierre Ledure3-12/+8
Suppression of linefeeds in excess inside english error messages. Change-Id: I38189e7dcf9d24055e477a5cb6cfeb42644ded39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160385 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2023-12-01ScriptForge (SF_Dataset) fix GetRows() in chunksJean-Pierre Ledure2-4/+5
Two bugs are fixed with this commit: 1. when rows in a dataset are read in chunks, one record is skipped errorneously between every two successive chunks. 2. In updatable datasets, the updatable fields need to be identified. This is done at dataset creation. Before: the IsDefinitelyWritable criterion was used, valid for Firebird, not for HSQL After: the IsWritable criterion is used, valid for both. The correction in Basic is valid as well for Python. Documentation is unchanged. Change-Id: I990c02aaa8a93123a7e669b1294605fa19780167 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160163 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2023-11-26Fix typoAndrea Gelmini1-1/+1
Change-Id: I07a4d9fc05a49e17503d9fecd642bfe84466a408 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159956 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-24ScriptForge (SF_Database) manage transactionsJean-Pierre Ledure4-17/+337
Transactions are managed by next UNO properties: XConnection.AutoCommit XConnection.TransactionIsolation (They seem very easy to use but, in practice, are not easy at all) Usually all transactions are in auto-commit mode, that means, a commit takes place after each single SQL command. Switching auto-commit off means however that the connection needs to be of type "ISOLATED" and not of the default type "SHARED". => The usual shared connection must be closed. As a consequence, all rowsets/resultsets linked to the shared connection need to be closed as well. => Additionally the buffers must be emptied (flushed) to make committed data visible in the Base user interface. All above aspects and constraints are managed in the database.SetTransactionMode(transactionmode) database.Commit() database.Rollback() methods transparently for the user scripts. The [transactionmode] argument has as value one of the TransactionIsolation constants. Without argument, database.SetTransactionMode() restores the automatic mode. The manual transaction mode is available for both Basic and Python scripts. Its implementation will require an update of the documentation about the Database service. Change-Id: I214bd91a1744d6d24609bc5efc987152c6e946c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159867 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2023-11-13Fix typosAndrea Gelmini2-7/+7
Change-Id: I5f6ddc80fb13f7c0b1841cab034539e500353511 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159346 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-12ScriptForge (SFDatabases) fix dates processing in GetRowsJean-Pierre Ledure1-4/+15
The database.GetRows() dataset.GetRows() methods return an array of data collected in a database table or query. When a column has the type DATE, the transmission of their values through the Basic-Python bridge require them to be converted upfront to UNO DateTime structures. The later conversion from UNO DateTime to the python datetime.datetime structure has been added with this patch. No impact on Basic scripts. The documentation does not need to be changed. Change-Id: I7a6533aff70d2d1402bfc3f057b65a4940148cc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159348 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2023-11-11ScriptForge (SFDatabases) new Dataset serviceJean-Pierre Ledure11-44/+2066
A dataset represents a set of tabular data stored/produced by a database. To use datasets, the database instance must exist but the Base document may not be open. A Dataset instance is create either with - the (new) database.CreateDataset() method - from an existing dataset with the (new) dataset.CreateDataset() method. The proposed API supports next main purposes: - browse for- and backward thru the dataset to get its content - update any record with new values - create new records or delete some. In summary, the AKA "CRUD" operations (create, read, update, delete). The originality of the proposed API is the use of a dense syntax to make insertions and updates easy and readable: Example: (BASIC) Dim newID As Long newID = dataset.Insert("LastName", "Doe", "FirstName", "John") ' ... is equivalent to: Dim dict As Object, newID As Long Set dict = CreateScriptService("ScriptForge.Dictionary") dict.Add("LastName", "Doe") dict.Add("FirstName", "John") newID = dataset.Insert(dict) (PYTHON) - next statements are equivalent newid = dataset.Insert('LastName', 'Doe', 'FirstName', 'John') newid = dataset.Insert({'LastName': 'Doe', 'FirstName': 'John'}) newid = dataset.Insert(dict(LastName = 'Doe', FirstName = 'John')) newid = dataset.Insert(LastName = 'Doe', FirstName = 'John') You will notice that the returned value is the AutoValue primery key (when it exists) which makes it reuse as a foreign key immediate. The API is fully available both in Basic and Python user scripts. The new service will require its inclusion in the user documentation. Change-Id: I4f834c4234e5b96ec8fddfffbad791ecf31899df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159325 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2023-11-09enable unchecked lint for our java codeNoel Grandin1-0/+1
and annotate where necessary, mostly just suppressing the warnings Change-Id: I8e39d797cde6c7c3f4e3e1bd93a128965ecec81d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159205 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-02'new Character' is deprecated in JavaNoel Grandin1-1/+1
replace with Character.valueOf Change-Id: I9938db0fce6490eba6f4900efc3c139a1b71d120 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158786 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-02'new Double' is deprecated in JavaNoel Grandin4-13/+13
replace with Double.valueOf Change-Id: If5be8e500e31ebf9d5fb20ea7dd474677d7c74ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158785 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-02'new Float' is deprecated in JavaNoel Grandin3-3/+3
replace with Float.valueOf Change-Id: Ib6408b24dac2953789d0ec67e73b8be8aefca252 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158784 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-06Fix typosAndrea Gelmini1-4/+4
Change-Id: I70b570b74c793418ec6e045d454d20107675b9a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157601 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-10-06Fix typoAndrea Gelmini1-1/+1
Change-Id: I0ece1c462f3b493273cf70e32a78b718f0255ed7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157602 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>