LibreOffice Macro Team: progress report
Macros help users to automate common tasks in LibreOffice. In September 2019 we announced a new team in our community to work on macro support. The last progress report was published in April 2020, so it is high time to look into what has happened since then.
If you are interested in contributing to the macro team (development, testing or documentation), we’d love to hear from you – please send an email to ilmari.lauhakangas@libreoffice.org and we’ll get in touch.
ScriptForge Libraries
The biggest single event was the introduction of ScriptForge Libraries in LibreOffice 7.1. ScriptForge and its documentation is a collaboration betwen Jean-Pierre Ledure, Alain Romedenne and Rafael Lima. You can read more about it in the January 2021 blog post and the work-in-progress Help content.
Wiki docs
Nathan Ullberg continued working on Impress macro articles.
Celia Palacios improved the Python guide and added new macro tutorials, such as populating spreadsheets with data from an SQL database.
Alain Romedenne continued adding syntax diagrams and improved and expanded the Python guide and macro articles.
Mauricio Baeza improved and expanded articles and added new ones, such as Insert a comment with custom presets, Copy content cell from Spreadsheet to other and Charts in Calc.
Steve Fanning added several new examples of Calc macros.
Code contributions from macro team members
Alain Romedenne:
- MOD result is different for values passed as literals vs. using variables
- Fixed crash with replace function
- Unexpected result when executing ReDim statement on an array of structures
- Convert parameters to requested type so references are not lost
- Grant write access to the method used as a variable, so the name of the method can be used in all types of statements
- ReDim Preserve fails if array is filled by Split
- Fixed broken tests for cverr method
- With option base, arrays should start at index 1
- In order to prevent type conversion errors, reset a variable of type SbxERROR to not fixed
- Create variable with Variant/Type in StepLOADNC in order to prevent type conversion errors
- Support case-insensitive operation for non-ASCII characters in the Replace function
- Abort scan of a string beginning with a hashtag, if a comma is found
- VBA AutoFilter can’t compare strings
- Correct the behaviour of the Overwrite property
- Added possibility to sort macros via context menu
- ReDim Preserve fails if array is filled by Split
George Bateman:
Tomoyuki Kubota:
Code contributions from honorary associate members
Compatibility fixes for Python 3.8 to 3.12 done by David Ostrovsky, Dante Doménech, Noel Grandin (Collabora) and Stephan Bergmann (Red Hat).
Anshu Khare:
- Return correct values for IsNumeric(“+2”) and CInt(“+2”)
- Show protection icon in front of sheet name when protected via Basic
Arnaud Versini:
- Many cleanups and optimisations in Basic handling code
Arpit Bandejiya:
Caolán McNamara (Red Hat):
- Fix for PYTHONPATH-related crash
- Hide macro organize dialog before launching macro editing
- Fixed crash deleting module in macro editor
John Turpish:
Maxim Monastirsky:
Michael Stahl (allotropia):
Mike Kaganski (Collabora):
- Use Unicode paths on Windows for pyuno
- Initialize method mapping table at compile time
- Unify tests
- Proper handling of For/For Each with On Error Resume Next
- Copy deep when there are multiple references to the old array
- Reimplement SbRtl_Replace to improve performance
- Fixed crash when inspecting an array after Redim Statement with option VBASupport 1
- Properly load arrays in user-defined types from image
- Use sheet-local named ranges for VBA’s Worksheet.Names
- Many cleanups and optimisations in Basic handling code
Noel Grandin (Collabora):
Serge Krot (CIB):
Shubham Jain:
Stephan Bergmann (Red Hat):
Tushar Kumar Rai:
- Invoking a Basic routine with ByRef Variant parameter returns wrong value type
- Invoking a Basic routine with ByRef Long or Double parameter does not return modified value
Xisco Fauli (TDF):
Help content
Improved by Alain Romedenne:
- InputBox Function
- MsgBox Statement
- The Gimmicks Library
- Document Event-Driven Macros
- The Euro Library
- The ScriptBindingLibrary Library
- Type Statement
- Dim Statement
- Call Statement
- Deprecated tags for ChDir, ChDrive, CurDir
- Completed syntax diagram work
- Improvements in Basic Subroutines help pages
- Improvements in the Basic table of contents
- Improvements in all articles dealing with Basic Date/Time methods
- Improvements in all articles dealing with color functions
Added by Alain Romedenne:
- The ImportWizard Library
- The WikiEditor Library
- Compiler Options, Runtime Conditions
- Resume Statement
- Err Object [VBA]
Improved by Rafael Lima:
Improved by Olivier Hallot (TDF):
- All articles dealing with Basic string functions
- IIf Function
- Replace Function
Added by Olivier Hallot (TDF):
No Responses