The Document Foundation Planet

 

February 06, 2023

Official TDF Blog

Writer and Calc Guides updated to new LibreOffice 7.5 release

The Documentation Team is proud to announce the immediate availability of the Writer Guide and Calc Guide release 7.5, narrowing the time gap between the software release date and the Guides’ release date.

Writer Guide 7.5

Writer Guide 7.5

Calc Guide 7.5

Calc Guide 7.5

The Writer Guide 7.5 update was coordinated by Jean Weber with the support of Kees Kriek, Tsvetelina Georgieva, Antonio Fernández and Olivier Hallot. The Guide contains topics on Additional hyphenation settings (Chapter 2), Language Tool, a remote grammar checker (Chapters 2 and 20), Additional change tracking features (Chapter 3) Outline folding (Chapter 3), Page line-spacing for printed documents (Chapter 6), Gutter margins in page styles (Chapters 8 and 9), Revised and additional information about using styles (Chapter 8), Additional information about using master documents (Chapter 16), New features for bookmarks (Chapter 17) and Content controls (Chapter 18)

The Calc Guide 7.5 update was coordinated by Olivier Hallot, based on the Calc Guide 7.4. The guide contains topics on document properties (Chapter 1), AutoFilter with color filtering and more (Chapter 2), Chart data table (Chapter 3) and notes on AutoFormat of ranges and themes (Chapter 4 and 5).

The Guides are available for immediate download in PDF format as well as in source format (OpenDocument Format). Soon they will be available as printed books by LuLu inc. and in HTML format for online reading

Download the Writer and Calc guides 7.5 from the documentation websites at: documentation.libreoffice.org and the bookshelf at books.libreoffice.org.

Olivier Hallot

Olivier Hallot

Jean Weber

Jean Weber

by Olivier Hallot at February 06, 2023 03:13 PM

Miklos Vajna

Citation handling: plumbing in Writer for e.g. Zotero

Writer now has a set of new automation commands and APIs that allow clients to build user interface for citation handling that's more advanced than the default in-Writer bibliography support.

This work is primarily for Collabora Online, see the CODE release notes for one possible way to use this.

Motivation

Citations and bibliography in Writer, using fieldmarks

Users frequently using scientific citations are probably familiar with the limits of Writer's built-in bibliography support, and solutions like Zotero appeared (with a LibreOffice extension included) to improve that situation.

This means that instead of storing all your scientific notes and data locally, you can store them on a Zotero server, then work with that from anywhere, once you provide your credentials.

The trouble comes when you want to combine this with collaborative editing, which is provided by Online, but you can't use the extension made for the desktop.

The above CODE release notes explains how an end user can use this feature, this post is meant to document what new UNO commands and LOK APIs I added that serve as a backend for this. Especially the UNO commands are also useful in other contexts, like in macros or other extensions.

Results so far

Zotero can store citations using 3 markups in documents: fields (DOCX only), bookmarks (DOCX and ODT) and finally reference marks / sections (ODT only). The added plumbing allows several operations for all 3 cases, to work with existing documents using any of these markups.

The citation and the bibliography is handled the same way for fields (Writer's fieldmarks) and bookmarks. The last case uses reference marks for citations, but sections for the bibliography.

The following operations are supported:

  • create the citation / bibliography

  • read the object under the cursor

  • read all objects of a given type in the document

  • update the object under the cursor

  • update all objects of a given type in the document

  • delete all objects of a given type in the document

Reading is only available to LOK clients, you need to call the getCommandValues() API. The rest is normal UNO commands that you can invoke from document macros or extensions as well.

The added plumbing is the following:

Operation Fieldmark Bookmark Refmark Section
Create .uno:TextFormField .uno:InsertBookmark .uno:InsertField .uno:InsertSection
Read getCommandValues(".uno:TextFormField") getCommandValues(".uno:Bookmark") getCommandValues(".uno:Field") None
Read all getCommandValues(".uno:TextFormFields") getCommandValues(".uno:Bookmarks") getCommandValues(".uno:Fields") getCommandValues(".uno:Sections")
Update .uno:UpdateTextFormField .uno:UpdateBookmark .uno:UpdateField None
Update all .uno:TextFormFields .uno:UpdateBookmarks .uno:UpdateFields .uno:UpdateSections
Delete all .uno:DeleteTextFormFields .uno:DeleteBookmarks .uno:DeleteFields .uno:DeleteSections

How is this implemented?

If you would like to know a bit more about how this works, continue reading... :-)

As usual, the high-level problem was addressed by a series of small changes:

Want to start using this?

You can get a snapshot / demo of Collabora Office 22.05 and try it out yourself right now: try the unstable snapshot. Collabora intends to continue supporting and contributing to LibreOffice, the code is merged so we expect all of this work will be available in TDF's next release too (7.6).

by Miklos Vajna at February 06, 2023 07:45 AM

February 05, 2023

LibreOffice Dev Blog

QR code improvement – LibreOffice EasyHack

A QR code is a type of 2D barcode that is useful for encoding data, such as a URL, contact information and many other data types. One can scan the code via applications on mobile phones to capture a URL or import contact information.

For example, the code below encodes the address of the LibreOffice website:

Encoding LibreOffice website URL with QR code

Encoding LibreOffice website’s URL in a QR code

Generating QR Codes in LibreOffice

In LibreOffice, it is possible to create different barcodes, either 1D or 2D, via extensions, or LibreOffice’s internal functionality.

QR code dialog

QR code dialog

For QR codes, it is possible to use the internal functionality via Insert > OLE Object > QR and Barcode:

The implementation in LibreOffice is using ZXing QR code library:

If you take a look at the source code in cui/source/dialogs/QrCodeGenDialog.cxx, there is ConvertToSVGFormat() function which creates the SVG output. In the recent versions of ZXing library (we use v1.4 right now), there is a function that does that, ZXing::ToSVG(). The task here is to replace the our function with the one from ZXing library.

Handling Different Library Versions

Unfortunately, only recent versions of ZXing provide ZXing::ToSVG() functions. It is not available in 1.3, but is added in 1.4. Looking into the packaging of the library in different distributions, it becomes obvious that this package version is not available yet in many distributions:

Therefore, a solution should check the ZXing library version, and use the new function if the library version is >= 1.4. In other words, limiting the change to where the new version of the library is present is necessary. This is possible using compiler conditionals. It is important where one configures the LibreOffice compilation to use system provided ZXing library, using --with-system-zxing while invoking autogen.sh.

Final Notes

EasyHacks are good starting points for someone who wants to get started in LibreOffice development. This specific issue for improving QR code is filed as tdf#153328 in TDF’s Bugzilla. To understand how to get started with LibreOffice development, you can refer to our getting involved page in the TDF Wiki, or our video tutorial for getting started with LibreOffice development.

by Hossein Nourikhah at February 05, 2023 03:35 PM

February 03, 2023

Official TDF Blog

Video: New Features in LibreOffice 7.5

A quick look at some of the new features in LibreOffice 7.5, which we announced yesterday!

(Click here to see this video on PeerTube.)

Please confirm that you want to play a YouTube video. By accepting, you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.

Thanks to Nugroho Dwi Hartawan, Rania Amina and Ahmad Haris for the video. Original audio track: KOBT025 – Backing Track by Korochin Music JP.

by Mike Saunders at February 03, 2023 11:52 AM

February 02, 2023

Official TDF Blog

The Document Foundation announces LibreOffice 7.5 Community

LibreOffice 7.5 banner

Berlin, February 2, 2023 – LibreOffice 7.5 Community, the new major release of the volunteer-supported free office suite for desktop productivity, is immediately available for download for Windows (Intel/AMD and ARM processors), macOS (Apple Silicon and Intel processors), and Linux.

Most Significant New Features

GENERAL

  • Major improvements to dark mode support
  • New application and MIME-type icons, more colorful and vibrant
  • The Start Centre can filter documents by type
  • An improved version of the Single Toolbar UI has been implemented
  • PDF Export improved with several fixes, and new options and features
  • Support for font embedding on macOS
  • Improvements to the Font Features dialog with several new options
  • Addition of a zoom slider at the bottom right of the macro editor

WRITER

  • Bookmarks have been significantly improved, and are also much more visible
  • Objects can be marked as decorative, for better accessibility
  • New types added to content controls, which also improve the quality of PDF forms
  • A new automatic accessibility checker option has been added to the Tools menu
  • Initial machine translation is available, based on DeepL translate APIs
  • Several spell checking improvements

CALC

  • Data tables are now supported in charts
  • The Function Wizard now lets you search by descriptions
  • “Spell out” number formats have been added
  • Conditional formatting conditions are now case insensitive
  • Correct behavior when entering numbers with a single prefix quote (‘)

IMPRESS & DRAW

  • New set of default table styles, and creation of table styles
  • Table styles can be customized, saved as master elements and exported
  • Objects can be drag-and-dropped in the navigator
  • It is now possible to crop inserted videos in the slide and still play them
  • The presenter console can also run as a normal window instead of fullscreen

A video summarizing the top new features in LibreOffice 7.5 Community is available on YouTube and PeerTube. A description of all new features is available in the Release Notes.

Interoperability with Microsoft Office

Based on the distinctive features of the LibreOffice Technology platform for personal productivity on desktop, mobile and cloud, LibreOffice 7.5 provides a large number of improvements and new features targeted at users sharing documents with MS Office or migrating from MS Office. These users should check new releases of LibreOffice on a regular basis, as the progress is so fast, that each new version improves dramatically over the previous one.

LibreOffice offers the highest level of compatibility in the office suite market segment, with native support for the OpenDocument Format (ODF) – beating proprietary formats for security and robustness – to superior support for MS Office files, along with filters for a large number of legacy document formats, to return ownership and control to users.

Microsoft files are still based on the proprietary format deprecated by ISO in 2008, and not on the ISO approved standard, so they hide a large amount of artificial complexity. This causes handling issues with LibreOffice, which defaults to a true open standard format (the OpenDocument Format).

Contributors to LibreOffice 7.5 Community

LibreOffice 7.5 Community’s new features have been developed by 144 contributors: 63% of code commits are from the 47 developers employed by three companies sitting in TDF’s Advisory Board – Collabora, Red Hat and allotropia – or other organizations, 12% are from 6 developers at The Document Foundation, and the remaining 25% are from 91 individual volunteers.

Other 112 volunteers – representing hundreds of other people providing translations – have committed localizations in 158 languages. LibreOffice 7.5 Community is released in 120 different language versions, more than any other free or proprietary software, and as such can be used in the native language (L1) by over 5.4 billion people worldwide. In addition, over 2.3 billion people speak one of those 120 languages as their second language (L2).

LibreOffice for Enterprises

For enterprise-class deployments, TDF strongly recommends the LibreOffice Enterprise family of applications from ecosystem partners – for desktop, mobile and cloud – with a large number of dedicated value-added features and other benefits such as SLA (Service Level Agreements): www.libreoffice.org/download/libreoffice-in-business/.

Every line of code developed by ecosystem companies for their enterprise customers is shared with the community on the master code repository, and improves the LibreOffice Technology platform.

Products based on LibreOffice Technology are available for major desktop operating systems (Windows, macOS, Linux and Chrome OS), for mobile platforms (Android and iOS), and for the cloud.

Migrations to LibreOffice

The Document Foundation has developed a Migration Protocol to support enterprises moving from proprietary office suites to LibreOffice, which is based on the deployment of an LTS version from the LibreOffice Enterprise family, plus migration consultancy and training sourced from certified professionals who offer value-added solutions and services in line with proprietary offerings. Reference: www.libreoffice.org/get-help/professional-support/.

In fact, LibreOffice – thanks to its mature codebase, rich feature set, strong support for open standards, excellent compatibility and LTS options from certified partners – is the ideal solution for businesses that want to regain control of their data and free themselves from vendor lock-in.

Availability of LibreOffice 7.5 Community

Donate bannerLibreOffice 7.5 Community is available from: www.libreoffice.org/download/. Minimum requirements for proprietary operating systems are Microsoft Windows 7 SP1 and Apple macOS 10.14. LibreOffice Technology-based products for Android and iOS are listed here: www.libreoffice.org/download/android-and-ios/.

For users who don’t need the latest features, and prefer a release that has undergone more testing and bug fixing, The Document Foundation maintains the LibreOffice 7.4 family, which includes some months of back-ported fixes. The current version is LibreOffice 7.4.5.

The Document Foundation does not provide technical support for users, although they can get it from volunteers on user mailing lists and the Ask LibreOffice website: ask.libreoffice.org

LibreOffice users, free software advocates and community members can support The Document Foundation with a donation at www.libreoffice.org/donate.

Press Kit

Download link

by Italo Vignoli at February 02, 2023 11:10 AM

January 31, 2023

Official TDF Blog

LibreOffice project and community recap: January 2023

Montage of images from this post

Here’s our summary of updates, events and activities in the LibreOffice project in the last four weeks – click the links to learn more…

  • We started the year back looking back at the previous one – 2022! Here’s a quick recap of what we did in the LibreOffice community. Well, just a few of the many things 😉 Thanks to everyone who contributed last year! (PeerTube version of this video here.)

Please confirm that you want to play a YouTube video. By accepting, you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.

LibreOffice 7.4 banner

Calc Guide cover

  • Some sad news: we heard that Carlos Parra Zaldivar, a long-time collaborator in the community, member of The Document Foundation and advocate for Free Software, passed away on November 20th. Rest in peace, Carlos.

Carlos Parra Zaldivar

Draw Guide cover

  • Then we talked to Afshin Falatooni from the Persian-speaking LibreOffice community, about his work on the blog and in the QA project.

Afshin Falatooni

  • Later in the month, we at The Document Foundation stated our position on the EU’s proposed Cyber Resilience Act. If the Cyber Resilience Act becomes EU law without clarification, the impact on several European-based open source projects, such as products based on LibreOffice technology, could have devastating (unintended) consequences.
  • TDF has many websites and services: this blog, the LibreOffice website, our wiki, the extensions website, Weblate and many more. To improve them and keep them up-to-date, TDF now has a new Web Technology Engineer, Juan José González! We had a chat with him, to learn more…

Juan José González

FOSDEM logo

Keep in touch – follow us on Twitter, Facebook and Mastodon. Like what we do? Support our community with a donation – or join us and help to make LibreOffice even better!

by Mike Saunders at January 31, 2023 10:39 AM

January 30, 2023

Official TDF Blog

Meet the LibreOffice community at FOSDEM 2023!

FOSDEM logo

FOSDEM is one of the largest meetups for free and open source software projects. After two years of online events due to the pandemic, it’s back in-person, in Brussels on February 4 and 5!

And, of course, LibreOffice and The Document Foundation will be there. Our stand will be in in K level 1 (group C). We also have the LibreOffice Technology devroom on the first day, packed with talks and presentations.

See you there!

by Mike Saunders at January 30, 2023 01:50 PM

Collabora Community

Collabora Productivity at FOSDEM 2023

FOSDEM 2023 – Back in Brussels

FOSDEM 2023 is back home in Brussels. Meet the Collabora Productivity team at Europe’s largest gathering of open-source developers and have a chat, some fries or a beer with us (also: make sure to grab some stickers!). As usual, our engineers will be giving talks about the latest developments in Collabora Online, Collabora Office and LibreOffice at the LibreOffice Technology devroom. Here’s the schedule!

Saturday, February 4th 2023

Collabora at the LibreOffice Technology devroom

 

Noel Grandin

16:10 – LibreOffice Technology devroom See details

Turbocharging an Elephant – Making LibreOffice Faster

Most of the easy tasks are already done. This talk covers several improvements to LibreOffice, that required lots of preparational work and interesting challenges to introduce improvements into a massive (and messy) codebase.

 

Pranam Lashkari

16:20 – LibreOffice Technology devroom See details

Feature Locking and Feature Restriction – Integrator’s Way to Unlock Potential

In the talk, Pranam Lashkari will explain and demonstrate how feature locking and restrictions work in Collabora Online. Using such methods, integrators can control which features to deliver to which user or group.

 

Sarper Akdemir

16:30 – LibreOffice Technology devroom See details

An Interoperability Improvement in LibreOffice Impress Tables

Sarper Akdemir tells the story of an interoperability bug fixing adventure where the problem turned out to be deeper than it appeared at first glance, showcasing how there are multiple approaches to a single interoperability problem.

 

Miklos Vajna

16:40 – LibreOffice Technology devroom See details

Writer Content Controls – What Happened in the Past Half Year

LibreOffice was capable of handling form filling in Writer for a while already. In the meantime, the competition introduced Structured Document Tags. Writer Content Controls are meant to perform a great handling of this third type of form filling. See Miklos Vajna‘s talk about what we have done to bring themes to LibreOffice, hear what still needs doing and find out how you can help.

 

 

 

Szymon Kłos

 17:40 – LibreOffice Technology devroom See details

LibreOfficeKit – Bridge Between Your Application and LibreOffice

Szymon Klos gives a short introduction into integrating LibreOffice using LibreOfficeKit with external software. He will describe the most important code pieces and show, where to look for information. Furthermore, he’ll demonstrate how to add new features, which API we provide, and what can be done with tiled rendering.

 

Michael Meeks

 17:50 – LibreOffice Technology devroom See details

Collabora Online Over Lockdown – How LibreOffice Technology in the Browser Got Better

Come and hear how Collabora Online (COOL) has improved over the COVID-19 era, not only in core feature-function, but also in ease of access and deployment for everyone. See how we can deliver scalable, secure, on-premise editing of your documents with a simple, easy to deploy office for the free world.

 

Pedro Pinto Silva

 18:10 LibreOffice Technology devroom See details

Make Collabora Online Yours – Customize and Integrate it Everywhere

Collabora Online is quite flexible in the means that you can alter to your personal taste without the need to change other core components. Pedro Pinto Silva shows how to make Collabora Online yours. Discover all the shining new additions to the user interface and learn how to customize and integrate it everywhere.

 

Tor Lillqvist

18:30 – LibreOffice Technology devroom See details

Collabora Online and WASM – Assembling Off-line Collabora Online with the Web

Come hear Tor Lillqvist‘s talk about a new approach to enabling browser deployment of rich office functionality – built on top of allotropia’s investment in enabling the core LibreOffice technology to compile to Web Assembly (WASM) – combined with the Collabora Online front-end. Hear about how this can be used to provide a fall-back (non-collaborative) editing mode for when you lose network connectivity for a while, and about the plans to re-synchronize documents on the return from such a tunnel.

 

 

About Collabora Online

Collabora Online 22.05 is our latest enterprise release. It’s suitable for large-scale deployment, and comes with SLA, enterprise support with signed security updates as well as interaction with product management, helping to direct our development priorities. Collabora Online integrates flawlessly into Nextcloud, ownCloud, Seafile, and many of the major file sync & share, groupware and hosting solutions. It’s ideal for organizations that want to collaborate on documents, without losing control over them or compromising on privacy. With the ability to host it on your own hardware or to integrate it into a trusted environment, Collabora Online is the ideal online office suite for digital sovereignty. Enterprises interested in using Collabora Online can check out our home page for more information on partner integrations and online demos. Hosting and Cloud businesses that wish to add Collabora Online to their product portfolio can become a partner. For any questions or tailored solutions, do not hesitate to contact hello@collaboraoffice.com.

 

The post Collabora Productivity at FOSDEM 2023 appeared first on Collabora Office and Collabora Online.

by Marc Rodrigues at January 30, 2023 10:12 AM

January 28, 2023

LibreOffice Dev Blog

VCL example applications and tools

You may already know that LibreOffice uses its internal GUI toolkit, named VCL (Visual Class Library). This library is responsible for creating the GUI widgets for LibreOffice, providing abstraction from the operating system including the basic rendering. To see more details, you can read its documentation page:

VCL has the nice feature of being able to work with different GUI libraries on different platforms. For example, if you are on Linux, you can use X11, Gtk3/4, Qt, or KDE back-ends for the VCL applications like LibreOffice. You can easily switch between them by using the environment variable SAL_USE_VCLPLUGIN. For example, you can use the old style X11 GUI in this way:

SAL_USE_VCLPLUGIN=gen instdir/program/soffice

Or, by passing it to the LibreOffice program itself:

instdir/program/soffice -env:SAL_USE_VCLPLUGIN=gen

In addition, there are other GUI backends, or plugins which are as follows:

UI Plugin UI Backend
qt5 Qt 5
qt6 Qt 6
kf5 KDE KF5
gtk3 GTK 3
gtk4 GTK 4
gtk3_kde5 GTK 3 KDE 5
win Windows UI (Windows only)
osx macOS X UI (macOS only)

You can read more about the related environment variables here:

The code for the library is available in the vcl/ folder inside core source code. Also, beside the main source code and tests, there is a folder named workbench. Inside this folder, you can find several standalone VCL applications:

VCL Applications and Workbenches

vcldemo: This is a showcase of some of the VCL rendering abilities including the lines, shapes, internationalized text, pictures and more! You can see run this demo by invoking this command, after you could be able to build LibreOffice:

./bin/run vcldemo
vcldemo vcl application

vcldemo

minvcl: This is possibly one of the smallest example application that can be created with VCL. Basically, It creates a window and draws a simple text inside it. Likewise, you can run it by invoking:

./bin/run minvcl
minvcl vcl application

minvcl

Image Tools

icontest: This bitmap image testing is used by some of the developers to test VCL bitmap rendering capabilities. It can be invoked this way:

./bin/run icontest <image>

mtfdemo: This is a small application for displaying and dumping the structure of EMF/EMF+/WMF files, which is a vector image format from Microsoft. This is previously discussed in another blog post here:

Similarly, it can be run in this way:

./bin/run mtfdemo <emf|wmf image>

Font Tools

listfonts: This utility lists the current list of fonts installed in the system, and the features of each font. To display the information on the screen, you can invoke it this way:

./bin/run listfonts --

listglyphs: This utility lists the current glyphs in a font that is already installed on the system. You should provide the font name to it, in this way:

./bin/run listglyphs FreeMono --

VCL Fuzzers and Platform Specific Tools

Beyond the above applications and tools, there are many other platform specific tools that are not available on each and every platform. Also, there are many fuzzers ans testing tools that are helpful for fuzz-testing the library. You can find the complete list of executables using this command:

ls vcl/Executable_*.mk

As can be seen in the output, many of them are fuzzers. To use the fuzzers, first you have to setup the oss-fuzz via ./bin/oss-fuzz-setup.sh script. Then, you may be able to build the fuzzers using ./bin/oss-fuzz-build.sh script. Make sure that you have $OUT, $SRC and $WORK environment variables to set the fuzzer build environment. Be ready for several tarballs and archives downloads at first. You will need curl and svn to continue.

Final Notes

These tools and small applications and their source code are good for testing and getting to understand the VCL library better. As a suggestion, you can start from the minvcl.cxx to understand how to create a GUI application that can work across various platforms with different GUI toolkits. Hopefully, I will discuss the source code of some of these examples in the later blog posts.

by Hossein Nourikhah at January 28, 2023 01:56 PM

January 20, 2023

January 17, 2023

LibreOffice QA Blog

LibreOffice 7.5 RC2 is available for testing

LibreOffice 7.5 will be released as final at the beginning of February, 2023 ( Check the Release Plan ) being LibreOffice 7.5 Release Candidate 2 (RC2) the forth and final pre-release since the development of version 7.5 started in mid June, 2022. Since the previous release, LibreOffice 7.5 RC1, 89 commits have been submitted to the code repository and 39 issues got fixed. Check the Release Notes to find the new features included in this version of LibreOffice.

LibreOffice 7.5 RC2 can be downloaded for Linux, macOS and Windows, and it will replace the standard version.

In case you find any problem in this pre-release, please report it in Bugzilla ( You just need a legit email account in order to create a new account ).

For help, you can contact the QA Team directly in the QA IRC channel or via Matrix.

LibreOffice is a volunteer-driven community project, so please help us to test – we appreciate it!

Happy testing!!

Download it now!

by x1sc0 at January 17, 2023 01:10 PM

January 13, 2023

LibreOffice Dev Blog

String types in LibreOffice C/C++ code – part 1

Strings are very important types of data that are using in LibreOffice. Firstly, they are useful for storing textual data, and is essentially a sequence of characters. As LibreOffice has many modules that depend on various libraries and languages, there are different string types in LibreOffice. Here, we discuss some of them.

Character and String Data Types in C++

In C++, the standard std::string is available alongside the internal LibreOffice data types.

std::string std_str = "ت";
std::cout << "std::string: " << std_str << std::endl;

The standard std::string is not the data type of choice for storing textual values, and passing them between classes and methods, because LibreOffice has its own set of data types for this purpose. See the next sections for more information.

Please note that the usual functions to work with C strings may give unexpected results when user does not account for multi-byte encodings (like utf-8). For example, the length of the utf-8 strings as reported by std::string::length() shows the correct count of bytes (code units), but not the count of Unicode codepoints or “characters”.

Characters and Strings in LibreOffice C++ Source Code

In addition to the above C string type, in C++ OString is the 8-bit-string data type in LibreOffice that does not keep information about its encoding. On the other hand, OUString uses UTF-16 encoding, and is more widely used.

Code sample

Here is a sample code snippet for working with these LibreOffice string classes in C++:

// The text is: "واحِدْ إثٍنين ثلاثةٌ" which means "one two three"
OUString aOneTwoThree(reinterpret_cast
   (u"\u0648\u0627\u062d\u0650\u062f\u0652 \u0625\u062b\u064d\u0646\u064a\u0646"
    " \u062b\u0644\u0627\u062b\u0629\u064c" ));
std::cout << "" << aOneTwoThree << std::endl;

OUString ouStr = (sal_Unicode*)u"فارسی";
std::cout << ouStr.getLength() << std::endl;

OUString sTestString = (sal_Unicode*)u"The quick brown fox\n jumped over the lazy dog العاشر";
std::cout << sTestString <buffer);

OString oStr2("پ");
std::cout << "Unicode OString: " << oStr2 << std::endl;

Character and String Data Types in C

Some small (but important) parts of LibreOffice are in C programming language. In this case, the main type is the char[] (which is of type char * with slight difference). Essentially, it is an array of 8-bit (1 byte) characters that end with the NULL byte: '\0' or the character with the code zero. The char data type itself is used to store individual 8-bit characters. It is also possible to store UTF-8 Unicode strings in C strings.

Code sample

Here is a sample code snippet for working with these data types in C:

// storing ASCII
char c='a';
printf("Non-Unicode C Character: %c\n", c);

char s[] = "عربي";
printf("Unicode UTF-8 String: %s\n", s);

setlocale(LC_ALL, "");
wchar_t w_char = L'ب';
printf("Unicode UTF-16 String: %lc\n", w_char);

Characters and Strings in LibreOffice C Source Code

The underlying Unicode character data types for LibreOffice is sal_Unicode, and the string types rtl_String / rtl_uString. They are suitable for C source codes.

Code sample

Here is a sample code snippet for working with these data types in C:

sal_Unicode ouChar = u'ب';
printf("Unicode Character: %lc\n", ouChar);

rtl_String *rtl_str = nullptr;
rtl_string_newFromStr(&rtl_str, "پ");
printf("rtl_String: %s\n", rtl_str->buffer);
rtl_string_release(rtl_str);

rtl_uString *rtl_ustr = nullptr;
rtl_uString_newFromStr(&rtl_ustr, (sal_Unicode*)u"الف");
printf("%s", "rtl_uString: ");

Characters and Strings in Windows

For handling Unicode characters, we use wide characters in Windows. The wide character type wchar_t and wchar_t[] strings are based on it. The C++ versions of this string types is std::wstring.

This code is Windows-specific:

//Windows specific
#ifdef _WIN32
std::wstring w_string = L"الف";
wprintf("std::wstring: %ls\n", w_string.c_str());
printf("%ls\n", rtl_ustr->buffer);
#else
for(int i=0; ibuffer); ++i)
  printf("%lc", rtl_ustr->buffer[i]);
#endif
rtl_uString_release(rtl_ustr);

Please note that this code snippet is the continuation of the above code.

Characters and Strings in Qt

As LibreOffice provides Qt UI, there is a need to work with Qt data types. Specifically, QString is the string data type provided by the Qt library. The QString class provides a rich set of functions that are very useful to store and manipulate textual data in C++ applications that use Qt library.

For more information, refer to the QString page in the Qt 6 documentation:

https://doc.qt.io/qt-6/qstring.html

Code Sample

QString q_str = "ABC ا ب پ ت";
qDebug() << "QString: " << q_str;
qDebug() << q_str.length();

Additionally, LibreOffice provides GTK UI, thus there is also a need to work with GTK data type in the relevant source files. Specifically, the character data type used in the LibreOffice is the gchar, and the string data type gchar *.

Also, GString (GLib) is the struct suitable for storing and manipulating textual data. You can see its structure and utility functions in the glib manual:

https://docs.gtk.org/glib/struct.String.html

Code Sample

Here is a sample code, gchar.c:

#include 

int main(int argc, char *argv[])
{
    gchar *string1 = "Test";
    g_print("%s\n", string1);

    GString *string2 = g_string_new ("Hello");
    g_print("%lu\n", string2->len);
    g_print("%lu\n", strlen (string2->str));
    g_string_free(string2, TRUE);

    return 0;
}

You can compile it with:

gcc gchar.c -o gchar `pkg-config --cflags --libs glib-2.0`

Refactoring String Types

Not all the possible string data types are desirable. These are some of the refactoring done:

// This can be replaced with std::string
// https://gerrit.libreoffice.org/c/core/+/112980
std::unique_ptr<char[]> m_pFileName;

It is now converted to the std::string:

std::string m_sFileName;

There are situations where you have to pass a C string to a function in order to get some textual data from a C function. In such cases that changing the data is needed, you can use std::vector instead. For example:

std::vector vectorChar(10);
strncpy(vectorChar.data(), "ABCDEFGHIJ", 11);
printf("%s\n", vectorChar.data());

String Literals, Streams, Buffers and String View Types

These are the classes for the literals used in LibreOffice:

OStringLiteral
OUStringLiteral
QStringLiteral

These are the streams and buffers classes useful for creating temporary object for string manipulation:

std::stringstream
OStringBuffer
OUStringBuffer
QStringBuilder

At last, these are some of the stringview types used in the LibreOffice:

std::string_view
std::u16string_view

We will discuss about these types in the next blog posts.

by Hossein Nourikhah at January 13, 2023 11:00 AM

January 10, 2023

LibreOffice QA Blog

QA/Dev Report: December 2022

General Activities

  1. Rafael Lima continued polishing dark mode features and improved scrolling and zooming in the Basic code editor. He also improved help for ScriptForge
  2. Adolfo Jayme Barrientos updated the icons and colours in Help to match the new application icons
  3. Alain Romedenne improved help pages on built-in file dialogs
  4. Olivier Hallot (TDF) improved several extended tooltips and improved the help on cell references and cell addressing in Calc
  5. Bogdan Buzea improved the quality of the applause audio clip found in the gallery and made many string fixes and improvements in help and in the UI code
  6. Ilmari Lauhakangas (TDF) dropped the unnecessary name attribute from link elements in help with support from Christian Lohmaier
  7. Miklós Vajna (Collabora) added new commands .uno:GotoMark for jumping to a bookmark and .uno:UpdateBookmarks to update the content of a bookmark (helps especially with Zotero citations) and enhanced .uno:InsertBookmark and .uno:InsertField to allow specifying bookmark/refmark text. He also improved the Writer layout XML dump developer feature, improved the DOCX compatibility of paragraph marker formatting, fixed a layout issue related to bookmarks and fixed some Writer crashes.
  8. Jean-Pierre Ledure worked on the ScriptForge library
  9. Szymon Kłos, Andras Timar and Michael Meeks (Collabora) worked on LOKit improvements. Michael also fixed a macOS deadlock related to user input events
  10. Henry Castro (Collabora) added a mail merge unit test and made some code cleanups
  11. Eike Rathke (Red Hat) fixed an issue with date handling in Base, made it so line breaks are preserved in multi-line text when applying Formula to Value in Calc and fixed some crashes. He also improved the help for STYLE and INDEX Calc functions
  12. Tomaž Vajngerl (Collabora) polished support for document themes, for example adding the ability for reading theme colours from OOXML
  13. Julien Nabet fixed an issue with Base table UI, made Calc’s Paste Special dialog fully translatable, added an Nvidia GPU to Skia Vulkan denylist and fixed some crashes
  14. Jim Raykowski implemented a feature that highlights elements in a Writer document when selecting or hovering over their counterparts in the Navigator. He also made several other improvements to the Navigator, such as making it possible to delete references through it
  15. Andreas Heinisch made it so AutoText no longer inserts an additional empty paragraph, made bibliography entries appear sorted by identifier in Insert Bibliography dialog and improved the behaviour of input fields with a length restriction
  16. László Németh improved LibreLogo rendering speed and made it support more character formatting features. He also made it possible to check the spelling of hyperlinks, fixed an issue with comments disappearing from corrected misspelled words, added two options to spell checking dealing with compound words and fixed some regressions
  17. Xisco Faulí (TDF) continued refactoring automated tests, getting rid of much code duplication and created several new tests. He also improved the script used for downloading documents from online forums and fixed several crashes
  18. Michael Stahl (allotropia) continued improving the compliance of exported PDFs with Universal Accessibility standard, made DOCX export of bold attributes more robust and fixed some regressions
  19. Mike Kaganski (Collabora) made the code for setting property values safer, improved the new Math Sidebar panel, improved Visual Studio debugging experience, added support for hyphen-minus in style IDs. He also made many code cleanups and improvements to readability
  20. Caolán McNamara (Red Hat) continued polishing dark mode support, improved the opening performance of Application Colors option view, made it so localised font names match UI language instead of system locale, made text layouting more robust, added a button to remove all document events and made it possible to discover the causes of event-bound macro warnings through an infobar, made Statusbar in Writer show tooltips for sections and tables, made Calc’s sheet navigation and insertion buttons show tooltips and improved the Romanian AutoCorrect file. He also made many other UI-related improvements and crash fixes
  21. Stephan Bergmann (Red Hat) improved the debugging experience of unit tests. He also adapted the code to compiler changes and made many code and build-related cleanups as well as test fixes
  22. Noel Grandin (Collabora) improved the performance of SUMPRODUCT(IF..) in Calc and fixed an API usage issue with some chart UNO objects not advertising their types properly. He also made many code cleanups and general optimisations
  23. Justin Luth (Collabora) worked on VBA ContentControls support, improved the DOCX roundtripping of content controls, improved the indentation of list styles and made font and highlight colour toolbar buttons work in comments
  24. Paris Oplopoios (Collabora) added support for hidden status of range filter buttons in XLSX files, improved XLSX compatibility of charts and DOCX compatibility of content controls and made saving Writer documents with macros to Microsoft format conform to the DOCM file type requirement. He also improved Writer’s Accessibility checker
  25. Chris Sherlock made some code cleanups in vcl
  26. Maxim Monastirsky improved the handling of Draw table styles, for example making pasting action behave more intuitively
  27. Khaled Hosny (Alif Type) removed the bundled Source Serif/Sans/Code Pro, Kacst Book/Office fonts due to various issues, separated stylistics sets and character variants in the Font Features dialog, fixed the calculation of ascenders and descenders of some fonts upon PDF export, worked around an issue with strike out formatting of text using Liberation Serif font, improved the handling of different script types in various text previews and fixed an issue with gaps appearing after Kashida. He also made many renovations in font-related code
  28. Armin Le Grand (allotropia) improved the appearance of the blur effect with shadows and made refactorings in graphics handling code
  29. Taichi Haradaguchi upgraded some dependencies
  30. Daniel Lohmann made it so the presenter screen displayed as a normal window can also be shown on a single monitor
  31. Tibor Nagy (NISZ) fixed issues with tiled image sizes being reset in the Area tab, incorrect 3D shape properties in PPTX export and tiled background images in PPTX import
  32. Christian Lohmaier (TDF) made huge optimisations to the build performance of help and made many other build-related optimisations such as avoiding needless rebuilding of icon and gallery themes
  33. Kevin Suo fixed PDF import issues with Asian font settings not being loaded correctly and ligatures in RTL text being reversed incorrectly
  34. Thorsten Behrens (allotropia) made some build-related improvements and fixed a Writer unit test
  35. Arnaud Versini made some code cleanups
  36. Nick Wingate (Collabora) worked on the JavaScript dialog code used by Collabora Online
  37. Tor Lillqvist (Collabora) worked on the WASM build
  38. Chenxiong Qi ported many Java SDK examples to Python
  39. Tünde Tóth (NISZ) fixed an issue with charts getting lost upon DOCX export
  40. Galdam Jitsu replaced application and mime type icons with newly designed ones
  41. Patrick Luby (NeoOffice) fixed many macOS issues, including a printing issue with the Skia graphics engine and crashes and hangs. He also implemented support for the macOS press-and-hold functionality for special character input and made the macOS installation process faster by switching from bzip2 to lzfse compression in the .dmg file
  42. Tarcísio Ladeia de Oliveira fixed some unit test issues
  43. Aurimas Fišeras made some cleanups in configure.ac
  44. Povilas Kanapickas implemented support for touchpad zoom gestures
  45. Đoàn Trần Công Danh made a Boost 1.81.0 compatibility fix
  46. Attila Szűcs (Collabora) fixed conditional border colour not being exported to XLSX
  47. Dennis Francis (Collabora) made PDFium-based import of PDF files more robust
  48. Roman Kuznetsov added Duplicate Page command to Draw’s page pane context menu
  49. Michael Weghorn fixed a KDE UI issue in the BASIC Dialog Editor and worked the Android build
  50. Ilhan Yesil fixed an issue with the size of wizard pages created using the UNO API
  51. Vasily Melenchuk (CIB) made handling of invalid styles in RTF files more robust and implemented checking of Windows Security Zones to determine macro security level
  52. Brett T. Warden (Intel) made the SVG conversion method of QR codes compatible with the latest library version

Kudos to Ilmari Lauhakangas for helping to elaborate this list.

Reported Bugs

437 bugs, 53 of which are enhancements, have been reported by 260 people.

Top 10 Reporters

  1. BogdanB ( 35 )
  2. Eyal Rozenberg ( 22 )
  3. Mike Kaganski ( 16 )
  4. Stéphane Guillou (stragu) ( 15 )
  5. Rafael Lima ( 8 )
  6. rferraro ( 8 )
  7. steve ( 7 )
  8. Robert Großkopf ( 6 )
  9. خالد حسني ( 6 )
  10. Telesto ( 6 )

Triaged Bugs

583 bugs have been triaged by 65 people.

Top 10 Triagers

  1. Buovjaga ( 147 )
  2. Stéphane Guillou (stragu) ( 89 )
  3. Dieter ( 42 )
  4. m.a.riosv ( 37 )
  5. Heiko Tietze ( 26 )
  6. Alex Thurgood ( 22 )
  7. V Stuart Foote ( 22 )
  8. خالد حسني ( 19 )
  9. Mike Kaganski ( 17 )
  10. Julien Nabet ( 17 )

Resolution of resolved bugs

534 bugs have been set to RESOLVED.

Check the following sections for more information about bugs resolved as FIXED, WORKSFORME and DUPLICATE.

Fixed Bugs

146 bugs have been fixed by 31 people.

Top 10 Fixers

  1. Caolán McNamara ( 27 )
  2. Khaled Hosny ( 9 )
  3. Bogdan B ( 8 )
  4. Patrick Luby ( 8 )
  5. László Németh ( 7 )
  6. Rafael Lima ( 6 )
  7. Tünde Tóth ( 5 )
  8. Julien Nabet ( 5 )
  9. Michael Stahl ( 5 )
  10. Tibor Nagy ( 5 )

List of high severity bugs fixed

  1. tdf#142147 File->Save As: “Save with password” is deselected by default for password-protected documents ( Thanks to Justin Luth )
  2. tdf#146842 All pages are empty/white when printing (skia, macOS only) ( Thanks to Patrick Luby )
  3. tdf#146875 Writer: ToC Index updating hangs ( Thanks to Michael Stahl )
  4. tdf#151842 Font “Base size” reverts to sm config default of 12pt after reloading any formula (OLE object and standalone document) ( Thanks to Xisco Fauli )
  5. tdf#151894 FILEOPEN a Base Document with customized event for open a startform by “open document” LO stuck ( Thanks to Stephan Bergmann )
  6. tdf#152434 FILEOPEN:PPTX: Images not displayed ( Thanks to Tibor Nagy )
  7. tdf#152520 Crash: if macro uses module TITLE_CASE or SENTENCE_CASE in Transliteration module ( Thanks to Julien Nabet )
  8. tdf#152606 Crash if I open the specified pptx file ( Thanks to Julien Nabet )
  9. tdf#152717 DDE linking in calc is broken since 7.4.3 RC1 ( Thanks to Mike Kaganski )
  10. tdf#42437 Enable the macOS press-and-hold functionality for special character input (é, ñ, etc.) ( Thanks to Patrick Luby )

List of crashes fixed

  1. tdf#145843 Incidental Crash on macOS with skia raster (STR comment 8) ( Thanks to Patrick Luby )
  2. tdf#146765 Base Form – crash when scrolling in dual form & “data as table” display (macOS Arm) ( Thanks to Patrick Luby )
  3. tdf#152495 crash when closing ruby (phonetic guide) dialog with escape (gtk3) ( Thanks to Caolán McNamara )
  4. tdf#152520 Crash: if macro uses module TITLE_CASE or SENTENCE_CASE in Transliteration module ( Thanks to Julien Nabet )
  5. tdf#152606 Crash if I open the specified pptx file ( Thanks to Julien Nabet )
  6. tdf#82115 Repeatable crash/hang entering Japanese into a Writer comment on OSX ( see comment 4 ) ( Thanks to Patrick Luby )

List of performance issues fixed

  1. tdf#105575 Slow rendering when using a Logo command ( Thanks to László Németh )
  2. tdf#152301 slow opening of Options > Application Colors ( Thanks to Caolán McNamara )

List of old bugs ( more than 4 years old ) fixed

  1. tdf#105575 Slow rendering when using a Logo command ( Thanks to László Németh )
  2. tdf#120190 Data “Formula to Value” don’t preserve line break with multi-line text value ( Thanks to Eike Rathke )
  3. tdf#121297 LO Impress: “JPG Quality” overlapping with “Reduce image resolution” in Presentation Minimizer Wizard in some GTK3 ( Thanks to Caolán McNamara )
  4. tdf#42437 Enable the macOS press-and-hold functionality for special character input (é, ñ, etc.) ( Thanks to Patrick Luby )
  5. tdf#45949 SPELL check does not work for words with hyperlink ( Thanks to László Németh )
  6. tdf#53023 AutoText (text only) embeds extra carriage return ( Thanks to Andreas Heinisch )
  7. tdf#65535 Correcting a misspelled word with a comment in the middle erases the comment (see comment 38) ( Thanks to László Németh )
  8. tdf#82115 Repeatable crash/hang entering Japanese into a Writer comment on OSX ( see comment 4 ) ( Thanks to

by x1sc0 at January 10, 2023 10:53 AM

January 04, 2023

Michael Meeks

2023-01-04 Wednesday

  • Back to work, mail chew - encouraged by a lovely speedup from Noel for our projection spreadsheet: seconds to tens of milliseconds to edit; nice.
  • Sales calls, sync with Gokay & Andras, worked on project description pieces. J. took down decorations.
  • Call with Ben & Kendy on our hiring pipeline - if you'd like a job around Collabora Online & LibreOffice technology you can checkout Collabora careers.
  • Bit of hacking until late, improving profiling & tracing.

January 04, 2023 09:00 PM

allotropia

Improving LibreOffice’s list numbering feature

Numbering and bullet list are a core feature of every word processing application, and naturally LibreOffice Writer has gazillion options in that area. Of course, Writer can also handle multilevel lists:

  1. First line, first level
    1. Second line, second level
    2. Third line, second level
      1. Fourth line, third level
      2. etc etc

Now, how are these lists stored in ODF? Each level defines a num-prefix (what will be written before numbering), a num-suffix (same as prefix, but appended after the number), and display-levels – determining how many previous levels will be in list:

<text:list-level-style-number
text:level="3"
style:num-prefix="&gt;&gt;"
style:num-suffix="&lt;&lt;"
style:num-format="1"
text:display-levels="3">

In this example, we define a format for the third list level (in a numeric format), with displaying of all 3 levels and >> & << as a prefix/suffix. The output in Writer then looks like this: “>>1.2.3<<”

This is a nice and concise representation for many Western use-cases. But what can we do in this example:

arabic numbered list

Or in this case (https://bugs.documentfoundation.org/show_bug.cgi?id=116883):

One possible simple solution: we add a configurable number delimiter. In most cases, we would separate level numbers by “.” (and this was hard-coded in LO previously). For other cases, we should use “-” or “/”.

But before getting ahead of ourselves, lets first take a look what Word and DOCX does here:

Hmm, so Word does something completely different here: instead of a prefix/suffix, it uses an elaborate formatting string for numbers, where we can define any random prefix and suffix, plus arbitrary delimiters between different level numbers! We can even omit some numbers or worse, change their order of appearance (it is unclear how much sense that makes, but surely someone is now (mis)using that feature out there in documents).

And this is stored in DOCX in a rather simple xml attribute:

<w:lvlText w:val="%1-%2-%3-%4-"/>

Instead of prefix, suffix, display-levels and some additional separators, this has just one property, which at the same time provides much more flexibility.

Since LibreOffice 7.0, we are now using this lvlText (list format string) as an internal representation for documents (https://git.libreoffice.org/core/+/7459b9ecb54a298f02d19089620149718f8d8d48). This is enough to correctly load and save DOCX/DOC/RTF files, like the one from the screenshot above.

But we need to go further. If we save such DOCX files to ODT, more complex list level formattings will be lost.

Starting with LibreOffice 7.2, and with commit https://gerrit.libreoffice.org/c/core/+/117156/16, LibreOffice now features something quite similar to the DOCX properties: a new loext:num-list-format, which is obsoleting the older, less expressive num-prefix, num-suffix and text:display-levels attributes.

Unlike in DOCX instead of placeholders like “%1”, “%2”, this new ODF property is using “%1%”, “%2%”, etc. So why is that? Well in Word you can define up to 9 levels of list numberings, and %1 – %9 are enough for this representation. In LibreOffice, there are at least 10 levels, but even more ODF strives to be implementation-independent – so any hard limits here are anathema. Since format strings like “%10” are ambiguous (is it the “%1” placeholder with a “0” suffix, or is it the “%10” placeholder?) – the ODF specification uses the “%” delimiter on both sides of the placeholder.

Further improvements here include incorporating also style:num-format, to define numbering types for each level independently, in a way similar to the classical printf() format strings, in use with many programming languages.

The new num-list-format property is proposed for inclusion in ODF 1.4, but while this standard update slowly proceeds towards ratification, LibreOffice is meanwhile using its own namespace for it.

Work in this area is ongoing. Further efforts are needed:

  • LibreOffice’s UI need an update, to at least optionally allow list format string editing. Right now it is still using the old prefix/suffx edit boxes, where values are extracted from the list format string.
  • more refactoring of the Writer model – list format strings are still an optional element in list level definitions, and there are scenarios that need fallbacks if it is missing
  • more bugfixing of course – although the newest LibreOffice 7.4 / 7.5 beta are in fairly good shape, also thanks to the work of many other contributors
  • for reference, there’s a wiki page now to collect ToDo items around improving numbering support

by allotropiasoft at January 04, 2023 06:05 PM

January 03, 2023

Michael Meeks

2023-01-03 Tuesday

  • Some mail chew, sync with Andras, helped to seal some annoying wooden windows, tidied the house somewhat. Helped H. machine some aluminium to repair her dead Beats headphones. Up rather late working on some maths with Miriam. A more successful day off.

January 03, 2023 09:00 PM

LibreOffice Dev Blog

Happy new year 2023!

Happy new year 2023! I wish a great year for you, and the global LibreOffice community.

Here I breifely discuss the year 2022 around the development blog, and the outlook for 2023.

In 2022, I wrote 22 posts around LibreOffice development in this blog. (Some of them are drafts which are not yet published). I hope that my published posts were useful for you to undertsand LibreOffice code better, and to get involved in LibreOffice core development.

At The Document Foundation (TDF), our aim is to improve LibreOffice, the leading free/open source office software that you and many other people around the world use. Our work is community-driven, and we need your help.

Happy new year to the LibreOffice community

Happy new year to the LibreOffice community

These are some the topics I want to discuss in 2023:

  1. Various data types in LibreOffice
  2. LibreOffice build system (gbuild)
  3. New EasyHacks
  4. Fixing crashes
  5. Creating user interfaces with VCL
  6. LibreOffice core development guide
  7. SDK development guide

I will be happy if you provide feedback to me in a comment here, or via email. You can email me using hossein AT libreoffice DOT org.

As you may know, I provide mentoring to those who want to start LibreOffice development. You can contact me if you need help via the above email address.

Have a great time!

by Hossein Nourikhah at January 03, 2023 02:08 PM

Miklos Vajna

Improved number portion formatting in Writer

Number portions generated when using lists/numberings/bullets in Writer now can have formatting which is preserved in ODT files as well.

First, thanks Docmosis for funding this work by Collabora.

Motivation

Word and DOCX files support explicit character properties for the paragraph marker, and these are also used for the formatting of a number portion if the paragraph has one. This was already loaded from / saved to DOCX, but it was lost when saving to ODT.

Results so far

First, we got a bug document, where the reference rendering and our rendering differed:

Reference (on the left) and our old (on the right) rendering, due to bookmarks

In this case, what happened was that part of the heading text was covered by a bookmark, so we first created multiple character ranges (outside the bookmark, inside the bookmark), then as an optimization we even unified them to be a single formatted character range, covering the entire paragraph. This was a document model that is different from the bookmark-free version, where the character formatting was set on the paragraph itself.

This was fixed at render time and at DOCX export time to consider both full-paragraph character ranges and in-paragraph character properties. For a while, this looked like the entire story, since this now looks good in Writer:

Our new rendering, handling bookmarks

A bit later another, related bug was discovered. Given a reference document:

Reference rendering of a second document

Just opening this DOCX file in Writer, it looked like this:

Old rendering in Writer

Note how the first number portion turned into bold! This was expected after the above layout change to consider full-paragraph formatted character ranges, but it also meant that Word can have one set of character formatting for the entire character range of a paragraph, and another for the paragraph marker.

To make the problem worse, this second document was showing that even the ODT export/export feature had problems, still:

Old rendering in Writer after ODT save + load

The fix to solve all of the above was to undo the previous render / DOCX export change, then teach the ODT export to explicitly save the paragraph marker formatting (as an empty span at the end of the text node) to ODT, and also to load it back.

This means that now Writer can render the second document correctly, without breaking the first document:

New rendering in Writer

How is this implemented?

If you would like to know a bit more about how this works, continue reading... :-)

As usual, the high-level problem was addressed by a series of small changes:

Want to start using this?

You can get a snapshot / demo of Collabora Office 22.05 and try it out yourself right now: try the unstable snapshot. Collabora intends to continue supporting and contributing to LibreOffice, the code is merged so we expect all of this work will be available in TDF's next release too (7.6).

by Miklos Vajna at January 03, 2023 07:30 AM

January 02, 2023

Michael Meeks

2023-01-02 Monday

  • A day off - planning calls during the morning; sync. with Andras. Out for a run with J - partner call & special pricing call, some of the afternoon off.

January 02, 2023 09:00 PM

January 01, 2023

Michael Meeks

2023-01-01 Sunday

  • All Saints - music with H. home, sogging action, more Jack Ryan.

January 01, 2023 09:00 PM

December 31, 2022

Michael Meeks

2022-12-31 Saturday

  • Interrupted sleep; bid a fond 'bye in the morning, drove home. Went shopping with J. slugged around trying to fix this and that around the house. Binge watched Jack Ryan with J.

December 31, 2022 09:00 PM

December 27, 2022

LibreOffice QA Blog

LibreOffice 7.5 RC1 is available for testing

LibreOffice 7.5 will be released as final at the beginning of February, 2023 ( Check the Release Plan ) being LibreOffice 7.5 Release Candidate 1 (RC1) the third pre-release since the development of version 7.5 started in mid June, 2022. Since the previous release, LibreOffice 7.5 Beta1, 213 commits have been submitted to the code repository and 70 issues got fixed. Check the Release Notes to find the new features included in this version of LibreOffice.

LibreOffice 7.5 RC1 can be downloaded for Linux, macOS and Windows, and it will replace the standard version.

In case you find any problem in this pre-release, please report it in Bugzilla ( You just need a legit email account in order to create a new account ).

For help, you can contact the QA Team directly in the QA IRC channel or via Matrix.

LibreOffice is a volunteer-driven community project, so please help us to test – we appreciate it!

Happy testing!!

Download it now!

by x1sc0 at December 27, 2022 10:32 AM

December 21, 2022

LibreOffice Dev Blog

UNO Data types in code and API

alsVarious data types are used in LibreOffice code and also in LibreOffice API. Here we discuss some of these data types, which are important when you are working with LibreOffice code and API.

You should know that LibreOffice API can be used from many languages, but here we only focus on C++. LibreOffice uses a component model called UNO (Universal Network Objects), which is designed to provide an environment for accessing network objects from different languages. The data types that we discuss here are among UNO data types.

UNO Data Types

The data types used in LibreOffice API are called UNO data types. They are also used extensively inside the LibreOffice code. Here we discuss the fundamental UNO data types.

Numerical/Character Data Types

First, let’s talk about simple UNO data types. If you take a look at the below table from the LibreOffice Developer’s Guide, chapter 1: First Steps you will see that it shows the numerical/character data types. When working with LibreOffice API, we do not simply use byte, short, long, int and other underlying C++ data types, but rather data types defined in LibreOffice. Those include sal_Int8, sal_Int16, sal_Int32 and their unsigned counterparts, sal_uInt8, sal_uInt16, sal_uInt32. In the past, sal_Bool was used for the boolean variables, but it is now deprecated and we simply use bool data type.

The table shows detailed information about these UNO data types, and how they are mapped into several programming languages:

Table 1: Mapping simple UNO data types to data types in different programming languages

UNO Type description Java C++ Basic
void empty type, used only as method return type and in any void void
boolean Boolean type; true and false boolean bool
(sal_Bool is deprecated)
Boolean
byte signed 8-bit integer type byte sal_Int8 Integer
short signed 16-bit integer type short sal_Int16 Integer
unsigned short unsigned 16-bit integer type (deprecated) sal_uInt16
long signed 32-bit integer type int sal_Int32 Long
unsigned long unsigned 32-bit integer type (deprecated) sal_uInt32
hyper signed 64-bit integer type long sal_Int64
unsigned hyper unsigned 64-bit integer type (deprecated) sal_uInt64
float IEC 60559 single precision floating point type float float (if appropriate) Single
double IEC 60559 double precision floating point type double double (if appropriate) Double
char 16-bit Unicode character type (more precisely: UTF-16 code units)- char sal_Unicode

Character and String Data Types

Another important data type is sal_Unicode, which is used instead of char for storing Unicode character data. In C/C++, for storing strings we use OUString which can store Unicode data. As DevGuide says, LibreOffice Basic strings are mapped to UNO strings transparently. So, you don’t have to worry about converting strings to OUStrings back and forth. But in C++, you have to do the conversion from other string types yourself. We will discuss strings in a separate blog post.

UNO Description Java C++ Basic
string Unicode string type (more precisely: strings of Unicode scalar values) java.lang.­String rtl::OUString String

Enums, Structs, Sequences and Any Data Types

In C++, we use enums like ::com::sun::star::table::CellVertJustify, but because we have the shortcut css defined as com::sun::star, we can simply use ::css::table::CellVertJustify, or if we know that there will be no collision, css::table::CellVertJustify. If you add using css::table to the top of your source file, you can simply write CellVertJustify, but we don’t usually do that to avoid collision in the namespace.

One interesting data type for the LibreOffice API is the Any data type. It can be used to hold an arbitrary UNO data type. In the C++ Draw SDK example, you can see this code:

Reference xSPS(xShape, UNO_QUERY);
try
{
    xSPS->setPropertyValue("FillColor", Any(getCol(r, g, b)));
            xSPS->setPropertyValue("Shadow", Any(true));
}
catch (Exception e)
{
    std::cout << "Can not change shape colors." << std::endl << e.Message << std::endl;
    exit(1);
}

This code snippet tries to change the color of a shape. Using Any(value), the color and the shadow usage of a shape is set in the XPropertySet UNO reference variable queried from xShape. If that fails, an exception handler will handle the situation.

As DevGuide describes, a Sequence is a “homogeneous collection of values of one UNO type with a variable number of elements”. In the Convertor SDK example, when trying to set the properties for a DOC -> PDF conversion, one can write this code to set the output properties needed to export a document to PDF. As you can see, 3 PropertyValues are set, each having a Name and a Value,

auto storeProps = Sequence<PropertyValue>(3);
storeProps[0].Name = "FilterName";
storeProps[0].Value <<= OUString("writer_pdf_Export");
storeProps[1].Name = "Overwrite";
storeProps[1].Value <<= true;
storeProps[2].Name = "SelectPdfVersion";
storeProps[2].Value <<= 1;
xStorable->storeToURL(sPDFUrl, storeProps);

The struct is another data type used in LibreOffice API. It can contains several elements in a record. For example, PropertyValue is a struct, defined in com/sun/star/beans/PropertyValue.hdl header file as:

struct SAL_DLLPUBLIC_RTTI PropertyValue {
    inline PropertyValue();

    inline PropertyValue(const ::rtl::OUString& Name_, const ::sal_Int32& Handle_, const ::css::uno::Any& Value_, const ::css::beans::PropertyState& State_);

    ::rtl::OUString Name;
    ::sal_Int32 Handle;
    ::css::uno::Any Value;
    ::css::beans::PropertyState State;
};

It is important to understand that the above header is a generated file. The UNOIDL (UNO Interface Definition Language) are used to specify UNO objects just like IDLs in CORBA or other similar technologies. The above C++ header file is generated automatically from the language independent definition IDL file udkapi/com/sun/star/beans/PropertyValue.idl defined as:

module com {  module sun {  module star {  module beans {

published struct PropertyValue
{
    string Name;
    long Handle;
    any Value;
    com::sun::star::beans::PropertyState State;
};
}; }; }; };

I will discuss IDL files in the next blog posts.

Further Reading

You can find valuable information for LibreOffice programming in the book LibreOffice Development Guide (LO DevGuide in short). Please refer to the below link to see its table of contents:

Also, the C++ section of LibreOffice examples provides a good starting point for working with LibreOffice API. It is also a starting point for understanding some parts of the LibreOffice code:

If you are building from source code, you will find C++ SDK examples in instdir/sdk/examples/cpp/ inside core source folder. Further information regarding using LibreOffice SDK examples are available in my previous blog post:

Working with LibreOffice SDK Examples

by Hossein Nourikhah at December 21, 2022 09:07 AM

December 15, 2022

LibreOffice QA Blog

LibreOffice 7.5 Beta1 is available for testing

LibreOffice 7.5 will be released as final at the beginning of February, 2023 ( Check the Release Plan ) being LibreOffice 7.5 Beta1 the second pre-release since the development of version 7.5 started in mid June, 2022. Since the previous release, LibreOffice 7.5 Alpha1, 353 commits have been submitted to the code repository and 116 issues got fixed. Check the Release Notes to find the new features included in this version of LibreOffice.

LibreOffice 7.5 Beta1 can be downloaded for Linux, MacOS and Windows, and it can be installed alongside the standard version.

In case you find any problem in this pre-release, please report it in Bugzilla ( You just need a legit email account in order to create a new account ).

For help, you can contact the QA Team directly in the QA IRC channel or via Matrix.

LibreOffice is a volunteer-driven community project, so please help us to test – we appreciate it!

Happy testing!!

Download it now!

by x1sc0 at December 15, 2022 10:17 AM

December 09, 2022

LibreOffice QA Blog

QA/Dev Report: November 2022

General Activities

  1. LibreOffice 7.3.7 was released on November 3
  2. LibreOffice 7.4.3 was released on November 24
  3. Rafael Lima made many improvements to how LibreOffice looks like in dark mode, grammar mistake colour configurable, made it so Macro Selector dialog remembers the last run macro, made the new LanguageTool feature more user friendly and improved some UI strings. He also improved help for Database Wizard, ODBC connection and frequently-used buttons
  4. Adolfo Jayme Barrientos made many string fixes in help and in the UI code as well as dialog layout improvements
  5. Alain Romedenne made improvements and additions to macro help pages as well as the ones dealing with LibreOffice’s own file dialog and remote file services
  6. Olivier Hallot (TDF) continued with help screenshot cleanups and improved the help pages for Writer toolbars, slide/page formatting and preview pane, change tracking and array formulas
  7. Laurent Balland improved the documentation about templates in extras/README
  8. Stéphane Guillou (TDF) made some help fixes
  9. Bogdan Buzea made many string fixes in help and in the UI code. He also improved help page contents and corrected menu item paths
  10. Miklós Vajna (Collabora) continued working on Writer content controls, made it possible to customise PDF watermark formatting and rotation and added support for semi-transparent text in imported SVGs
  11. Jean-Pierre Ledure worked on the ScriptForge library
  12. Tünde Tóth (NISZ) fixed issues with embedded objects and images in PPTX and DOCX files and fixed a compatibility issue with artistic effects in DOCX files
  13. Szymon Kłos, Mert Tumer and Mike Kaganski (Collabora) worked on LOKit improvements. Szymon also fixed an issue with rendering embedded PDF files with large pages
  14. Ashod Nakashian (Collabora) added support for embedded videos when exporting presentations to SVG
  15. Henry Castro (Collabora) fixed issues with mail merge documents containing hidden sections
  16. Eike Rathke (Red Hat) fixed an ODF backwards compatibility issue with Calc headers and footers, fixed an issue with formula caches of multiple open Calc documents getting mixed up, made CSV data format detection more robust and fixed an issue with dates being imported incorrectly from Calc into Writer database fields. He also made some help fixes
  17. Tomaž Vajngerl (Collabora) made many improvements to Writer accessibility checker
  18. Julien Nabet fixed a bunch of crashes and leaks and a problem with BMP export
  19. Jim Raykowski made many improvements to Writer’s Outline folding feature and the Navigator, including adding the ability to rename pages and objects in Draw/Impress directly in the Navigator and the ability to change the navigation order and grouping of objects by dragging and dropping
  20. Andreas Heinisch made window switching via VBA macros more robust and fixed an issue with selecting concordance files in the Table of Contents dialog
  21. László Németh improved native number formats, improved change tracking, fixed an issue with DOCX table formulas with comma delimiters and fixed an issue with extra lines in exported SVGs. He also fixed a couple of regressions
  22. Xisco Faulí (TDF) continued refactoring automated tests, getting rid of much code duplication and created several new tests
  23. Michael Stahl (allotropia) continued improving the compliance of exported PDFs with Universal Accessibility standard and worked on WASM build
  24. Mike Kaganski (Collabora) fixed DOCX corruption with a certain combination of input boxes and text boxes and implemented DOCX export support for glossary relations. He also made many code cleanups
  25. Caolán McNamara (Red Hat) continued polishing dark mode support, fixed some icon blurriness issues on Linux with HiDPI monitors, improved text kerning in comments, did a big cleanup on how symbol fonts are used and fixed text leaving traces behind when scrolling in Writer. He also made many other UI-related improvements and crash fixes
  26. Stephan Bergmann (Red Hat) made RTL text handling more robust and introduced two new Clang plugins to guard against problematic code. He also adapted the code to compiler changes and made many code and build-related cleanups as well as test fixes
  27. David Gilbert fixed a crash related to the creation of temporary files
  28. Noel Grandin (Collabora) improved the speed of loading certain PPT files, PDF export of Writer documents with big tables and saving complex drawings. He also made many code cleanups and general optimisations
  29. Justin Luth (Collabora) worked on VBA ContentControls support, made handling of comments in Writer tables more robust and started working on Calc row/column freezing improvements
  30. Paris Oplopoios (Collabora) improved XLSX compatibility on database-derived data, worked on accessibility checker and fixed an issue causing text clipping in EMF graphics
  31. Chris Sherlock continued refactoring UI rendering code and made some optimisations
  32. Maxim Monastirsky made it possible to manipulate and add Impress/Draw table styles via Sidebar
  33. Khaled Hosny (Alif Type) implemented instantiation of OpenType variable fonts upon PDF export and fixed an issue where fallback fonts using artificial italic would be exported into PDF as regular. He also made many renovations in font-related code
  34. Regina Henschel fixed an issue with PPTX WordArt using the wrong font and an issue with header and footer getting corrupted when saving a DOCX file
  35. Samuel Mehrbrodt (allotropia) added options to exclude hidden text from HTML and ASCII filters and made them the default, added a re-scan button to PDF accessibility checker dialog and added an option to place comments in margin upon PDF export of Writer documents
  36. Armin Le Grand (allotropia) improved the compliance of exported PDFs with Universal Accessibility standard and made refactorings in graphics handling code
  37. Taichi Haradaguchi upgraded some dependencies and fixed OpenSSL patches
  38. Daniel Lohmann made it possible to use presenter console in windowed mode in Impress and fixed some related mouse pointer issues
  39. Tibor Nagy (NISZ) fixed several PPTX import/export issues related to table borders, custom shapes and themes
  40. Balázs Varga (allotropia) optimised Calc’s row height adapting feature, worked on WASM Writer and made it so Calc’s autofilter also hides comments
  41. Hossein Nourikhah (TDF) fixed an assertion (seen in debug builds) when opening date pickers in DOCX files and fixed an issue with bitmap scaling
  42. Christian Lohmaier (TDF) worked on macOS app store packaging, including making Help play nice with browsers
  43. Áron Budea (Collabora) worked on DeepL Translate menu
  44. Kevin Suo continued polishing PDF import of RTL text, added Localization template category and a template for zh_CN and fixed issues with text grid
  45. Thorsten Behrens (allotropia) worked on WASM build
  46. Jan Holešovský (Collabora) fixed an issue with incorrect cropping of images in DOCX export
  47. Fred Kruse fixed a bug affecting autocorrected non-default quotation marks in certain languages
  48. Marco Cecchetti (Collabora) made it so footers and text fields are properly exported to SVG from Impress
  49. Tarcísio Ladeia de Oliveira fixed some PDFium automated tests
  50. Arnaud Versini improved the use of mutexes in the code
  51. Michael Meeks, Nick Wingate, Skyler Grey and Rashesh Padia (Collabora) worked on the JavaScript dialog code used by Collabora Online
  52. René Engelhard (Debian) made some build fixes
  53. Xuan Chen added support for riscv64 CPU architecture in the build system
  54. Andreas Kainz improved the layout of the chart Sidebar panel
  55. Henner Drewes fixed an issue with icons disappearing from Groupedbar and Groupedbar compact UIs
  56. Tor Lillqvist (Collabora) worked on the WASM build

Kudos to Ilmari Lauhakangas for helping to elaborate this list.

Reported Bugs

472 bugs, 51 of which are enhancements, have been reported by 291 people.

Top 10 Reporters

  1. Hossein ( 22 )
  2. Mike Kaganski ( 19 )
  3. Eyal Rozenberg ( 19 )
  4. NISZ LibreOffice Team ( 14 )
  5. Stéphane Guillou (stragu) ( 12 )
  6. Robert Großkopf ( 10 )
  7. BogdanB ( 9 )
  8. Gabor Kelemen (allotropia) ( 9 )
  9. Telesto ( 8 )
  10. Rafael Lima ( 7 )

Triaged Bugs

642 bugs have been triaged by 78 people.

Top 10 Triagers

  1. Stéphane Guillou (stragu) ( 104 )
  2. Buovjaga ( 103 )
  3. Heiko Tietze ( 74 )
  4. Dieter ( 40 )
  5. Roman Kuznetsov ( 34 )
  6. m.a.riosv ( 28 )
  7. raal ( 27 )
  8. V Stuart Foote ( 21 )
  9. Julien Nabet ( 20 )
  10. Alex Thurgood ( 17 )

Resolution of resolved bugs

547 bugs have been set to RESOLVED.

Check the following sections for more information about bugs resolved as FIXED, WORKSFORME and DUPLICATE.

Fixed Bugs

181 bugs have been fixed by 34 people.

Top 10 Fixers

  1. Caolán McNamara ( 24 )
  2. Bogdan B ( 17 )
  3. Rafael Lima ( 12 )
  4. László Németh ( 9 )
  5. Tibor Nagy ( 8 )
  6. Eike Rathke ( 8 )
  7. Samuel Mehrbrodt ( 7 )
  8. Julien Nabet ( 6 )
  9. Michael Stahl ( 5 )
  10. Kevin Suo ( 4 )

List of critical bugs fixed

  1. tdf#148435 LibreOffice on macOS hangs on using window snapping / window manager (BetterTouchTool, Rectangle, Raycast, Amethyst, …) or any other redraw, context switch, etc, from idle thread ( Thanks to Noel Grandin )

List of high severity bugs fixed

  1. tdf#152014 Wrong result with match function when multiple spreadsheets are opened ( Thanks to Eike Rathke )
  2. tdf#33495 Allow minimizing or resizing the presenter screen while presentation is active (UI) ( Thanks to Daniel Lohmann )

List of crashes fixed

  1. tdf#151608 Impress crashes after Impress Remote App Closed ( Thanks to dldld )
  2. tdf#151929 LibreOffice Crashes if Video Card Changed (Win nVidia GTX 670) ( Thanks to Julien Nabet )
  3. tdf#151979 Crash when changing Text Grid type after I switch from Calc to Writer window ( Thanks to Kevin Suo )
  4. tdf#152154 Crash in libmergedlo.so when Object Catalog undocked and BASIC IDE closed ( Thanks to Julien Nabet )
  5. tdf#152187 CRASH when opening Properties tab of Text Portion in UNO Inspector ( Thanks to Julien Nabet )

List of performance issues fixed

  1. tdf#147802 Clicking on header or footer area in long writer document takes a long time and slows down text selection and closing document ( Thanks to Caolán McNamara )

List of old bugs ( more than 4 years old ) fixed

  1. tdf#102914 Synthetic italic in fonts with partial coverage exported as regular in PDF ( Thanks to Khaled Hosny )
  2. tdf#107405 Setting fixed kerning (text spacing) is limited to -2pt ( Thanks to Samuel Mehrbrodt )
  3. tdf#108356 FILESAVE: Master slide background image set as tiled when exporting to PPTX ( Thanks to Tibor Nagy )
  4. tdf#108497 Instantiate OpenType variable fonts when embedding in PDF ( Thanks to Khaled Hosny )
  5. tdf#116566 Respect configured AutoSpellCheck colour in the dialog too ( Thanks to Rafael Lima )
  6. tdf#120405 EDITING: Clicking at ‘Open’ in the concordance file button in the ToC dialog vanishes the ‘Edit…’ command ( Thanks to Andreas Heinisch )
  7. tdf#33495 Allow minimizing or resizing the presenter screen while presentation is active (UI) ( Thanks to Daniel Lohmann )
  8. tdf#46444 Calc doesn’t filter any comments ( Thanks to Balazs Varga )
  9. tdf#47679 Copy + Paste changes “OpenSymbol” font to “StarSymbol” ( Thanks to Caolán McNamara )
  10. tdf#57423 PDF: “Description” and “Title/Text Alternative” is only PDF-exported for Images, but not for Shapes, Formula, Frames, and OLE Objects ( Thanks to Michael Stahl )
  11. tdf#67866 ACCESSIBILITY: Missing language information in exported PDF ( Thanks to Eike Rathke )
  12. tdf#70293 FILESAVE XLSX Grouping of shapes is lost on export ( Thanks to Tibor Nagy )
  13. tdf#77650 PDF Export dialog lacks options to position comments (as on Print dialog, e.g. in margin) ( Thanks to Samuel Mehrbrodt )
  14. tdf#92222 FILESAVE: Shapes with Default Line Width Changed on Roundtrip (MSO 2010+ theme defaults not preserved) ( Thanks to Tibor Nagy )

WORKSFORME bugs

75 bugs have been retested by 36 people.

Top 10 testers

  1. Stéphane Guillou (stragu) ( 8 )
  2. V Stuart Foote ( 8 )
  3. Dieter ( 8 )
  4. Telesto ( 6 )
  5. Buovjaga ( 5 )
  6. Aron Budea ( 3 )
  7. Robert Großkopf ( 3 )
  8. Roman Kuznetsov ( 3 )
  9. raal ( 3 )
  10. Julien Nabet ( 2 )

DUPLICATED bugs

124 bugs have been duplicated by 31 people.

Top 10 testers

  1. Stéphane Guillou (stragu) ( 28 )
  2. V Stuart Foote ( 17 )
  3. Heiko Tietze ( 13 )
  4. Buovjaga ( 11 )
  5. Alex Thurgood ( 10 )
  6. خالد حسني ( 4 )
  7. Roman Kuznetsov ( 4 )
  8. Dieter ( 4 )
  9. Jorge Teixeira ( 3 )
  10. Mike Kaganski ( 3 )

Verified bug fixes

55 bugs have been verified by 10 people.…

by x1sc0 at December 09, 2022 11:05 AM

December 08, 2022

Marius Popa Adrian

Firebird high-level native client for Node.js / TypeScript status status for Firebird Advent 2022

Firebird high-level native client for Node.js / TypeScript status status for Firebird / Typescript Advent 2022https://qiita.com/advent-calendar/2022/firebirdTo use the driver you can start with the readme from npm/githubhttps://www.npmjs.com/package/node-firebird-driver-nativeA few more examples are in the packages/node-firebird-driver/src/test directoryWe have seen several releases with a few

by Popa Adrian Marius (noreply@blogger.com) at December 08, 2022 12:15 PM

December 05, 2022

Miklos Vajna

Improved watermark in the PDF export

The PDF export now supports various additional properties for the optional PDF watermark.

First, thanks Docmosis for funding this work by Collabora.

Motivation

Rendering of a PDF watermark with custom rotation and color

When you hear the word "watermark", you probably have something like the above picture in mind.

Instead, what the PDF export had is more like a proof of concept:

Rendering of a PDF watermark with default settings

The request was to add new options to control the font size, font name, rotation angle and color of the watermark, so in case an organization already has a given style of watermarks they prefer, our PDF export can be adapted accordingly.

Results so far

First, now you can specify a custom color, e.g. gray (#7f7f7f), using:

soffice --convert-to pdf:writer_pdf_Export:'{"Watermark":{"type":"string","value":"draft"}, "WatermarkColor":{"type":"long","value":"8355711"}}' test.odt

Rendering of a PDF watermark with custom color

Then you can also customize the font size, in case the automatic size would not fit your needs, using:

soffice --convert-to pdf:writer_pdf_Export:'{"Watermark":{"type":"string","value":"draft"}, "WatermarkFontHeight":{"type":"long","value":"100"}}' test.odt

Rendering of a PDF watermark with custom font size

Or perhaps you want a serif font, not a sans one:

soffice --convert-to pdf:writer_pdf_Export:'{"Watermark":{"type":"string","value":"draft"}, "WatermarkFontName":{"type":"string","value":"Times"}}' test.odt

Rendering of a PDF watermark with custom font name

Finally you can have a custom rotate angle:

soffice --convert-to pdf:writer_pdf_Export:'{"Watermark":{"type":"string","value":"draft"}, "WatermarkRotateAngle":{"type":"long","value":"450"}}' test.odt

Rendering of a PDF watermark with custom rotation

Using these building blocks, you can also build combinations, the first screenshot above was created using:

soffice --convert-to pdf:writer_pdf_Export:'{"Watermark":{"type":"string","value":"draft"}, "WatermarkRotateAngle":{"type":"long","value":"450"}, "WatermarkColor":{"type":"long","value":"8355711"}}' test.odt

i.e. the configuration JSON is:

{
    "Watermark": {
        "type": "string",
        "value": "draft"
    },
    "WatermarkRotateAngle": {
        "type": "long",
        "value": "450"
    },
    "WatermarkColor": {
        "type": "long",
        "value": "8355711"
    }
}

How is this implemented?

If you would like to know a bit more about how this works, continue reading... :-)

As usual, the high-level problem was addressed by a series of small changes:

Want to start using this?

You can get a snapshot / demo of Collabora Office 22.05 and try it out yourself right now: try the unstable snapshot. Collabora intends to continue supporting and contributing to LibreOffice, the code is merged so we expect all of this work will be available in TDF's next release too (7.5).

by Miklos Vajna at December 05, 2022 04:07 PM

December 03, 2022

Marius Popa Adrian

node-firebird driver status for Firebird Advent 2022

node-firebird status for Firebird Advent 2022 https://qiita.com/advent-calendar/2022/firebird also for  Javascript Advent https://qiita.com/advent-calendar/2022/javascriptThis year we have seen several releases with a few features and changes :Version 1.1.0 Changes : Srp implementation by @maratth in #242Add optional callback for pool destroy by @Tomas2D in #244Set protocolVersion as optional in

by Popa Adrian Marius (noreply@blogger.com) at December 03, 2022 05:12 PM

November 29, 2022

LibreOffice Design Blog

Results from the survey about LibreOffice Impress

Similar to the questionnaires about LibreOffice Draw (see first and second blog post) and LibreOffice Calc (see this post) we now run a survey on LibreOffice Impress to learn how the program is utilized, what features are used most frequently, and what users see as positive and negative and what they expect of the future.…

by Heiko Tietze at November 29, 2022 03:18 PM

November 25, 2022

Marius Popa Adrian

LibreOffice Base can connect to an external Firebird server

LibreOffice Base can connect to an external Firebird server , here is an example with employee.fdb from Firebird 3 examples folder copied to c:\tmpTested with LibreOffice 7.4.x and Firebird 3 default install on Windows 11 (all 64 bits versions)and here is the Relation Design in LibreOffice Base

by Popa Adrian Marius (noreply@blogger.com) at November 25, 2022 02:52 PM

November 24, 2022

Caolán McNamara

macOS Dark Mode


For LibreOffice 7.5 I've reworked the theming on macOS to get some support for Dark Mode, as seen above. As a side effect "accent colors" work in Light Mode too.

by caolan (noreply@blogger.com) at November 24, 2022 03:39 PM

November 15, 2022

Jean Hollis Weber

Second edition of Designing with LibreOffice available for free download

Designing with LibreOffice coverBruce Byfield and Jean Hollis Weber announce the second edition of Designing with LibreOffice. The book is available as an .ODT or .PDF file under the Creative Commons Attribution/Sharealike License version 4.0 or later from https://designingwithlibreoffice.com/

The first edition was published in 2016, and was downloaded over thirty-five thousand times. Michael Meeks, one of the co-founders of LibreOffice, described the first edition as “an outstanding contribution to help people bring the full power of LibreOffice into their document.” Similarly, free software author and journalist Carla Schroder wrote, “Designing With LibreOffice teaches everything you need to know about document production…. suitable for beginners to wizened old pros, who will probably discover things about LibreOffice that they didn’t know.”

The second edition updates the original, removing outdated information and adding updated screenshots and new information about topics such as Harfbuzz font shaping codes, export to EPUB formats for ereaders, the Zotero extension for bibliographies, and Angry Reviewer, a Grammarly-like extension for editing diction. In the future, the writers plan to release other editions as necessary to keep Designing with LibreOffice current.

For more information or interviews, contact Bruce Byfield at bbyfield@axion.net.

by Jean at November 15, 2022 04:54 AM

November 04, 2022

Collabora Community

Collabora’s Contributions to the LibreOffice Conference 2022 in Milan

The Talks and Slides by Collaboran’s at the LibreOffice Conference 2022

The LibreOffice Conference 2022 (LibOCon) took place from September 28 to October 1 in Milan. It was the first LibreOffice Conference since the outbreak of the COVID-19 Pandemic that took place as an in-person event. Collabora was one of the sponsors, and a significant number of our developers contributed talks on various aspects of LibreOffice technology. Did you miss any of those? Don’t worry! All our talks are available for you on YouTube inside our LibOCon playlist. Please also feel free to download the slides we included in this blog post.

Keynotes and Advocating

Michael Meeks: Sponsor Keynote Collabora

Michael Meeks, Managing Director of Collabora Productivity, takes a look at the latest developments in LibreOffice from an organisational and ecosystem perspective. See details

Watch the talk
Download the slides

Michael Meeks: The ongoing story of Online

Hear Michael Meeks tell the history of LibreOffice in the browser. From it’s pre-historic past as StarPortal, through gtk-broadway prototypes, to Collabora Online as we know it today. See details

Watch the talk
Download the slides

Technical Talks

Sarper Akdemir: Chasing an Interoperability Bug in Impress

During the Quality Assurance track, Sarper Akdemir explained how to fix an interoperability bug by showcasing the whole process of understanding, fixing, and implementing tests. See details

Watch the talk
Download the slides

Tomaž Vajngerl: Sparklines and Chart Data Tables – New Features in Calc

Sparklines are mini charts, that are drawn into a cell. In his talk, senior software engineer Tomaž Vajngerl presented the features and the challenges during the development. See details

Watch the talk
Download the slides

Miklos Vajna : Content Controls in Writer

While LibreOffice and Collabora Office were already capable of filling forms via form controls or form fields, they can now also fully represent content controls. In this talk by Senior Software Engineer Miklos Vajna, see how this work was implemented! See details

Watch the talk
Download the slides

Follow Collabora


Collabora Productivity created Collabora Online, a powerful online office suite, which you can integrate into your own infrastructure. It prioritises your digital sovereignty and provides you with all the tools to keep your data secure, without compromising on features. Collabora provides a wide range of products, as well as consulting services for enterprises and governments. Powered by the largest team of certified LibreOffice engineers in the world, Collabora is a leading contributor to the LibreOffice Technology codebase and community. Collabora Office for Desktop and Collabora Online provide a business-hardened office suite with long-term support. Collabora’s multi-platform policy is completed with Collabora Office for iOS, Android, and Chrome OS. Collabora Productivity is a division of Collabora, the global software consultancy dedicated to providing the benefits Open Source to the commercial world, specializing in mobile, automotive and consumer electronics industries. For more information, follow us  on Twitter, LinkedIn and YouTube.

 

 

The post Collabora’s Contributions to the LibreOffice Conference 2022 in Milan appeared first on Collabora Office and Collabora Online.

by Marc Rodrigues at November 04, 2022 11:46 AM

November 03, 2022

Miklos Vajna

Content controls in Writer: titles and tags

Writer now supports titles and tags for content controls, which helps providing context for the filled in text even if the placeholder text is replaced already.

This work is primarily for Collabora Online, see the previous post for background.

Motivation

Rendering of a title for a content control

Once several content controls are added to a document, it's easy to forget what was the exact purpose of what content control. Think of a press release for example – those regularly start with a location and a date, but once this information is provided, one no longer knows which content control was for which content.

Titles solve this problem for the user: similar to Writer's header/footer buttons, this button appears when you enter the content control and reminds you what content is expected there, even if the placeholder is already replaced.

Tags serve a similar purpose, but they are unique, machine-readable keys or identifiers, so once the form is filled in, an external consumer can easily extract the information from the document, given a specific tag.

Results so far

Titles (also known as aliases) and tags are now not only preserved, but also we have a UI to create, show, edit and delete them. This is available in the desktop rendering and also in the LOK API.

Somewhat related, in case a content control breaks into multiple lines or has formatting to break into multiple text portions, we now only emit one PDF widget for it, taking the description of the widget from the content control's title.

The last related improvement is that now we handle data binding for date content controls, which means that you can specify a timestamp, a language and a date format, and we'll format that timestamp and update the content control's string value at import time from DOCX.

How is this implemented?

If you would like to know a bit more about how this works, continue reading... :-)

As usual, the high-level problem was addressed by a series of small changes:

Want to start using this?

You can get a snapshot / demo of Collabora Office 22.05 and try it out yourself right now: try the unstable snapshot. Collabora intends to continue supporting and contributing to LibreOffice, the code is merged so we expect all of this work will be available in TDF's next release too (7.5).

by Miklos Vajna at November 03, 2022 12:37 PM

November 01, 2022

LibreOffice Design Blog

Community support needed: We want to use our users personal data

What comes to your mind, when you ask yourself why people use LibreOffice? A “stunning user experience” is likely not in the top list. And unfortunately we share this problem with a lot of user facing Free Software.

And there is a common reason: We value the privacy of our users.

by Heiko Tietze at November 01, 2022 03:16 PM

October 31, 2022

Collabora Community

Meet Abi – Collabora Software Engineering Intern

Collabora recruits interns to work over the summer alongside our team, and to build experience to help them assess whether they want to pursue a career in Software Engineering, but how does that work out? Meet Abi, mentored by Mert and Pedro, and intern behind the new SDK example in .NET¹. Lets hear from her:

Tell me about yourself!

I’m Abi, I’m studying Maths, Physics, Computer Studies and Media Studies at sixth form. I’ve been involved with the Army Cadets since 2017 and hope to join the Army Cyber Warfare Division after university.

When did you first become interested in coding?

I’ve grown up in a household that’s centralised around technology and found a passion for coding when studying Maths – I found I was quite good at it! I really enjoy the theory side of Computer Science, learning algorithms and how things are put together. I realised this more through the work I did at Collabora.

What’s your favourite project you’ve worked on?

I love to start new projects but often find I don’t quite finish them! I either get stuck or I just don’t have time to finish them before I’ve started a new one. Working at Collabora, I actually managed to finish my projects which is a big achievement I hope to continue with.

What have you been doing over the Summer?

It’s been a mixture of school work, camping holidays along the Norfolk coast and doing the Collabora Internship.

What have you been working on?

I’ve been creating an SDK example with .NET.

What is SDK? How can that be useful?

It’s a basic version of the Collabora Online space using a different framework. If someone wanted to start building on COOL in a certain language, they can start to understand how the communication happens between the server and the computer it’s run on. Then they can build what they need on top of it in a multitude of languages.

Why did you want to spend your Summer at Collabora?

I mainly wanted to gain experience so I could make sure I was going into the right career path. I also wanted to do it because it would look good on my university application and personal statement.

What did you learn from your time at Collabora?

How to learn by myself but also when to ask for help when needed. I really learnt a lot about what I need to work on as both a Software Engineer and as a person so I can grow in both areas. It’s also the first time I’ve felt I’ve fully understood a (programming) language, which has given me more confidence.

Would you recommend an internship at Collabora to others interested in a career in technology?

Definitely! I think it was a good learning experience – it taught me personally what I want, and gave me a good insight into what a professional setting is like compared to an academic environment.

 

It’s great to see Abi’s work merged as a fresh new SDK example and to see how she has grown over the Summer.

Why not get involved? We love to work alongside the next generation to help them discover what a career in Software Engineering might look like. If you’ve ever considered it for yourself, get in touch today!

The post Meet Abi – Collabora Software Engineering Intern appeared first on Collabora Office and Collabora Online.

by Naomi Obbard at October 31, 2022 12:55 PM

October 28, 2022

Jean Hollis Weber

LibreOffice on the Microsoft Store

LibreOffice is now available for download from the Microsoft Store, for those users who choose or are required to get their desktop software from that channel. A small fee is charged. Here is the link.

This follows the recent release of LibreOffice through Apple’s App Store.

LibreOffice for Windows, macOS, and Linux continues to be free of charge from the LibreOffice website.

Blog post is here.

by Jean at October 28, 2022 05:37 AM

October 17, 2022

Collabora Community

It’s a Wrap! COOL Days 2022 was a Sky High Success!

 

Thank you to all who attended our COOL Days meet up in Berlin on 3rd-5th October. We had a great time organising this for our Partners, Collabora team and open source community. It was a great success and we can’t wait to do it again!

If you didn’t manage to make it this time, check out our first YouTube short which shows a 2 minute overview of our amazing time in Berlin.


Community Day

On the Monday 3rd October we had our Collabora Productivity Community Team Building Day. This was a great chance to meet some of our Partners, and for the Collabora team to meet up after 3 years of travel restrictions. Many met in person for the first time and bonded over their love for retro computer games, competitive table football and the thrill of indoor skydiving!

Partner Day

Tuesday 4th October was our Partner Day, hosted at the Alexander Plaza Hotel. What a privilege it was to have Peter Ganten from Univention talk with us about his work to promote Digital Sovereignty, as well as hearing from members of the Collabora team about what we have been working on over the last year to build Collabora Online. We discussed the development road map for 2023 and had open discussions with our Partners about how we can support them and build closer relationships so we can work together even more successfully.

Meanwhile, the development community were taking part in a Hackfest at the bUm thanks to Nextcloud.

Technical Day

We all met at the bUm for our Technical Day on Wednesday 5th October. Some of our engineers, Partners and contributors presented lightning talks to show the latest developments happening at Collabora Online. It was a key chance for the community to speak directly with the engineers behind CODE and COOL, ask questions and input into the roadmap.

If you interested in seeing the slides from our lightning talks we’ve made them available on github:

COOL Days Slides

UX and Community Manager, Pedro, also blogged about our time there:

Pedro’s Blog

You may have seen some of our team live tweeting from the event – follow us on Twitter to see updates from events and conferences throughout the year.

 

We hope to see you at our next COOLDays event

 

Keep an eye out for where we’ll be next:

FOSDEM

February 4 - 5, 2023 – Brussels, Belgium

CS3

March 6 - 8, 2023 – Barcelona, Spain

COOL Days

March 28 - 29, 2023 – Cambridge, UK

The post It’s a Wrap! COOL Days 2022 was a Sky High Success! appeared first on Collabora Office and Collabora Online.

by Naomi Obbard at October 17, 2022 12:32 PM

October 14, 2022

Collabora Community

Meet Christopher – Collabora Software Engineering Intern

 

Collabora recruits interns to work over the summer alongside our team, and to build experience to help them assess whether they want to pursue a career in Software Engineering, but how does that work out? Let’s hear from Christopher:

Tell me about yourself!

My name is Christopher and I am currently studying Physics, Maths and Computer Science. I’ve been doing a fair amount of programming for around 4 or 5 years at home, mainly self-taught. I’ve also learnt a lot from my Dad who works as a Software and Hardware Engineer and my Grandad who is a Physicist. Outside of coding, I’ve been teaching myself to play guitar for the last year.

When did you first become interested in coding?

It was Christmas 2018 – I’d been given a coding task from my Computer Science teacher at school to make a simple game (Battleships) and I found it really interesting. As I was working on it, I got thinking how I could make it better, so I added databasing and networking functionality to it.

What’s your favourite project you’ve worked on?

The most enjoyable things for me are the functionality improvements I’ve been working on over the Summer with Collabora. I’ve made small UI changes that have made a meaningful difference to the end users.

What else have you been working on over the Summer?

I solved an existing bug with toggling elements in the notebook bar and also worked on the ability to toggle Dark Mode. I started the template for the Admin Console, creating a foundation for clustered diagnosis.

Why did you want to spend your Summer at Collabora?

I was told it would be valuable to get work experience in technology to help with my University application, and in the future it would look good on my CV. I originally heard about the Internship from the Computer Science department at my school – Michael Meeks came in to do a talk and I was inspired by his charisma. It made me excited to spend the Summer working on my skills through working at Collabora.

What did you learn from your time at Collabora?

The most valuable thing for me was learning how to work as part of a team. It’s hard to get this experience at GCSE and A Level as you’re only really given small personal projects.

What do you want to be working on in the future?

I don’t really know exactly what I want to work on yet! There’s so many different things you can do which is what attracted me to the industry. Having the skills is a real door opener and transferable across many industries.

Would you recommend an internship at Collabora to others interested in a career in technology?

Absolutely! It was challenging but stimulating – I’m very thankful for a great opportunity and to Pedro and Pranam for the skills they’ve taught me.

 

Christopher has been continuing to work on some projects for Collabora during his final year of college. We are excited to see what other UI improvements will be made over the coming months.

Why not get involved? We love to work alongside the next generation to help them discover what a career in Software Engineering might look like. If you’ve ever considered it for yourself, get in touch today!

The post Meet Christopher – Collabora Software Engineering Intern appeared first on Collabora Office and Collabora Online.

by Naomi Obbard at October 14, 2022 07:09 AM

October 08, 2022

Caolán McNamara

Windows High Contrast Improvements

 

Spent a little time this week to explore our Windows accessibility High Contrast support because I was working on a GTK High Contrast issue by coincidence when xisco mentioned the Windows one in the regular ESC.

Left is the sad original case of unreadable menubar and missing sidebar icons. Right is the newly fixed case with legible menubar and restored sidebar icons. Additionally the "default" buttons of dialogs ("insert" in this case) are now using the correct text color, preview is visible, and EditBoxes render with the correct border color for focus and mouse over. Normal themes also gain a more subtle border color in Edits to indicate focus.

by caolan (noreply@blogger.com) at October 08, 2022 07:52 PM