Welcome to The Document Foundation Planet

This is a feed aggregator that collects what LibreOffice and Document Foundation contributors are writing in their respective blogs.

To have your blog added to this aggregator, please mail the website@global.libreoffice.org mailinglist or file a ticket in Redmine.


Monday
18 March, 2024


[en] Michael Meeks: 2024-03-18 Monday

21:00 UTC

face
  • Mail chew; day of 1:1's and catch-up admin & planning.
  • Reflecting on why I get -so- spam these days, I suspect LinkedIn likes to target on 'CEO' job title instead of the much more opaque 'General Manager'; if I wasn't so busy turning down the corporate 'enlargement services' equivalent I'd test that.

face

One of the areas that can help LibreOffice, but may not directly be visible to the users even though it has a big impact is the quality assurance, is automated testing.  Here, I discuss some areas and notes around improving tests for LibreOffice. First, I start with regressions and bug fixes without a test.

Missing Unit Tests

This is the description from the GSoC ideas page:

While there are some automated tests for LibreOffice, there are not nearly enough. Adding more and better tests helps developers who work on the code to be more productive by allowing them to find regressions as early as possible.

To elaborate more, I should say there are many regressions and bugs in general that are fixed, but lack testing. It is important to have tests for those bug fixes, to avoid such problems in the future. You can see a list of those fixed issues that lack tests here:

If you want to add some new tests for the bug fixes, first you should read the bug report very carefully to understand what is it about, and try to test the fix yourself. You can either use git revert command to revert the fix, and see the problem in action, or try changing back the fix in the code, if it is not too big.

That is important, because you have to see that the test fails without the fix in place, but succeeds when it is applied. This is an essential step when writing the test.

To know more about unit tests, you may look into these Wiki pages:

Porting Existing Test to C++ or Python

Some tests are written in the past, but now have issues because of the way they are written. In this case, porting them can provide improvement.

Tests can be written in multiple languages. At least, C++, Python, Java and BASIC are currently in use for different tests across the LibreOffice code base. Again in the GSoC ideas page, you can read:

There is some support in LibreOffice for automated tests, both at the level of unit tests, and at the level of system tests that drive a full LibreOffice instance. Currently tests can be written in C++, Java, or Python. Various new automated tests should be developed to improve the test coverage.

Tests written exclusively for Java (e.g. the JUnit framework) should be ported to C++ so that they can execute much more rapidly. Similarly, tests that do remote control of an existing LibreOffice instance, should be re-factored to run inside that instance to make debugging much easier.

Almost all JUnitTests and UITests, and also some smoke tests, run as an outside process. To verify, the trick is to remove the soffice(.exe) binary, or to remove its execute permission (on Linux). In this way, out-of-process tests should fail, as they need to run the soffice binary. After a


Sunday
17 March, 2024


[en] Michael Meeks: 2024-03-17 Sunday

21:00 UTC

face
  • Up earlyish, breakfast with the parents, bid a fond farewell & drove home. N. cooked lunch; J. and N. went to visit Izzie, H.M. & E. to StAG; relaxed variously - watched The King - interesting; its good to have a wife who speaks frankly to you.

Friday
15 March, 2024


face

Git Git Git Git Git Git

Why work on this

Working on this involves understanding the controlls, specially the spinedit, finding some way to modify it so that clicking on the units “the last 2 characters of the label in the spinedit entry” shows a dropdown, from which we can select a different unit.

Mockup

I find working on this as a great opportunity to get deeper insights into widget implementations

Finding a Starting Point

I had no idea about where to start. One approach that appealed to me was if somehow I find the cursor position when the spinedit goes into edit mode, and compare it to the text length in the GtkEntry (internal) of the spinedit, then I can easily say that if the cursor is on the last 2 characters, then show a dropdown here. But that would not work, because “creating a new widget” ==> the logic should be built into the widget itself (I don’t know, it’s just guess-work).

Then I went to #gtk IRC channel, and asked about how to approach this problem.

IRC Conversation
sahil_ hi, I have a task to write a custom spinedit control, which will have a fontsize field (with a number and a unit like mm, pt, etc). It should be such that if I click on the unit with mouse, then it should show me a dropdown to use different units. Mockup Here’s the mockup. How can I approach it?
sahil_ Libreoffice uses glade and custom welding for widgets. And from the research I did on it, I found that a normal gtkentry is aware of the cursor position, which can be used like if the cursor is on the last 2 characters, then show the popup.
sahil_ But a new control has to be created for that (in my understanding).
mclasen The pieces are GtkText and GtkGestureClick. You just have to glue them together in the right way
sahil_ mclasen: and for the dropdown?
mclasen GtkPopover is what is used for that
sahil_ Also the spinedit doesn’t expose the gtkEntry (it’s internal). So do I have to create one from scratch?
sahil_ or does it?
mclasen you can take a look at how GtkEntry, GtkSpinButton, etc are put together nowadays they are all just wrappers around a GtkText widget

This was more than enough to get started.

Starting the Hunt

Looking into it, I found that I was mixing up GtkComboBox, which is used as fontsizebox, and GtkSpinButton, which is what I was supposed to explore and modify. weld::SpinButton, which is libreoffice’s wrapper over GtkSpinButton (if I am not wrong) has functions which give access to the cursor location in the Entry. It would require some playing around to understand the dynamics though.

I am also curious about how a dialog, or any UI element, which is created using glade, which usually has the widgets as Gtk types (GtkLabel, GtkButton etc.) is loaded into different backends. Knowing how the welding works would answer it I think.


Monday
11 March, 2024


face

General Activities

  1. LibreOffice 7.6.5 was released on February 22
  2. LibreOffice 24.2.1 was released on February 29
  3. Olivier Hallot (TDF) added help content for Calc’s XLOOKUP and XMATCH functions, Navigate By in Find toolbar, Draw’s Shrink text on overflow and did many fixed and cleanups in Help
  4. Rafael Lima made it so selected text in the BASIC editor is automatically inserted into the search bar, added a command for toggling code block commenting in BASIC IDE and fixed an issue where Duplicate Sheet command might create the sheet in the wrong file, if having two open files with the same name
  5. Stanislav Horacek updated command paths in Help
  6. Stéphane Guillou (TDF) updated command paths in Help
  7. Alain Romedenne updated ScriptForge Help pages, updated Python shell script Help for macOS and improved Python example in SDK
  8. Dione Maddern did many fixes and updates to Help pages, mostly fixing links
  9. Gábor Kelemen (allotropia) made some cleanups in Help and in UI and UNO bridges code
  10. Laurent Balland fixed an issue with skip empty cells option not working for the last column in Calc Text Import dialog, made it so custom number formats using the ? character replace trailing zeroes with figure spaces which have a width approximating a digit and removed unneeded thumbnail.png images from Wizard templates
  11. Miklós Vajna (Collabora) added legal numbering support for DOC and RTF files, made Calc HTML import support data-sheets attributes, made Calc’s cell editing accept pasted HTML fragments, made DOCX content control handling more robust and continued polishing floating table support
  12. Szymon Kłos, Gülşah Köse, Marco Cecchetti, Gökay Şatır, Pranam Lashkari, Michael Meeks and Méven Car (Collabora) worked on LOKit used by Collabora Online
  13. Attila Szűcs (Collabora) fixed PPTX issues with multiline field wrapping and stacked text
  14. Henry Castro (Collabora) tweaked Calc’s background colour filter to not extend transparent colours to empty cells and fixed an issue with Sidebar not displaying the full localised currency string for cell properties
  15. Tomaž Vajngerl (Collabora) made it so the currencies used in a spreadsheet are put at the top of the currency pop-up list, made pivot table data cache handling smarter and improved the handling of XLS documents with unknown DRM encryption (mainly due to some Excel addons)
  16. Julien Nabet fixed an issue where Data validation without error check allowed entering incorrect data, fixed LOWER not being supported in Base’s Query-GUI if condition was LIKE and fixed an issue with Calc Macro setting SearchWildcard to False changing SearchRegularExpression value. He also fixed some crashes
  17. Andreas Heinisch made Calc’s Autofilter sorting and removing duplicates more robust and made it so a single click is enough to access options through Calc’s status bar
  18. Xisco Faulí (TDF) made over a dozen additions and changes to automated tests, improved dark mode support of Writer comment UI, fixed an issue with Autofilter empty option, made SVG text baseline handling more intuitive, added support

face

Git Git Git Git Git Git Git

What do I want to achieve

It’s important to set some target before jumping into and starting to do the thing. I would like to make an annoying “Donate Now” dialog

  • The dialog would show up whenever the user starts libreoffice, or whenever he switches to different modules like calc or writer etc.

  • The dialog would look something like the mockup shown below. The dialog should have a faint background image which shows all the community members, to give out cheerfull vibes. Other than that it would have a text which would be some interesting fact about libreoffice.

  • It would have an image on the top, and a “donate now” and a “close” button on the bottom It would also have a checkbox saying “I am broke”, which would be unchecked by default. If the user checks it, then the dialog will stop asking for monitory donations, and instead pester the user with “Other Ways To Contribute”, which would include all the getting involved stuff.

  • Other than that It would also have an “I don’t care” checkbox, which will be unchecked by default, and if checked, the dialog won’t show up again, and then one has to reactivate it from about > user-hostile-donation-dialog.

Git

This would makeup for a nice and fun learning experience. It would involve playing around with the UI, listeners, strings, “the user centiments” etc.

It’s not a rigid outline, but rather an idea to atleast get started. Patch on gerrit.

Starting with the UI

I will start with understanding how the about dialog is implemented, how does it display images and custom text etc. One thing that I noticed previously is that the “Tip Of The Day” dialog uses GtkDrawingArea while the about dialog uses GtkImage.

I asked on the #gtk IRC channel, and found that GtkImage is an image loaded from the disk at a specific size, while GtkDrawingArea is a canvas you draw on using cario.

This might have been the reason for why Libreoffice was carshing when I used GtkImage while trying to recreate the “Tip Of The Day” dialog. There I just created a bare constructor, without specifying the image.

Well for the user hostile dialog, GtkImage would work fine as I don’t need to change the image on the go.

Creating a Dialog

I created a dialog box using glade. The challenge that I faced was that I was not able to move the checkboxes in the ButtonBox of the GtkDialog to the left side. All 4 controls were stuck together. Then I looked into how the tip-of-the-day dialog does it, and there I found that whatever control I wanted to left align (in the button box), I had to turn on the packing > secondary control. What that is, I am still to investigate into.I got this Documentation Reference from the #gtk IRC channel.

For some reason, the dialog doesn’t carsh now :). Other issue that I faced was related to text wrapping. So if I set


Wednesday
06 March, 2024


face

Monte San Vito (AN), Centro turistico «Carlo Urbani», 4 maggio 2024 (dalle 9:00 alle 17:00) 6 marzo 2024 – Associazione LibreItalia annuncia la decima Conferenza Italiana LibreItalia, che si terrà sabato 4 maggio 2024 presso il Centro turistico sociale «Carlo Urbani», Via Antonio Gramsci 19 a Monte San Vito (AN), con inizio alle ore 9:00 […]


Friday
01 March, 2024


face

El nuevo Consejo de Administración de The Document Foundation acaba de iniciar su mandato de dos años el 18 de febrero de 2024.

Los miembros titulares son, por orden alfabético Eliane Domingos, Sophie Gautier, Björn Michaelsen, László Németh, Simon Phipps, …


face

Writer now supports legal numbering for two more formats: DOC and RTF (ODT and DOCX were working already.)

This work is primarily for Collabora Online, done as a HackWeek project, but the feature is fully available in desktop Writer as well.

Motivation

Legal numbering is a way to influence the number format of values inherited in a multi-level numbering. Say, the outer numbering uses Roman numerals and the inner numbering uses X.Y as the number format, but the inner level wants to display the outer values as Arabic numerals. If this is wanted (and guessing from the name, sometimes lawyers do want this), then the inner number portion will expand to values like "2.01" instead of "II.01", while the outer number portions will remain values like "II".

Mike did 80% of the work, what you can see here is just the RTF/DOC filters.

Picking a smaller feature task like this looked like a good idea, since I wanted to spend some of the time on regression fixing around last year's multi-page floating table project.

Results so far

For (binary) DOC, the relevant detail is the fLegal bit in the LVLF structure. Here is the result:

Improved handling of legal numbering from DOC: old, new and reference rendering

It shows how the outer "II" gets turned into "2", while it remained "II" in the past. This works for both loading and saving.

The same feature is now handled in the RTF filter as well. There the relevant detail is the \levellegal control word, which has an odd 1 default value (the default is usually 0). Here is the result:

Improved handling of legal numbering from RTF: old, new and reference rendering

It shows that the RTF filter is up to speed with the DOC one by now.

As for the multi-page floating tables, I looked at tdf#158986 and tdf#158801.

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 24.04 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 (24.8).


Thursday
29 February, 2024


face

If you copy contents from LibreOffice Writer to a plain text editor like gedit or Notepad, you will see that it does a straightforward thing: It copies the text and some basic formatting like converting bullets to ‘•’. For the Writer tables, the conversion is very simple right now: every cell is written in a separate line.

For example, if you have a table like this:

A | B
--|--
C | D

When you copy the table from LibreOffice Writer and paste it into a plain text editor, it will become something like this, which is not always desirable.

A
B
C
D

It is requested that like LibreOffice Calc, or Microsoft Word, and many other programs, the copy/paste mechanism should create a text like this:

A	B
C	D

The columns are separated by <tab>.

This feature request is filed in Bugzilla as tdf#144576:

Code pointers for Handling Writer tables

There are many steps in copy/pasting, including the data/format conversion and clipboard format handling. Here, you have to know that the document is converted to plain text via “text” filter.

The plaintext (ASCII) filter is located here in the LibreOffice core source code:

Therefore, to change the copy/paste output, you have to fix the ASCII filter. That would also provide the benefit that plain text export will be also fixed as requested here.

In this folder, there are a few files:

$ ls sw/source/filter/ascii/
ascatr.cxx parasc.cxx wrtasc.cxx wrtasc.hxx

To change the output, you have to edit this file:

In this file, there is a loop dedicated to create the output.

// Output all areas of the pam into the ASC file
do {
    bool bTstFly = true;
    ...
}

Inside this loop, the code iterates over the nodes inside the document structure, and extracts text from them. To check for yourself, add the one line below to the code, build LibreOffice, and then test. You will see that a * is appended before each node.

SwTextNode* pNd = m_pCurrentPam->GetPoint()->GetNode().GetTextNode();
if( pNd )
{
+   Strm().WriteUChar('*');
    ...
}

For example, having this table, with 1 blank paragraph up and down:

A | B
--|--
C | D

You will get this after copy/paste into a plain text editor:

*
*a
*b
*c
*d
*

To fix the bug, you have to differentiate between table cells and other nodes. Then, you should take care of the table columns and print tab between them.

To go further, you can only add star before table cells:

if( pNd )
{
    SwTableNode *pTableNd = pNd->FindTableNode();
+   if (pTableNd)
+   {
+       Strm().WriteUChar('*');
+    }
    ...
}

You can look into how other filters handled tables. For example, inside sw/source/filter/html/htmltab.cxx you will see how table is managed, first cell is tracked and appropriate functions to handle HTML table are called.

For the merged cells, the EasyHacker should first checks the behavior in


face

Berlín, 29 de febrero de 2024 – LibreOffice 24.2.1 Community, la primera versión menor de la suite ofimática libre y respaldada por voluntarios para la productividad personal en entornos de oficina, ya está disponible en https://es.libreoffice.org/descarga para Windows, MacOS y …


Thursday
22 February, 2024


face

When working with LibreOffice Impress, “Slide Master” is the place where you can change the templates used for different types of the slides used in your presentation. Here we discuss a possible improvement for the “Slide Master” by making the copy from master slides possible.

Copying the Master Page in Impress

To see the problem and the room for enhancement, open LibreOffice Impress, then choose “View->Master->Slide Master” from the menus. Then, try to copy the master page on the left in the slide sorter. Unfortunately, it is not possible.

Impress slide master

Impress slide master

Having this feature is helpful, because different page types have many things in common, and being able to copy/paste helps creating templates much faster.

Impress Code Pointers

Looking into sd/source/core/drawdoc3.cxx, you can see a huge function SdDrawDocument::InsertBookmarkAsPage, which is relevant here. It contains ~600 lines of code. This huge function is in itself a problem. Therefore, to implement the enhancement, on should try to first refactor the function, then add a unit test in sd/qa/unit, find and then separate all the ~6 use cases, and fix the style/name merging.

After the cleanup, the main fix should be implemented. The suggested path to implement this comes from Jean-Francois. He suggest to improve the duplicate() method, which is described in the documentation:

As described in the above documentation, its role is to duplicate a page:

Creates a duplicate of a DrawPage or MasterPage, including the Shapes on that page and inserts it into the same model.

However, the implementation does not work for master slides, as the macros in the attachment file implies. The solution should add the needed implementation for master slides.

The implementation is inside sd/source/ui/unoidl/unomodel.cxx inside duplicate function:

// XDrawPageDuplicator
uno::Reference< drawing::XDrawPage > SAL_CALL SdXImpressDocument::duplicate( const uno::Reference< drawing::XDrawPage >& xPage )
{

...

}

Final Words

The above issue is filed as tdf#45617. If you like to work on it, just follow the Bugzilla link to see more information.

To implement this feature, first you have to build LibreOffice from the sources. If you have not done that yet, please refer to this guide first:

Getting Started (Video Tutorial)


Tuesday
13 February, 2024


face

General Activities

  1. LibreOffice 24.2 was released on January, 31
  2. Olivier Hallot (TDF) fixed a duplicate Covariance command in Notebookbar UIs, updated menu item paths in Help pages and updated Help pages for conversion filters and style Spotlight
  3. Rafael Lima added a Color Scheme switcher to Basic IDE, added a “Delete Comment” command to the Navigator context menu, fixed drawing comment triangles in Calc at all zoom levels, made it so the visibility of UI components in the Basic IDE is remembered, made Basic IDE highlight the line where the cursor is positioned, made it possible to open the “Go to Line” dialog from the statusbar in Basic IDE, fixed Calc AutoFilter arrow color in dark mode, made it so line numbering and breakpoint in Basic IDE are on the left even in right-to-left UI and fixed a crash in Dialog Editor. He also improved the ScriptForge Help pages
  4. Stanislav Horacek updated menu paths in Help alongside other cleanups and fixes
  5. Ilmari Lauhakangas (TDF) removed unnecessary images from SVG icon themes, saving nearly 5 MB of space. He also changed the Help CSS to account for a quirk in Safari
  6. Stéphane Guillou (TDF) continued linking Sidebar decks to Help
  7. Alain Romedenne updated ScriptForge Help pages
  8. Dione Maddern did many fixes and updates to Draw dialog Help pages
  9. Gábor Kelemen (allotropia) added accessible descriptions to new Dublin Core metadata boxes, updated Help after removal of FTP protocol support and did code cleanups in the area of code simplification and includes
  10. Laurent Balland did cleanups in the metadata of Impress templates
  11. Miklós Vajna (Collabora) fixed the layout handling of empty paragraphs formatted as superscript in Writer, added support for HTML paste to Writer shape text or Calc cell text edit and continued polishing support for multi-page floating tables in Writer
  12. Jean-Pierre Ledure worked on the ScriptForge library
  13. Gabriel Masei (1&1), Paris Oplopoios, Szymon Kłos, Méven Car, Andras Timar, Attila Szűcs and Áron Budea (Collabora) worked on LOKit used by Collabora Online. Andras also fixed some FreeBSD build issues while Attila fixed hyperlink colouring in certain PPTX files and a textbox vertical alignment inversion issue when saving PPTX files
  14. Henry Castro (Collabora) made the status bar in Calc work as expected with language selection
  15. Eike Rathke (Red Hat) made it so the maximum number of hours that can be entered into a Calc cell with time formatting is now a 32-bit integer instead of 65535
  16. Tomaž Vajngerl (Collabora) continued refactoring the EditEngine text editing code
  17. Julien Nabet fixed an issue preventing some position parameters to go beyond 17 mm in Writer, fixed an issue that made ReportBuilder wizards show two different data sources, fixed several crashes and did code cleanups
  18. Andreas Heinisch made it so font, highlight and background colour in toolbar buttons is remembered between sessions, fixed canceling Text Import in Calc locking the document and made it so question mark can be used in autotext shortcuts
  19. László Németh continued polishing support for

Sunday
11 February, 2024


face


After a long slog since November when the previous version of coverity was EOLed and we had to start using 2022.6.0 with its new suggestions for std::move etc, LibreOffice is now finally back to a 0 warnings coverity state


Tuesday
06 February, 2024


face

Es muy común que cuando trabajamos en hojas de cálculo largas, con muchas filas o columnas, queremos ver diferentes partes de la tabla al mismo tiempo, para cotejar datos, explorar resultados de funciones, etc. Después de dividir la ventana en …


face

This post describes some challenges around having multiple views of one opened document in LibreOffice core, when those views belong to LOK views, representing different users, with their own language, locale and other view settings.

This work is primarily for Collabora Online, but is useful for all clients of the LOK API.

Motivation

LOK views are meant to represent separate users, so we need to make sure that when a user sets their preferences and trigger an action, then the response to that action goes to the correct view, with the correct view settings.

This is different from the desktop LibreOffice use-case, where multiple windows are still meant to share the same user name, language, undo stack and so on.

Results so far

In this post, I would like to present 4 small improvements that recently happened to the LOK API to provide this wanted separation of views.

The first was an issue where two users were editing the same document, one busily typing and the other clicked on a link in Calc. What could happen sometimes is the link popup appeared for the user who typed, not for the user who clicked on the link:

Link popup is actually on the left, should be on the right, now fixed

This specific problem can be fixed by making sure that link click callbacks are invoked synchronously (while the clicking view is still active) and not later, when the current view may or may not be the correct one.

It turns out the same problem (async command dispatch) affects not only hyperlinks, but many other cases as well, where we want to stay async, for example, when one dialog would invoke another dialog, like the Calc conditional format -> add dialog:

Calc conditional format add dialog appearing on the left, should be on the right, now fixed

There you don't want to change async commands into sync commands, because that may mean spinning the main loop inside a dialog, resulting in nested main loops. This can be fixed by making sure that async commands to be dispatched (sfx2 hints in general) are processed in a way that the current view at dispatch & processing is the same, which is now the case.

The third problem was around wrong language & locale in the status bar:

Unexpected English strings in localized statubar UI, now fixed

This is not simply a problem of missing translation, the trouble was that the status bar update is also async and by the time the update happened, the locale of the view on the left was used, for a string that appears on the right.

The way to fix this is to perform the update of toolbars/statusbar/etc (in general: SfxBindings) in a way that the language at job schedule time and at UI string creation time is the same.

The last problem was quite similar, still about bad language on the UI, but this time on the sidebar:

Unexpected English strings in localized sidebar UI, now fixed


Sunday
04 February, 2024


face

In this blog post, I discuss gbuild for Java tests. The goal is to write a Makefile to compile and run a JUnit test for LibreOffice. You can also refer to part 1 and part 2 for a brif overiew on gbuild, the LibreOffice build system.

Macro Examples from gbuild for Java Tests

In the first post on gbuild, I have mentioned some macro examples including gb_Output_announce which was used to print nice messages like the ones including “[CXX]”. Now let’s explain some more macros related to Java tests.

Consider that you want to compile and run a JUnitTest. To do that, you need to write the test in a Java file, and create a Makefile to run that.

This is an example for running a test defined in Java file sw/qa/complex/indeterminateState/CheckIndeterminateState.java.

$(eval $(call gb_JunitTest_JunitTest,sw_complex))

$(eval $(call gb_JunitTest_add_sourcefiles,sw_complex,\
sw/qa/complex/indeterminateState/CheckIndeterminateState \
))

$(eval $(call gb_JunitTest_use_unoapi_jars,sw_complex))

$(eval $(call gb_JunitTest_add_classes,sw_complex,\
complex.indeterminateState.CheckIndeterminateState \
))

The make file for running this Java test consists of calling multiple macros. It starts with gb_JunitTest_JunitTest macro, which defines the test by its name, sw_complex. This macro is defined in solenv/gbuild/JunitTest.mk. If you grep for define in the same file, you will see this result:

$ grep -w define solenv/gbuild/JunitTest.mk
define gb_JunitTest_JunitTest
define gb_JunitTest_set_defs
define gb_JunitTest_add_classes
define gb_JunitTest_add_class
define gb_JunitTest_add_sourcefile
define gb_JunitTest_add_sourcefiles
define gb_JunitTest_use_jar
define gb_JunitTest_use_jars
define gb_JunitTest_use_jar_classset
define gb_JunitTest_add_classpath
define gb_JunitTest_use_system_jar
define gb_JunitTest_use_system_jars
define gb_JunitTest_use_external
define gb_JunitTest_use_externals
define gb_JunitTest_use_customtarget
define gb_JunitTest_use_customtargets
define gb_JunitTest_use_unoapi_jars
define gb_JunitTest_use_unoapi_test_class
define gb_JunitTest_set_unoapi_test_defaults
define gb_JunitTest_JunitTest

To stick to the macros used in the above example, I describe these macros:

gb_JunitTest_add_sourcefiles: This macro adds a Java source file to the test. It defines the code that adds the sw/qa/complex/indeterminateState/CheckIndeterminateState.java to the test. But please note that you should drop the .java extension:

$(eval $(call gb_JunitTest_add_sourcefiles,sw_complex,\
sw/qa/complex/indeterminateState/CheckIndeterminateState \
))

The other macro gb_JunitTest_use_unoapi_jars, adds the UNO API JAR files to be used with the test.

And in the end, you need to add the test class name using gb_JunitTest_add_classes macro. The class name is visible in the end.

The result can be quite complex, but it works. 🙂

java.exe -Xmx64M -classpath "$W/JavaClassSet/JunitTest/sw_complex;C:/cygwin64/home/user/lode/opt/share/java/junit.jar;$I/program;$W/Jar/OOoRunner.jar;$I/program/classes/libreoffice.jar;$W/Jar/test.jar" -Dorg.openoffice.test.arg.soffice="path:$I/program/soffice" -Dorg.openoffice.test.arg.env=PATH="$PATH" -Dorg.openoffice.test.arg.user=file:///$W/JunitTest/sw_complex/user org.junit.runner.JUnitCore complex.indeterminateState.CheckIndeterminateState

The above is the actual command that runs the test. Please note that if you forget the gb_JunitTest_add_classes macro to define the class name, the test may compile, but it will not run.

As an example, you can see the below patch. This patch fixes the problem of the JUnit test not running:

Final Words

Many macros are available in gbuild, making easier


Thursday
01 February, 2024


face
Logotip LibreOffice 24.2

Berlin, 31. januar 2024 – LibreOffice 24.2 Community, nova osrednja izdaja prostega, odprto-kodnega pisarniškega paketa, ki nastaja s pomočjo prostovoljcev, in hkrati prva, ki je oštevilčena na novi, na koledarski način (LL.M), je zdaj na voljo na naslovu https://sl.libreoffice.org/prenos za sisteme Windows (procesorje Intel, AMD in Arm), macOS (procesorje Apple in Intel) ter Linux. Nov način oštevilčevanja izdaj bo v pomoč uporabnikom, da bodo ohranjali svojo namestitev LibreOffice posodobljeno.

LibreOffice je edini prost, brezplačen in odprto-koden pisarniški paket, ki je po funkcionalnosti primerljiv z vodilnim lastniškim pisarniškim paketom na tržišču. Ponuja tudi številne možnosti vmesnika, ki ustrezajo različnim navadam uporabnikov, od tradicionalnih do sodobnih, in kar najbolje izkorišča zaslone različnih mer, saj optimizira prostor, ki je na voljo na namizju, tako da je čim večje število funkcij le klik ali dva stran.

Največja prednost LibreOffice pred vsemi drugimi pisarniškimi paketi je pogon LibreOffice Technology, ena sama programska platforma za vsa okolja: namizje, oblak in mobilne naprave. Ta infrastruktura omogoča, da LibreOffice ponuja boljšo izkušnjo uporabnikom in, kar je najbolj pomembno, izdela identične in povsem združljive dokumente na osnovi dveh obstoječih standardov ISO: odprtem zapisu ODF (Open Document Format) za uporabnike, ki jih skrbi združljivost, trdoživost in digitalna suverenost, in lastniški vrsti datotek Microsoft OOXML (DOCX, XLSX in PPTX).

Pomembne novosti v LibreOffice 24.2 Community


SPLOŠNO

  • Shranjevanje podatkov za samoobnovitev je privzeto omogočeno in ves čas ustvarja varnostne kopije. To zmanjšuje tveganje za izgubo vsebine za uporabnike-začetnike, ki niso seznanjeni z nastavitvami LibreOffice.
  • Popravljene različne možnosti zloženke s številnimi izboljšavami menija, izboljšano podporo za predogled tiskanja, pravilnim ponastavljanjem prilagojene postavitve ter izpiljeno rabo izbirnih gumbov. S tem je izboljšana izkušnja uporabnikov, vajenih uporabniškega vmesnika Microsoft Office.
  • Spustni seznam Vstavi poseben znak zdaj prikaže opis izbranega znaka (tudi v orodnem namigu, ko se gibljete nad njim).
WRITER
  • »Pravno« oštevilčenje seznama: omogoča, da določena raven seznama uporablja arabsko številčenje v vseh delih seznama.
  • Komentarji lahko zdaj uporabljajo sloge, pri čemer je njihov privzeti slog odstavka Komentar. Tako je lažje spreminjati oblikovanje vseh komentarjev naenkrat ali vizualno kategorizirati različne vrste komentarjev.
  • Podpora za večstranske plavajoče tabele je izboljšana na več načinov: nadzor prekrivanja, obrobe in sprotne opombe, gnezdenje, oblivanje na vseh straneh in povezane izboljšave vmesnika.

CALC
  • V zloženi zavihek Funkcije v stranski vrstici je dodano novo iskalno polje.
  • Znanstvena notacija števil je zdaj podprta in se shrani v ODF: z vdelanim besedilom (s številskim zapisom, kot je ###.000 E0), z malimi črkami za eksponente (s številskim zapisom, kot je ###.000e0), z eksponenti s praznim »?« namesto »0« (s številskim zapisom, kot je 0.00E+?0).
  • Na voljo je poudarjanje vrstice in stolpca dejavne celice.
IMPRESS IN DRAW
  • Delo s pomanjšanimi velikimi

Wednesday
31 January, 2024


face

Berlín, 31 de enero de 2024 – LibreOffice 24.2 Community, la nueva versión principal de la suite ofimática libre, que cuenta con el apoyo de voluntarios y la primera en utilizar el nuevo esquema de numeración basado en el calendario …


Thursday
25 January, 2024


face

In the first blog post on LibreOffice build system, gbuild which uses GNU Make, I discussed some of the features of it. Here I discuss more about some gbuild tips and tricks that you may need.

Building a Single Module

In order to build a single module, you need to use its name. For example, to build only “odk”, which contains office development kit, you only have to type:

make odk

On the other hand, there are many other build targets associated with odk. By typing make odk, and then pressing tab, you will see this list, which shows possible targets:

odk odk.buildall odk.perfcheck odk.uicheck odk.all odk.check odk.screenshot odk.unitcheck odk.allbuild odk.checkall odk.showdeliverables odk.allcheck odk.clean odk.slowcheck odk.build odk.coverage odk.subsequentcheck

Each of the above is related to a specific task, in which many of them are common on different modules. Let’s discuss some of them:

make odk -> Builds odk module.

make odk.clean -> Cleans the odk module, removing the generated files.

make odk.check -> Runs test in odk module

make odk.uicheck -> It runs UI tests inside odk module

make odk.perfchek -> Runs performance/callgrind tests inside odk module

make odk.screenshot -> Creates screenshots inside odk module

To get a complete list and detailed description, run make help.

Handling Incomplete Builds

Sometimes because of OS crash or power outage, you may face problems when a build is stopped forcefully. In that case, you may see several zero byte object (*.o) files that exist, and prevent a successful build. In that case, you can find and remove them using this command:

$ rm `find -name *.o -size 0`

After that, you can retry your build without the above problem.

Customizing Build Configuration

The process of creating Makefile starts from configuring LibreOffice for build. This is done by invoking ./autogen.sh. The configuration parameters are read from autogen.input. The build configuration is done via configure.ac, which is an input for GNU autoconf.

There are various steps before the Makefiles are generated. For example, in order to make sure that a library is there when configuring the build, a very small C/C++ file is created, compiled and tested to ensure that the library is ready, and available to use with C/C++ code.

It is also possible to check for some specific version of library, and available functions. As an example, see this patch, which checks for specific version of ZXing library:

In the above example, multiple situations are handled:

1) When there is no ZXing library

2) When system ZXing library is used

And also, it is checked that specific version of ZXing is available:

1) When ZXing::ToSVG is not usable

2) When ZXing::ToSVG is usable

Then, the HAVE_ZXING_TOSVG symbolic constant is used in config_host/config_zxing.h.in, which can be used in C++ code.

Knowing More About gbuild

If you are interested in knowing more about


face

Firebird Project is happy to announce general availability of Firebird 5.0 — the latest major release of the Firebird relational database for Windows, Linux, MacOS and Android platforms.This release introduces improvements in areas of performance, multithreaded processing (including backup, restore, sweep), SQL queries profiling, with better scalability and numerous enhancements in SQL


Tuesday
16 January, 2024


face

LibreOffice 24.2 – with a new year.month versioning scheme – will be released as final at the beginning of February, 2024 ( Check the Release Plan ) being LibreOffice 24.2 Release Candidate 2 (RC2) the forth pre-release since the development of version 24.2 started in mid June, 2023. Since the previous release, LibreOffice 24.2 RC1, 113 commits have been submitted to the code repository and 61 issues got fixed. Check the release notes to find the new features included in this version of LibreOffice.

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

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!


Friday
12 January, 2024


face

Using comments is a key feature in text processing. A typical workflow might be to review a document where notes are made by different colleagues. LibreOffice Writer currently shows these comments in the document margin, which is limited to the page height, ending up in the need to scroll long text (even while editing [1]) and eventually in paging-like interactions if the number of comments exceed the total size.…


face

General Activities

  1. LibreOffice 7.5.9 and 7.6.4 were announced on December 7
  2. Olivier Hallot (TDF) updated menu item paths in Help pages and updated and restructured dozens of help pages
  3. Rafael Lima fixed line count width in Writer file properties dialog, added a button leading to Download page in the dialog showing up if trying to access Help without offline files available and made it possible to enter edit mode for comments in Calc via Navigator. He also updated ScriptForge help and added a Help page about installing offline Help
  4. Stanislav Horacek did many fixes and cleanups in Help pages
  5. Ilmari Lauhakangas (TDF) made it so multi-selection is no longer possible in Start Center as it is not actionable. He also streamlined the navigation layout of Help
  6. Stéphane Guillou (TDF) linked Sidebar decks to Help and did other Help updates
  7. Alain Romedenne updated ScriptForge help pages
  8. Dione Maddern updated Help for Draw’s Consolidate Text functionality
  9. Sophia Schröder did many cleanups in Help
  10. Gábor Kelemen (allotropia) added support for XF86Forward / XF86Back key events for use in Impress slideshows and did code cleanups in the area of unused config keys and includes
  11. Laurent Balland did many fixes in Impress templates, collaborating with Jérôme Bouat
  12. Miklós Vajna (Collabora) worked on multi-page floating tables in Writer. He also updated pdfium and did fixes to automated tests
  13. Jean-Pierre Ledure worked on the ScriptForge library
  14. Michael Meeks (Collabora) fixed a deadlock
  15. Szymon Kłos, Áron Budea and Gökay Şatır (Collabora) worked on LOKit used by Collabora Online
  16. Nick Wingate (Collabora) added an option to define ranges when exporting Calc sheets to PDF
  17. Henry Castro (Collabora) made it so an error dialog pops up in Calc, if trying to insert a row after the maximum one
  18. Eike Rathke (Red Hat) fixed an issue with unwanted deletion of data ranges in Calc
  19. Tomaž Vajngerl (Collabora) streamlined the OOXML import of headers/footers in page styles, made handling of embedded SVGs in FODT files more robust and added support for writing SVG images into OOXML using the MS OOXML extension. He also did lots of refactoring in the EditEngine text editing code
  20. Julien Nabet fixed an issue with changing field options in Firebird databases, implemented more user management functionality for MySQL and MariaDB databases, made colour handling more robust in sparklines, fixed an issue with stepped line types in XY scatter charts and fixed StepTime being ignored with AnimatedImages in Basic Dialog (together with bug reporter Jurassic Pork). He also fixed crashes and many issues found by static analysers and did many code cleanups
  21. Andreas Heinisch made Mail Merge more robust with regards to database names
  22. László Németh continued polishing support for smart justify found in DOCX files and fixed an issue with soft hyphens not being displayed in text boxes and shapes
  23. Xisco Faulí (TDF) did many improvements and additions to automated tests and fixed regressions
  24. Michael Stahl (allotropia) revamped ODF encryption resulting in

Tuesday
09 January, 2024


face

LibreOffice 24.2 – with a new year.month versioning scheme – will be released as final at the beginning of February, 2024 ( Check the Release Plan ) being LibreOffice 24.2 Release Candidate 1 (RC1) the third pre-release since the development of version 24.2 started in mid June, 2023. Since the previous release, LibreOffice 24.2 Beta1, 158 commits have been submitted to the code repository and 59 issues got fixed. Check the release notes to find the new features included in this version of LibreOffice.

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

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!


Wednesday
03 January, 2024


face

Los miembros del proyecto de documentación de Ayuda de LibreOffice disponen ahora de un editor de Ayuda mucho mejor, gracias a Juan José Gonzales (JJ) del equipo TDF.

Basado en el editor creado originalmente por Olivier Hallot y Mike Saunders, …


face

Now that year 2024 has come, I want to briefly discuss the year 2023 around the development blog, and the outlook for 2024 here.

My goal is to help people understand LibreOffice code better, and ultimately get involved in LibreOffice core development to make LibreOffice better for everyone. In 2023, I wrote 23 posts around LibreOffice development in the dev blog (3 of them are unpublished drafts).

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.

LibreOffice conference 2023

LibreOffice conference 2023

Outlook For the New Year

My focus for 2024 in this blog will be:

  1. Introducing new EasyHacks
  2. Discussing how to fix crashes
  3. Explaining LibreOffice architecture
  4. Describing user interface creation with VCL
  5. Explaining LibreOffice extensions

You can give feedback by writing a comment here, or sending an email to hossein AT libreoffice DOT org.

I provide mentoring support to those who want to start LibreOffice development. You are welcome to contact me if you need help to build LibreOffice and do some EasyHacks via the above email address.

I hope the best for you in the new year 2024.


face

This post is part of a series to describe how Writer now gets a feature to handle tables that are both floating and span over multiple pages.

This work is primarily for Collabora Online, but is useful on the desktop as well. See the 10th post for the previous part.

Motivation

Previous posts described the hardest part of multi-page floating tables: making sure that text can wrap around them and they can split across pages. In this part, we'll look at a case where that content is not just text, but the wrapping content itself is also a table.

Results so far

Regarding testing of the floating table feature in general, the core.git repository has 92 files now which are focusing on correct handling of floating tables (filenames matching floattable-|floating-table-). This doesn't count cases where the document model is built using C++ code in the memory and then we assert the result of some operation.

Here are some screenshots from the improvements this month:

Improved click handling near the first page of a floating table

The first screenshot shows a situation where the mouse cursor is near the right edge of the first page of a floating table. What used to happen is we found this position close to the invisible anchor of the floating table on that page, then corrected this position to be at the real anchor on the last page. In short, the user clicked on one page and we jumped to the last page. This is now fixed, we notice that part of the floating table is close to the click position and we correct the cursor to be at the closest position inside the table's content.

A floating table, wrapped by an inline table: old, new and reference rendering

The next screenshot shows a floating table where the content wrapping around the table happens to be an inline table. You can see how such wrapping didn't happen in the past, and the new rendering is close to the reference now.

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


Thursday
21 December, 2023


face

In the previous part of the series on C/C++ strings, I described the string literal, plus how and why to use them. Then I introduced the new custom string literals and their benefits:

Using the New Custom O[U]String Literals

In this post, I am going to discuss two EasyHacks dedicated to the use of the new O[U]String literals in the code.

For tdf#158067, the idea is to use _oustr and _ostr suffixes instead of defining O[U]StringLiteral variables, and using them later.

For example,

OUString foo = "abc";

Becomes:

static constexpr OUStringLiteral FOO_STR = "abc";
...
OUString foo(FOO_STR);

The first line is using a compile time constant, but it is not clean, easy and not always desirable. After the introduction of the new shortcuts _ustr and _ostr, there is a new way to to create string literals in shorter form, available with C++20 standard. As C++20 is now the baseline for LibreOffice code, the new way is usable in the LibreOffice code.

For tdf#158068, the goal is to avoid C string literals, and replace those literals with the new O(U)String literals with appropriate prefixes. The benefit of doing that is to avoid run-time initialization of O[U]Strings, and do it in the compile time.

OUString foo("abc");

should become:

OUString foo(u"abc"_ustr);

Don’t Change Every O[U]String literal!

There are tests for O[U]StringLiterals that should not be touched at the moment. Eventually, developers will change them alongside the O[U]StringLiteral data types themselves.


Tuesday
19 December, 2023


face

Anunciamos la primera publicación de un documento muy importante que describe -en un lenguaje accesible para todos, incluidos los no especialistas en seguridad- el impresionante trabajo realizado por los desarrolladores y los especialistas en control de calidad en el área …

<- Current blog entries