The Document Foundation Planet

 

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 27, 2023

Official TDF Blog

Welcome Juan José González, TDF’s new Web Technology Engineer!

Photo of Juan José

Here at The Document Foundation, the non-profit entity behind the LibreOffice community, we have 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! So let’s get to know him…

Tell us a bit about yourself!

My name is Juan José and I am from México. I moved from my beautiful hometown to Guadalajara nearly thirteen years ago looking for a good job as a developer and I fell in love with the city. In Guadalajara I met my wife, my friends and many free software enthusiasts.

Since the first day, I realized that there were local communities around free software so I like to keep in contact with them, and contribute with technical talks about various topics.

I studied a masters degree in Computer Science, where I got interested in the semantic web and the automated reasoning discipline behind it. I’ve been working as a web developer for more than a decade now.

I am so happy that I found this position at The Document Foundation – I am determined to contribute as much as I can to improve our existing web sites and web apps that support the foundation’s efforts.

Were you using LibreOffice before you joined TDF?

I used LibreOffice to write the final project of my bachelor degree, I can say that LibreOffice was the first application for what I consider myself a power user (that was 10 years ago – but I have lost most of my talents sadly). I also remember writing an essay about the importance of open document formats, and my references included many people from the LibreOffice community.

This role marks my first time actively contributing to LibreOffice – so I hope I can help the project significantly.

ODF logo

What’s your new role at TDF?

I joined the Foundation as the new Web Technology Engineer, where I will dedicate my time to support, fix and improve the experience of our websites.

I believe it’s a great role since the web has become the default entry point to all people that want to interact with LibreOffice, from being an end-user, to collaborate on the software’s development. I have adopted the mission to facilitate this interaction.

What are you working on?

I am starting on the extensions site – it’s the place where you can get templates and extensions for LibreOffice. I am replying to reported issues by improving the web experience. I also want to keep an eye on the experience of the end user, taking care of both ends: extension developers and the users.

We’re really happy to have Juan José on board! LibreOffice users and community members can give him feedback and help via the website mailing list. Looking forward to seeing all the great things to come 😊

by Mike Saunders at January 27, 2023 09:56 AM

January 26, 2023

Official TDF Blog

The Document Foundation releases LibreOffice 7.4.5 Community

LibreOffice banner

Berlin, January 26, 2023 – The Document Foundation announces the release of LibreOffice 7.4.5 Community, a maintenance release which solves a crash affecting a large number of users. The new release is immediately available from https://www.libreoffice.org/download/ for Windows (Intel and ARM processors), macOS (Apple and Intel processors), and Linux.

All LibreOffice users are invited to update their installation to LibreOffice 7.4.5, as the older versions have reached the end of life and are not maintained.

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, to filters for a large number of legacy document formats, to return ownership and control to users.

LibreOffice Technology Platform

Products based on the LibreOffice Technology platform – the transactional engine shared by all LibreOffice based products, which provides a rock solid solution with a high level of coherence and interoperability – are available for major desktop operating systems (Windows, macOS, Linux and Chrome OS), for mobile platforms (Android and iOS), and for the cloud.

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): https://www.libreoffice.org/download/libreoffice-in-business/. All code developed by ecosystem companies for enterprise customers is shared with the community and improves the LibreOffice Technology platform.

Availability of LibreOffice 7.4.5 Community

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

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: https://ask.libreoffice.org

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

Change log page: https://wiki.documentfoundation.org/Releases/7.4.5/RC1

by Italo Vignoli at January 26, 2023 01:54 PM

January 24, 2023

Official TDF Blog

TDF position on EU’s proposed Cyber Resilience Act

THE DOCUMENT FOUNDATION
Summary of Issues of the Cyber Resilience Act (in the current status)

Introduction

The Cyber Resilience Act (CRA) sets out a number of cybersecurity and vulnerability management requirements for manufacturers (Annex I) and will require products to be accompanied by information and instructions for users (Annex II). Software vendors will also be required to conduct a risk assessment and produce technical documentation (Annex V) to demonstrate compliance.
Currently, the text implies that if a developer or supplier derives commercial benefit from OSS, it would be subject to the Cyber Resilience Act. It even implies, in relation to the distribution of software, that open source producers or developers could be held liable if their open source projects are used commercially.

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.

The Commission recognises that not all products in our society are equally dependent. The Cyber Resilience Act therefore distinguishes between products and critical products, reflecting the level of cybersecurity risk associated with these products. On the other hand, the CRA ignores the security risks associated with files created by the software covered by the act itself, which can have even more devastating consequences (according to security expert Kaspersky Labs, in 2018, 70% of all malware worldwide was carried by documents created by the most widely used office suite).

Software developers must declare compliance with the requirements of the Cyber Resilience Act and therefore take responsibility for compliance in one of three ways. They can either:

  1. perform a self-assessment, or
  2. apply for a product examination by an auditor and then set up checks and balances for their development processes, or
  3. apply for an assessment of their quality system by an auditor.

These options come with a growing administrative/compliance burden.

The Cyber Resilience Act attempts to exempt open source software from its provisions. But there’s some problematic language about how the CRA draws the line between commercial and non-commercial use of OSS, which could affect all products based on LibreOffice technology and many other products based on open source software.

This is the text of the Open Source Software exception:

In order not to hamper innovation or research, free and open-source software developed or supplied outside the course of a commercial activity should not be covered by this Regulation. This is in particular the case for software, including its source code and modified versions, that is openly shared and freely accessible, usable, modifiable and redistributable.

While the Cyber Resilience Act does not define commercial activity, the EU Blue Guide to the implementation of EU product legislation does:

Commercial activity is understood as providing goods in a business related context. Non-profit organisations may be considered as carrying out commercial activities if they operate in such a context. This can only be appreciated on a case by case basis taking into account the regularity of the supplies, the characteristics of the product, the intentions of the supplier, etc. In principle, occasional supplies by charities or hobbyists should not be considered as taking place in a business related context.

For the purposes of the Cyber Resilience Act, there is a real risk that software based on LibreOffice technology will be considered to be made in the course of a commercial activity, and thus subject to the legislation, based on the following:

  1. Products based on LibreOffice technology are developed by the majority of full-time employees of ecosystem companies or by individuals who make a living from consulting services related to their project work.
  2. Products based on LibreOffice Technology are goods in a business-related context because they are intended to provide software that can be used immediately by businesses or employees in their daily work.
  3. The Document Foundation has never missed a LibreOffice release in 12 years.
  4. Products based on LibreOffice technology are high quality software that matches the quality of commercial products.

So the features of a product based on LibreOffice technology are equivalent to those of commercial products.

Charging for support also makes open source a commercial activity. The Document Foundation does not charge for support, but it certifies professionals who are supposed to charge companies for consulting and support, and encourages companies to adopt professionally supported software.

Having said all this, it is important to remind the reader that The Document Foundation provides software free of charge, on a non-profit basis, and under OSI-approved open source licences that permit further use, study, modification and redistribution, whereas ecosystem companies provide commercial software with service level agreements.

Impact Assessment

CE Markings for Software Products

Basically, the core of the proposed legislation is to extend the CE marking regime to all software products distributed in Europe. Our understanding is that this process will be applied to open source software that is made available under open source licences and distributed free of charge.

We are deeply concerned that the Cyber Resilience Act could fundamentally alter the social contract that underpins the entire open source ecosystem: open source software that is provided free of charge, that can be modified and redistributed free of charge, but without warranty or liability to the authors, contributors, or open source distributors.

Legally changing this arrangement through legislation is likely to have unintended consequences for Europe’s innovation economy.

Without a clearer exemption for open source, in order to comply with the legislation, The Document Foundation will need to develop, document and implement policies and procedures for each project to ensure that they comply with the requirements of the Cyber Resilience Act, including:

  • All development and post-release security requirements specified in Annex I, including the provision of notification and update mechanisms.
  • All the requirements for user documentation set out in Annex II.
  • All of the product technical documentation set forth in Annex V, including … complete information on the design and development of the product… including, where applicable, drawings and schemes and/or a description of the system architecture explaining how software components build on or feed into each other and integrate into the overall processing
  • For each release, prepare the documentation required by Annex V, including … an assessment of the cybersecurity risks against which the product with digital elements is designed, developed, produced, delivered and maintained…
  • Determine for each product whether it meets the definition of product with digital elements, critical product with digital elements or highly critical product with digital elements
  • For each product which is a product with digital elements, establish, complete and document a CE mark self assessment process
  • For each critical product with digital elements or highly critical product with digital elements engage with an external CE auditing body and complete the additional processes required to get the CE mark approval
  • For each individual release, document that the CE marking process has been followed (as described above), that an EU Declaration of Conformity has been written and signed by an officer of the Foundation, that the CE mark has been affixed, and that the technical documentation and EU Declaration of Conformity will be made available for at least 10 years after the release.

Note that we estimate that The Document Foundation’s projects release at least a dozen versions in any given year. It is not clear to us what the cost in time, resources and money would be to implement these external review processes. We assume that they would be substantial.

Article 4 (3)

Member States shall not prevent the making available of unfinished software which does not comply with this Regulation provided that the software is only made available for a limited period required for testing purposes and that a visible sign clearly indicates that it does not comply with this Regulation and will not be available on the market for purposes other than testing.

Projects based on LibreOffice technology make integration, nightly, weekly and milestone builds available under their open source licences indefinitely. The intent is to provide community testing and traceability. These binaries are marked as such, but the terms under which they are provided do not require that they be used for testing purposes only.

It is not clear how this requirement could be implemented by any open source project using modern CI/CD infrastructure and operating under the principle of transparency.

Even if the binaries are marked as for testing only, the open source licences under which they are provided permit uses other than testing. In addition, it is common practice to provide interim builds for extended periods of time to allow testers access to previous builds for problem identification and resolution.

Discontinuing this practice would be very disruptive. And any solution based on making intermediate builds available under non-open source licences would be impossible for projects based on the LibreOffice technology, as TDF does not own the copyright and obtaining the consent of all contributors would be impractical.

In summary, compliance with the proposed requirements of the Cyber Resilience Act would be a significant blow to open source development best practices.

Article 5 (1) and Section 1 of Annex I

(1) Products with digital elements shall be designed, developed and produced in such a way that they ensure an appropriate level of cybersecurity based on the risks

This would probably ask for the development and enforcement of written policies that require each project to assess its level of cybersecurity risk and to implement processes to ensure that the level of risk and justification for the development processes adopted are determined.

(k) ensure that vulnerabilities can be addressed through security updates, including, where applicable, through automatic updates and the notification of available updates to users

With few exceptions, products based on LibreOffice technology do not require registration and do not provide a mechanism for notifying all users that an update is either available or required. Implementing these requirements would require a whole new infrastructure to be mandated across all projects.

Article 5 (2)

In general, The Document Foundation can deal with many of the requirements, as it has a security team and TDF is also a CVE numbering authority. However, there are two notable elements in the requirements.

(1) identify and document vulnerabilities and components contained in the product, including by drawing up a software bill of materials in a commonly used and machine-readable format covering at the very least the top-level dependencies of the product

This would impose a legal requirement to produce SBOMs for all projects based on the LibreOffice technology, which would be a very significant effort, and would also require active monitoring of all dependencies for known vulnerabilities.

(3) apply effective and regular tests and reviews of the security of the product with digital elements

These would require a significant change to our community’s development processes to mandate a whole class of testing that is not currently mandated for our projects. This is a very significant effort, both to implement and to maintain.

Section 2 of Annex I “Vulnerability Handling Requirements”

(1) Products with digital elements shall be designed, developed and produced in such a way that they ensure an appropriate level of cybersecurity based on the risks
(2) Products with digital elements shall be delivered without any known exploitable vulnerabilities
(3) On the basis of the risk assessment referred to in Article 10 (2) and where applicable, products with digital elements shall:
(a) be delivered with a secure by default configuration, including the possibility to reset the product to its original state
(b) ensure protection from unauthorised access by appropriate control mechanisms, including but not limited to authentication, identity or access management systems
(c) protect the confidentiality of stored, transmitted or otherwise processed data, personal or other, such as by encrypting relevant data at rest or in transit by state of the art mechanisms
(d) protect the integrity of stored, transmitted or otherwise processed data, personal or other, commands, programs and configuration against manipulation or modification not authorised by the user, as well as report on corruptions
(e) process only data, personal or other, that are adequate, relevant and limited to what is necessary in relation to the intended use of the product (minimisation of data)
(f) protect the availability of essential functions, including the resilience against and mitigation of denial of service attacks
(g) minimise their own negative impact on the availability of services provided by other devices or networks
(h) be designed, developed and produced to limit attack surfaces, including external interfaces
(i) be designed, developed and produced to reduce the impact of an incident using appropriate exploitation mitigation mechanisms and techniques
(j) provide security related information by recording and/or monitoring relevant internal activity, including the access to or modification of data, services or functions
These would require a significant change to our community’s release processes to require certifications that there are no known vulnerabilities and to meet the many requirements listed.
(k) ensure that vulnerabilities can be addressed through security updates, including, where applicable, through automatic updates and the notification of available updates to users

Several products based on LibreOffice technology do not require any kind of user registration and do not provide a mechanism for notifying all users that an update is either available or required. Implementing these requirements would require a whole new infrastructure to be mandated.

Recommendation and Conclusion

We propose that all open source development and distribution activities should be excluded from the scope of the Cyber Resilience Act, without exception. This is the simplest solution to the problems previously described in the document.

In order to encourage open source developers and distributors to continue their activities, we believe it is important that the Regulation provides comfort and certainty to these organisations that their activities are exempt from the obligations of the Regulation. Although it is the aim of Recital 10 to clearly establish this exemption, we believe that including the FOSS exemption in the body of the Regulation itself would establish the exemption with greater clarity and certainty.

As an alternative, we suggest clarifying the interpretation of “commercial activity” in a way that is more appropriate to the context of open source software. This would recognise that not all efforts to generate recurring revenue (such as paid “technical support services”) should be characterised as “commercial activity”.

Even without the commercial activity qualifier, the wording of Recital 10 would still require companies that primarily monetise open source software, for example by charging for products incorporating such software, to comply with the Regulation, but would no longer cover organisations that make FOSS available to the developer community.

by Italo Vignoli at January 24, 2023 03:52 PM

January 23, 2023

Official TDF Blog

Community Member Monday: Afshin Falatooni

Afshin Falatooni

Today we’re talking to Afshin Falatooni, from the Persian-speaking LibreOffice community!

Tell us a bit about yourself…

I am from Iran, the city of Mashhad. I speak Persian (Farsi), and I love to contribute to LibreOffice! This January, I have just turned 46 years old. My favorite hobby is climbing, and if I have time, I usually go to the mountains on Fridays, which is the weekend holiday in our country.

I work as a book editor, typesetter and layout designer. I became interested in the LibreOffice project because of my job. Many editors and typesetters use Microsoft Word more than any other program, and I was one of them before I got acquainted with LibreOffice. But, now that I know the advantages of LibreOffice as a free software project, I use Writer as much as the norms of the publishing market allows me.

What are you working on in the LibreOffice project right now?

I write regularly on the Persian LibreOffice blog. My goal is to provide educational contents around LibreOffice there. Additionally, if I find a bug that is either directly or indirectly related to Persian language, in addition to reporting it to Bugzilla with the necessary screenshots and documents, I post it to the blog to make others aware of the important bugs.

We also have a Persian-speaking group in Telegram, where I answer questions as far as I can, alongside the other admin of the group.

Many years ago, I added a large collection of Persian words to OpenOffice.org project, which were likely to be written incorrectly. Using that word list, the Persian language was added as part of the OpenOffice.org auto-correction feature. The word bank continues to exist in LibreOffice, and is useful for the Persian speaking users.

Many thanks to Afshin for all his contributions 😊 All LibreOffice users are welcome to build up our native-language communities and reach more people around the world!

by Mike Saunders at January 23, 2023 12:38 PM

January 20, 2023

Official TDF Blog

LibreOffice Draw Guide 7.4 updated

The Documentation team is happy to announce the availability of the LibreOffice Draw Guide 7.4, an update of the 7.3 guide.

The guide is available in PDF as well as in ODF formats at the documentation website. An online version is available in the bookshelf website.

Peter Schofield led the task, reviewing and updating the contents. Thank you indeed Peter!
Peter Schofield

» Click here to join the documentation team, and help them to do more great things

by Olivier Hallot at January 20, 2023 07:59 AM

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 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 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

LibreOffice Dev Blog

gbuild: LibreOffice build system – part 1

LibreOffice uses a build system called gbuild which uses GNU Make. Migrating from the old build system to gbuild started in the OpenOffice days, but the migration took a while and a lot of effort, finishing around LibreOffice 4.1.

This LibreOffice build system uses GNU Make, Perl and Python, so you need to have these prerequisites in order to be able to build LibreOffice. However, LibreOffice bundled Python can be used.

To get a nice description, just try this inside the LibreOffice core source folder:

make help

Structure of gbuild

You can find gbuild in solvenv/gbuild folder of the LibreOffice core source code. There are many macros available in gbuild that are useful when doing the actual build. Let’s start from a simple one that creates a nice output.

If you look at the build output, you see many three letter outputs. They are short forms denoting the category of what is being built, for example, [BIN] means binary, [MOD] means module, and [ALL] is what it is! There are other short names like [CXX] for compiling C++ files, [C ] for compiling C files, and [LNK] for the linking.

...
[BIN] postprocess
[MOD] postprocess
[MOD] libreoffice
[BIN] top level modules: libreoffice
[ALL] top level modules: build-non-l10n-only build-l10n-only
...

These are the outputs, generated by a macro named gb_Output_announce. This macro does the printing, and its code is available in “solenv/gbuild/Output.mk”

define gb_Output_announce
$(info $(call gb_Output_announce_str,$(1),$(2),$(3),$(4)))
endef

Then, it calls this macro:

$(call gb_Output_announce,$*.cxx,$(true),CXX,3)

And, you will see the nice result in the output which contains [CXX]. You can see that another macro, gb_Output_announce_str is called here, that creates the output.

Other gbuild Macro Examples

There are many other macros available for developers. You find the makefiles with the .mk extensions, and you see a lot of them for the executables, libraries, and tests.

For example, let’s take a look at the xmlscript folder. Here are the .mk files:

1) xmlscript/CppunitTest_xmlscript_cppunit.mk
2) xmlscript/Module_xmlscript.mk
3) xmlscript/Library_xmlscript.mk
4) xmlscript/Package_dtd.mk

The makefile #1 is the CppunitTest_xmlscript_cppunit, which is used for adding a test, which can be run by:

make CppunitTest_xmlscript_cppunit

The makefile #2 is the main makefile for the module, which in turn, invokes makefile #3, which builds the xmlscript library, and #4, which creates the xmlscript dtd package, and also makefile #1 which contains the tests. This code does the job:

$(eval $(call gb_Module_Module,xmlscript))

$(eval $(call gb_Module_add_targets,xmlscript,\
Library_xmlscript \
Package_dtd \
))

$(eval $(call gb_Module_add_check_targets,xmlscript,\
CppunitTest_xmlscript_cppunit \
))

As you can see, gb_Module_Module, gb_Module_add_targets and gb_Module_add_check_targets are the macros that are invoked to make this happen. All of these macros are defined in solenv/gbuild/Module.mk. In this file, you get this overview:

# Overview of dependencies and tasks of Module
#
# target                      task                         depends on
# Module                      build the product            all product targets
#                              excluding tests             recursive Modules
# Module/unitcheck            run unit tests               all unit tests
#                                                          recursive Module/checks
# Module/slowcheck            run all slow unit tests
# Module/screenshot           create all screenshots
# Module/subsequentcheck      run system tests             all system tests
# Module/uicheck              run uitests                  all uitests
#                                                          recursive Module/subsequentchecks
# build (global)              build the product            top-level Module
# unitcheck (global)          run unit tests               top-level Module/unitcheck
# slowcheck (global)          run slow unit tests          top-level Module/slowcheck
# screenshot (global)         create all screenshots       top-level Module/screenshot
# subsequentcheck (global)    run system tests             top-level Module/subsequentcheck
# perfcheck (global)          run performance unit tests   top-level Module/perfcheck
# uicheck (global)            run the uitests              run all uitests

For the start, you may not need to know all the details of gbuild. You may only need to modify a makefile, add a C/C++ file, or a test. In many cases, even for the new makefiles, you can find examples from several LibreOffice modules. Try to find similar sub-projects and use them as the templates, while applying some changes to match your needs.

Further Reading

I will try to write more about the LibreOffice build system in the future. But for now, if you refer to the previous presentations in LibOCon/FOSDEM, you will find nice related presentations, including these:

by Hossein Nourikhah at December 03, 2022 01:38 AM

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

October 03, 2022

Miklos Vajna

Content controls in Writer: PDF export and combo box type

Writer now supports exporting content controls to PDF and a 7th content control type: it is possible to differentiate between drop-downs and combo boxes.

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

Motivation

PDF export of Writer content controls into PDF

Writer users can create fillable forms using content controls, but the PDF export only contained the plain text representation of them. PDF can also have fillable widgets for form filling, so it's logical to map content controls to PDF widgets.

A perfect mapping is not possible, since PDF widgets are always a single rectangle and Writer content controls is a list of rectangles (text portions), but this doesn't cause a problem in most cases. The size of the PDF rectangle is determined based on the placeholder's size from Writer.

Benefits includes not having to insert a control shape, manually positioned to look like it's in line with the surrounding text. An other benefit is that this way the widget's style (font name, size, etc) can be specified using Writer styles, not with shape properties. It's also interesting that Word itself doesn't seem to support content controls in its PDF export at the time of writing.

Results so far

PDF export now automatically turns Writer content controls into fillable widgets for the rich text, plain text, checkbox, drop-down, combo box and date types.

Combo box itself is a new type: now combo box content can be either free-form or one of its list items, while drop-down can only be one of its list items.

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 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 October 03, 2022 06:25 AM

September 29, 2022

Marius Popa Adrian

Linux 0.0.1 compiling on Ubuntu 64

You might need some packages first$ sudo apt-get install bin86 kvm qemu gcc build-essential qemu-system-x86 gcc-multilibclone the github repo with 64 build fixes https://github.com/mariuz/linux-0.01$ gh repo clone mariuz/linux-0.01$ unzip hd_oldlinux.img.zip$ make$ make run or $ make run-curses  SeaBIOS (version 1.13.0-1ubuntu1.1) iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+0078EBD0+

by Popa Adrian Marius (noreply@blogger.com) at September 29, 2022 07:48 AM