Introducing the ScriptForge Basic Libraries

The arrival of the ScriptForge Libraries will greatly help macro programming in LibreOffice.

By Jean-Pierre Ledure

What is ScriptForge?

ScriptForge libraries are an extensible and robust collection of macro scripting resources for LibreOffice to be invoked from user Basic macros. Users familiar with other BASIC macro variants often face hard times to dig into the extensive LibreOffice Application Programming Interface even for the simplest operations. By collecting most-demanded document operations in a set of easy to use, easy to read routines, users can now program document macros with much less hassle and get quicker results.

ScriptForge abundant methods are organized in reusable modules that cleanly isolate Basic programming language constructs from ODF document content accesses and user interface(UI) features.

What is in ScriptForge?

ScriptForge libraries hold:

  • an extensive set of primitives for array handling, including sorts, set operations and interfaces with csv files
  • an extensive set of primitives for string handling, including replacements, regular expressions, encodings, hashing and localization
  • a Dictionary mapping class
  • a class to help internationalize Basic scripts
  • a coherent error handling for both user and ScriptForge scripts
  • complete FileSystem and TextStream classes for file and directory handling, plus text files read & write
  • detailed context information: platform, operating system, directories, …
  • interconnection between Basic and Python modules

Document-based and UI ready-made examples help overcome LibreOffice Application Programming Interface (API) steep learning curve. They offer easy access to and management of actual windows and documents, with specific modules for automation on Calc sheets, cells and ranges of cells, management of dialogs and their controls and access to data contained in databases, among many other services.

The described features are invoked from user scripts as “Services” that can be extended. ScriptForge libraries build up an extensible ecosystem that combines with standard libraries, libraries published as extensions or libraries distributed as enterprise extensions.

What else?

ScriptForge libraries documentation is undergoing review and translation and will be available from LibreOffice 7.2 onwards, but you can use ScriptForge services and scripts right away with LibreOffice release 7.1. A glimpse of the ScriptForge documentation is already online at this Help page.

A lecture on ScriptForge was delivered by Jean-Pierre Ledure at the LibreOffice 2020 conferenceA PDF presentation document is available for download.

ScriptForge is a community contribution by Jean-Pierre Ledure, Alain Romedenne and Rafael Lima.

Scripting LibreOffice macros with Basic just got easier with ScriptForge libraries!

The round-the-world trip to fix a bug

A little story: The beauty of planet-wide collaborative work in LibreOffice

Mrs. Vera Cavalcante (@veracape), from Brazil, a long-time contributor for the Portuguese documentation on LibreOffice, was reviewing the translation of the Calc Guide and double-checking the translated text, with respect to the current user interface and the Help pages. Vera noticed that the Help pages on conditional formatting were not correct any more, and reported in the Brazilian team Telegram group (Bugzilla is still very hard for non-native English speakers).

The message hit Olivier Hallot (@ohallot) from the LibreOffice documentation coordination team (and Brazilian community member), who reported the bug in LibreOffice’s Bugzilla, for later fixing. LibreOffice’s outstanding quality depends on good quality and numerous errors reports to be submitted properly, for improvements and fixing defects. There is no point leaving a bug unreported.

The topic was of special interest of Roman Kuznetsov (@kompilainenn) from Russia, who already wrote documentation about conditional formatting. Roman wrote the fix, and submitted a patch in Gerrit (the service that controls the code corrections in LibreOffice)…

…and Adolfo Jayme Barrientos (@fitojb) from Mexico reviewed and approved the patch for merging in the main Help code.

End result: LibreOffice’s Help page fixed!

Czech translation of LibreOffice Calc Guide 6.4

Zdeněk Crhonek (aka “raal”) from the Czech LibreOffice community writes:

It’s a bit late for the Christmas gift , but we finished translation of the Calc guide 6.4. As usual it was team work, namely:

Translations: Petr Kuběj, Zdeněk Crhonek and Zuzana Pitříková

Text corrections: Marcela Tomešová and Vendula Crhonková

Localised pictures: Roman Toman

Technical support: Miloš Šrámek.

Thanks to all the team, and especially Petr for his amazing amount of translation work, Marcela for her patience with our mistakes, and Roman for his continuous support. The Czech translation of the Calc guide 6.4 is available for download here.

Zdeněk adds that the Czech team is continuing with the translation of the Writer Guide, and is always looking for new translators. Join them, or indeed teams in other languages!

New Beginner LibreOffice Tutorials and Videos from Paul Sutton

LibreOffice’s documentation community creates handbooks, guides, tutorials and other resources to help users get the most out of the software. Everyone is welcome to join the team and help out – it’s a great way to build up experience for a possible career in technical writing!

Paul Sutton is producing a series of blog posts and videos aimed at newcomers to LibreOffice, explaining some of the basics. He also has some extra videos here – check them out.

A big thanks to Paul for his work, and making his content available under a Creative Commons license, for everyone to share! Follow him on Twitter and Mastodon.

The LibreOffice Calc Guide 7.0 Just Arrived!

The LibreOffice Documentation Team is happy to announce the availability of the LibreOffice Calc Guide 7.0, the most comprehensive guide for the Calc module, updated to the latest version of LibreOffice.

The Guide is available in PDF format and contains 545 pages, covering all basic and advanced features of the spreadsheet module of LibreOffice, and is a must-read book for exploiting the maximum of LibreOffice Calc.

(more…)