summaryrefslogtreecommitdiff
path: root/wizards
AgeCommit message (Collapse)Author
2021-04-15ScriptForge - (SFDocuments) Fix SF_Base.OpenFormDocument()Jean-Pierre Ledure
When a Base form is: 1. opened with OpenFormDocument(), then closed 2. Opened manually in Edit mode, then closed 3. Reopened with OpenFormDocument() in normal mode - it again gets opened in Edit mode - its closure is not executed, neither by program nor manually The OpenFormDocument() method is simplified: the invoked loadComponent method may be executed even when the form is already open. It simply activates the form which is exactly the expected bahaviour. Additionally: - the opening mode is checked after the open and, if not matching the expected DesignMode argument, reset. - the alive check of a form (IsStillAlive()) does not require a database connection anymore Change-Id: I5f55e45b246867d19e514e0d820f164790dec300 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114092 Tested-by: Jenkins Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-04-11ScriptForge - (scriptforge.py) Database classJean-Pierre Ledure
New class to run from Python DDL + DML SQL commands on databases embedded in or connected to Base documents. GetRows() is hardcoded as an exception (cfr. bug #138155) in _PythonDispatcher() - SF_PythonHelper.xba to be able to return 2D arrays to Python. Fix returned empty arrays in the Basic-Python engine: the standard bridge ignores them and returns a null byte sequence instead of an empty tuple. Change-Id: I336ea0b585b759b998af0871d25bfd384a2e66ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113953 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-04-10ScriptForge - (scriptforge.py) FormControl classJean-Pierre Ledure
New class to manage controls in forms and subforms from Python, essentially thru the use of Properties Required a review of SF_FormControl.Getproperty() Indeed, the IDE debugger computes all the properties of a Basic object when expanded in the watch window. This can cause errors. This class makes use of default values for properties when irrelevant for the actual control type Error were detected on date/time conversions of date/timefield controls and corrected. SF_String etc shortcuts have been removed (see previous commit) because not applicable in every scenario. The only entry point to the API from a user Python script is via CreateScriptService(). Change-Id: Ia87c7281c3fcf39ab0c3528f00114c9b1e067bcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113920 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-04-08ScriptForge - (scriptforge.py) Base and Form classesJean-Pierre Ledure
Completion of the SFDocuments.SF_Base and addition of the SFDocuments.SF_Form classes Config of properties and methods Some methods require an hardcoded processing in _PythonDispatcher() - SF_PythonHelper.xba because they potentially may return arrays (cfr. bug #138155) Addition of SF_String etc shortcuts in Python for compatibility with Basic Change-Id: Id9852c214618e863b2fdf60aa5f80e36b3547a36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113739 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-04-08Fix typosAndrea Gelmini
Change-Id: I41f5c964a289a88b3f6fc637797fe77d17aaab38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113737 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-06Fix typosAndrea Gelmini
Change-Id: I64d32773984a3ab06e809fcaeff8f95b910e127b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113700 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-04-06ScriptForge - (scriptforge.py) Remove hardcoded method synonymsJean-Pierre Ledure
To make the access to services more close to Python habits and to better attract Basic users to Python, the convention for attributes naming has been defined as: - property names may be ProperCased, camelCased or lowercased - method names may be ProperCased, camelCased or lowercased Their arguments are always lowercased In documentation examples, the camelCased notation will be privileged Synonyms for properties and methods are computed with a generic function: SCriptForge.SetAttributeSynonyms() The generic getter and setter have been reviewed accordingly. Method synonyms are NOT HARDCODED anymore. Change-Id: I528820fe195d6b67e02035e589deee2b61c056ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113666 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-04-05Fix variable nameAndrea Gelmini
Change-Id: Ida5172f860303fa9493dd3477a970d29f87444de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113596 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2021-04-04ScriptForge (scriptforge.py) UI, Document & Calc classesJean-Pierre Ledure
Changes in the Basic-Python engine: - arguments of methods may be 2D arrays - 1st argument of method may be a Basic object - properties starting with 'X' may contain UNO objects - GetProperty may contain 1 argument Calc class is a subclass of the Document class in Python (in Basic it is simulated) A CalcReference class is also created to contain Range and Sheet objects Many comments have been reviewed for consistency in SF_Calc, SF_Form and SF_FormControl.xba Conversion to DataArrays is improved to process input arrays of arrays. Date conversions are supported. Change-Id: Id6254d668ec981b00555e7e277c4d31982c00092 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113568 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-03-26ScriptForge - (scriptforge.py) Session classJean-Pierre Ledure
Full support of the session class methods from Python The InvokeSimpleScript() python method has been extended to support broader scopes (extensions and user documents) and ParamArray arguments in Basic. Indeed the SF_Session.ExecuteBasicScript() and SF_Session.ExecuteCalcFunction() require a varying number of arguments. No regression found in unit tests Change-Id: I0899bc6535b00340ed82b46336d60a7bb23b2098 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113154 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-03-24ScriptForge - (scriptforge.py) String classJean-Pierre Ledure
Only a subset of the available methods is implemented: HashStr, IsADate, IsEmail, IsFileName, IsIBAN, IsIPv4, IsLike, IsSheetName, IsUrl, SplitNotQuoted, Wrap The other methods are better replaced by Python builtin functions. The flgDateArg flag has been introduced to distinguish a date argument passed as a string that does not require conversion from a date passed in iso-format that requires a conversion to a Basic variable of type Date Change-Id: I80f7e816dfeaee793862f3c3d35488da7c573c8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113002 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-20ScriptForge - (SF_String) Add new IsIBAN() methodJean-Pierre Ledure
SF_String.IsIBAN() returns True if the given string is a valid International Bank Account Number https: //en.wikipedia.org/wiki/International_Bank_Account_Number Change-Id: I7d1257c6a8f8728c523e578e9150fbffa424e5e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112815 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-03-18ScriptForge - (scritforge.py) SF_Basic: review of function signaturesJean-Pierre Ledure
The signatures of standard Basic built-in functions were derived from the Help documentation. They appeared to be inexact. They now comply with core/basic/source/runtime/stdobj.cxx Change-Id: I343fb553f5fad5236d75f6b72910714d47b6a289 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112669 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-03-17ScriptForge - (scriptforge.py) Array classJean-Pierre Ledure
The SF_Array (Basic) class is highly redundant with the Python tuple/list classes. Hence only 1 method is implemented in Python: ImportFromCSVFile() to have the same csv files imported identically in both environments. The returned value is a tuple of tuples. Restriction: dates are recognized but converted to their ISO format. Up to the user to interpret them correctly. Change-Id: I6611964a8083a9d7c6f9622b2aef64fe8b1491ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112585 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-03-16ScriptForge - (scriptforge.py) Exception classJean-Pierre Ledure
The SF_Exception class is not intended to replace or complement the builtin Python exception handling. Hence it implements only a subset of the corresponding Basic service. - no properties: they are fully related to Basic error trapping - next methods are available: Console, ConsoleClear, ConsoleToFile, DebugPrint and RaiseFatal (reserved for internal use) Restriction: Console() does not work in non-modal mode. DebugPrint formats its messages by using the repr() builtin method. DebugPrint outputs from Basic or from Python are mixed within the same console. The other methods call their Basic counterpart. A new method has been added both in Python and Basic: DebugDisplay It combines DebugPrint with a display in a message box of the arguments. Change-Id: Iba94ab951b95b409c881ac17560476d6e9bc2fc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112570 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-03-15ScriptForge - (scriptforge.py) Dictionary classJean-Pierre Ledure
The new SF_Dictionary class subclasses the dict native Python class and implements 2 methods: - ConvertToPropertyValues() - ImportFromPropertyValues() Usage: dico = dict(A = 1, B = 2, C = 3) myDict = CreateScriptService('Dictionary', dico) # Initialize myDict with the content of dico myDict['D'] = 4 print(myDict) # {'A': 1, 'B': 2, 'C': 3, 'D': 4} propval = myDict.ConvertToPropertyValues() or, alternatively: dico = dict(A = 1, B = 2, C = 3) myDict = CreateScriptService('Dictionary') # Initialize myDict as an empty dict object myDict.update(dico) # Load the values of dico into myDict myDict['D'] = 4 print(myDict) # {'A': 1, 'B': 2, 'C': 3, 'D': 4} propval = myDict.ConvertToPropertyValues() Change-Id: I932e899062c39f3fe8ab05dcf3cd02acf2f060a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112488 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-03-14Fix typosAndrea Gelmini
Change-Id: Ied3445430ffefbf27674f103c879a606909c9b3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112478 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-03-14ScriptForge - (scriptforge.py) enhance property and method namingJean-Pierre Ledure
To make the access to services more close to Python habits and to better attract Basic users to Python, the convention for attributes naming has been enhanced: - property names may be ProperCased, camelCased or lowercased - method names may be ProperCased, camelCased or lowercased Their arguments are always lowercased In documentation examples, the camelCased notation will be privileged Synonyms for properties are managed with generic functions. The generic getter and setter has been reviewed accordingly. Method synonyms are hardcoded. The management of synonyms for servicenames have also been reviewed to be defined in each class i.o. centrally and hardcoded in CreateScriptService() Change-Id: Id8d3181118b1e61937e2412109bd0d1eedd6f5e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112470 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-03-13ScriptForge - (scriptforge.py) Platform classJean-Pierre Ledure
Addition of SF_Platform class Most properties are provided by a direct call to ScriptForgeHelper.py Others result from an interaction with the Basic-Python machinery Addition of STarDesktop() method in the SF_Basic class Change-Id: If1c03fe8e0ad36b6a665c8c44b477eca7cbc24bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112393 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-03-10ScriptForge - (scriptforge.py) L10N classJean-Pierre Ledure
Addition of SF_L10N class Correction in Languages() property: selection of file based on *.po filter i.o. ??-??.po Change-Id: I5c57d1973265f2aeb7a3cfb4f507ffd50a28785a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112211 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-03-09ScriptForge - (scriptforge.py) FileSystem and TextStream classesJean-Pierre Ledure
Addition of SF_FileSystem and SF_TextStream classes Machinery tuning: - freeze a predefined list of standard modules in the python persistent storage - error management reviewed to mimic Basic behaviour on wrong arguments Standard modules are predefined in scriptforge.py as well Both lists must be synchronized on a hardcoded entry number Basic has minor revisions: - complex boolean expressions return -1 and 0 to Python i.o. True and False => Add a CBool() function - [User]TemplatesFolder properties of FileSystem omitted the final "/" Change-Id: Ice138de956f5f87269557cdb3db023849081b99d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112199 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-03-07Fix typosAndrea Gelmini
Change-Id: I0a6b74356bd689b54883efc4608a06fb9446e828 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112024 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Tested-by: Jean-Pierre Ledure <jp@ledure.be>
2021-03-05ScriptForge - (scriptforge.py) Python-Basic machineryJean-Pierre Ledure
Python scripts can now invoke usual Basic builtin functions Example: from ScriptForge import CreateScriptService bas = CreateScriptService('Basic') bas.MsgBox('This is the text to be displayed', bas.MB_ICONEXCLAMATION) Python scripts can use most ScriptForge services written in Basic Example: from scriptforge import CreateScriptService FSO = CreateScriptService('FileSystem') a = FSO.BuildPath('/tmp', 'xyz') Syntax and semantic are as close as possible to the Basic syntax Implemented are a SFServices class and its subclasses representing each a ScriptForge service and where the interfaces are defined (properties, methods and arguments) Their execution goes through the "machinery", i.e. a set of python and basic routines that manage the call from the python process to the appropriate service in an as much agnostic and generic way Only a limited set of services are implemented so far: SF_FileSystem (partially) and SF_Timer: they served as prototypes and initial tests Change-Id: I0b383b59359c12710e7165139e498cca5a7856bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111971 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-02-21ScriptForge - (SF_Platform) new Locale and PythonVersion propertiesJean-Pierre Ledure
- 'Locale' returns a la-CO (language-COUNTRY) string derived from com.sun.star.lang.Locale - 'PythonVersion' returns Python major.minor.patchlevel supplied by ScriptForgeHelper.py platform class Change-Id: I2b8495c03253b17c5e4ba14765b1f359eee67813 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111284 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-02-09ScriptForge - (SF_String) more severe check on the date validity of IsADate()Jean-Pierre Ledure
So far IsADate checked the format of the date only, not the validity vs. leap years, days in month, etc. Corrected with an error check on the DateSerial() builtin function Change-Id: I3fc53ea83e0a1472b2861f256266c4422cce2580 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110590 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-02-09ScriptForge - (SF_Array) new Copy() methodJean-Pierre Ledure
Duplicate the array A simple assignment copies the reference, not the data In code like: Dim a, b a = Array(1, 2, 3) b = a a(2) = 30 MsgBox b(2) ' Displays 30 Replace by b = SF_Array.Copy(a) to get a real duplication of the initial array Change-Id: I62b931b92995c6607a3b354c60f0ebafb042b88a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110591 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>
2021-02-07Fix typosAndrea Gelmini
Change-Id: I30743ea4caf9702f26005567d293f076ff7f78fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110517 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-02-06ScriptForge - (SF_FormControl) add SetFocus() methodJean-Pierre Ledure
The SetFocus() method simply applies the setFocus() UNO method for usual controls. However controls belonging to a table control require, to receive the focus, the columns to be scanned from left to right up to the targeted column. Change-Id: Idbb1ca4b4b29bff889daa83cfa895501c466bb26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110485 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-02-04ScriptForge - (SF_FormControl) Review error checkingJean-Pierre Ledure
- separate error message vs corresponding message for dialogs - more precision on form naming: form document.form name - add new error message in SF_Exception and SF_Root messages lists - add new message in po files Change-Id: I1f7f2dc7b5627d12a8c5ecf238e6cbd3aa1505fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110380 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-02-03Fix typosAndrea Gelmini
Change-Id: I322b1176c02b33336e4e393e565ad66f43eb42a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110343 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-02-03ScriptForge - (SF_Exception) fix DebugPrint accepts missing argumentsJean-Pierre Ledure
In statements like: DebugPrint(,a) the first missing argument gives an error 448 The error is now intercepted and replaced by a zero-length string in the console display Change-Id: Id41f2c786ef935e062815f8cf1e80b0a1fec5857 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110327 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-02-02ScriptForge - (new SF_FormControl): form control propertiesJean-Pierre Ledure
The whole set of properties is created including - updatable OnXxx event properties - the Value property as a shortcut to the control content for all the control types Controls events management is included Access to the subcontrols of table controls is included as well Addition of the new file in the SFDocuments make file Change-Id: I6308a71e3dd499d729cee1565002b6a9d84f7743 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110289 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-01-26Access2Base - (Control.xba) FIX Get DefaultValue for DateField controlsJean-Pierre Ledure
The DefaultDate was read correctly but not returned to the calling program Change-Id: Ie15a48a6366c1575f4914a2b60c836890fe53a43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109921 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-01-17Fix typoAndrea Gelmini
Change-Id: I0ce46927730cef961bbefd12551b2d56e8fe357d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109240 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-01-16ScriptForge - (ScriptForgeHelper.py) add empty list of visible routinesJean-Pierre Ledure
The g_exportedScripts variable contains the list of the methods in the script that may be made visible in LO IDE's (APSO and alike) Currently that list (in fact, a tuple) must be empty Change-Id: I86abc0bb55be524a3f9d39da7c6bd248abec8668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109435 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-01-15ScriptForge - (SF_Form) methods for forms and subformsJean-Pierre Ledure
MoveFirst, MoveLast, MoveNew, MoveNext, MovePrevious Requery Change-Id: I7d4962e16652c6ef6e0b5400a8b4beae0b15d20b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109298 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-01-13ScriptForge - (SF_Form)get/set properties of forms/subformsJean-Pierre Ledure
Includes a bunch of OnXxx event properties Change-Id: Ie2cbb91bb29288a17eb835e8abeeeaa6e8ef6d2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109177 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2021-01-05fix typoXisco Fauli
Since 54f0ae24173a69d145e2ffc3aaa2f6bd29e39611 Change-Id: I556bea5e62819f6b6f375e868d212e45c6786064 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108669 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-31ScriptForge - (SFDocuments) create a SF_Form instance with Subforms()Jean-Pierre Ledure
Subforms are controls in UNO They are considered as form objects in ScriptForge Additional error message in po files SF_Form._IsStillAlive() has been simplified SF_Form._GetParents() has been reviewed to incorporate subforms Change-Id: I89306d5c65e34ae1596f84b674ed338e070957f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108475 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-26ScriptForge - (SF_Form) event management and bottom-up tree scanJean-Pierre Ledure
Strategy for management of Form and FormControl events: At the contrary of Dialogs and DialogControls, which are always started from some code, Forms and FormControls will be initiated most often by the user, even if the SFDocuments library allows to start forms programmatically For Forms started programmatically, the corresponding objects are built top-down Event management of forms and their controls requires to being able to rebuild Form and FormControl objects bottom-up To avoid multiple rebuilds requested by multiple events, 1. The active form objects are cached in a global array of _FormCache types 2. FormControl objects are cached in Form objects 3. The bottom-up rebuild is executed only once, at instance creation Change-Id: I76ebb8064a900397427554ca47464c99266e0e5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108325 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-21Fix typoAndrea Gelmini
Change-Id: If3f35326cef033593b69f6f1e3496dd5c283b29d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108053 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2020-12-20ScriptForge - new CloseFormDocument() methodJean-Pierre Ledure
Only when form instance is inside a Base form document Change-Id: I6fd0cf1d77588b9720efb2c45384371a122dbd4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108048 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-20ScriptForge - (SF_Base) new OpenFormDocument() methodJean-Pierre Ledure
OpenFormDocument has 2 arguments - the form document hierarchical name - the mode: normal or design If the form document is already open, the focus is set on it Change-Id: I6fb055cde2e856d7dad17af99b11bc2fd15060c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108023 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-19ScriptForge - (SF_Exception) Fix console start in modal modeJean-Pierre Ledure
When the console is first started in non-modal mode and the launching macro stops normally, when the console is then requested to restart in modal mode, it does not start This patch forces a reinit of the console dialog when it is started in modal mode, whatever its status Change-Id: Ia687661e60259c235f2b45decf9bb6e342d3f26b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107973 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-17ScriptForge - (SFDocuments) new Activate() method in SF_Form classJean-Pierre Ledure
Activate - the parent document if Writer - the parent sheet if Calc - the parent form document if Base Change-Id: Idf2af0184111467d0a94fb27709fd6bb289c6414 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107888 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2020-12-17Fix typosAndrea Gelmini
Change-Id: Ibbf592ba80afbe174662e1cc2dd992e7a16f67e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107876 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Tested-by: Jean-Pierre Ledure <jp@ledure.be>