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
04 November, 2024


face

LibreOffice Conference 2024 group photo

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

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

YouTube privacy policy

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

  • In addition, we’ve started editing and uploading videos from the talks. Here’s the first batch – but there are many more to come, and we’ll put them on PeerTube too. (Apologies for the occasional video stutter in some places.)

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

YouTube privacy policy

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

LibreOffice at Software Freedom Day celebrations in Nepal

  • We talked to Ritobroto Mukherjee about the work he’s doing to improve LibreOffice, as part of the Google Summer of Code. He also tells us about his experiences joining our community.

Ritobroto Mukherjee<

  • Then we caught up with Jonathan Clark, who recently joined the small team at The Document Foundation to work on improving LibreOffice’s language support, especially for RTL / CTL / CJK.

Jonathan Clark

  • On the release side, we had one update to LibreOffice in October – version 24.2.7, planned to be the last in the 24.2 branch. Then all users are strongly recommended to upgrade to the latest stable branch, LibreOffice 24.8.

LibreOffice 24.2 banner

Rafael Lima

  • And finally, we looked ahead to some upcoming and future events. The LibreOffice project will be at FOSDEM 2025 in Brussels at the start of February, for instance. And thinking further ahead: we’re looking for people to host the LibreOffice Conference 2025!

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


Sunday
03 November, 2024


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

21:00 UTC

face
  • All Saints family service, played Violin; home for two-person Pizza lunch, played sudoku together. Picked up E. from Ely together, played games & watched movies.

face

We’ve uploaded the first batch of videos from the recent LibreOffice and Open Source Conference 2024! (Apologies for the video stutter in a few places – which was beyond our control.)

This is just the beginning, with many more still to come (and PeerTube versions too). So enjoy watching, and click in the top-right to choose videos from the playlist…

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

YouTube privacy policy

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


Saturday
02 November, 2024


[en] Michael Meeks: 2024-11-02 Saturday

21:00 UTC

face
  • Up lateish; some mail chew, J. dropped M. into Cambridge North to return to University. Worked through legalese. Lunch.
  • Out for a walk with J. Bit more work, dinner together, relaxed.

Friday
01 November, 2024


[en] Michael Meeks: 2024-11-01 Friday

21:00 UTC

face
  • Sync with Dave, mail chew, patch review variously; spreadsheets, modelling, slides, back to contract text.
  • Dinner, played bananagrams with M. & watched Hotel Rwanda.

Thursday
31 October, 2024


[en] Michael Meeks: 2024-10-31 Thursday

21:00 UTC

face
  • Tech. planning call, mail chew, project & resource planning bits. Patch review left & right.
  • Out to see Ha!Milton in Cambridge with David via a Burger van: Milton Jones - clean, intellectual comedy: great fun & sold out.

Wednesday
30 October, 2024


[en] Michael Meeks: 2024-10-30 Wednesday

21:00 UTC

face
  • Up earlyish, out for a run with J. Call with a friend, and Eloy, sync with Dave, plugged at patches, admin, E-mail, filled in on project management for Lily. Sales call.
  • Music group practice at our house in the evening to avoid a Denary meeting at church.

face

Hola Jonathan, has sido contratado por The Document Foundation en el papel de desarrollador centrado en los temas de idiomas escritos de derecha a izquierda, o RTL (Right to Left).

No sólo temas de RTL – también CTL (Complex Text …


face

El Comité Directivo de Ingeniería de LibreOffice (ESC) ha nombrado al profesor Rafael Henrique Palma Lima de la Universidad Tecnológica Federal de Paraná (UTFPr) como el más reciente desarrollador certificado de LibreOffice.

El profesor Rafael ha estado contribuyendo con nuevo …


Thursday
24 October, 2024


face

In previous blog posts about crashes in LibreOffice, I have discussed how to debug and fix some of crashes. Now I discuss a nice tool to keep track of the crash reports from volunteers: Crash report tool.

Crash Report Statistics

Crash report is available via this LibreOffice website:

You can see that different versions of LibreOffice listed there, and for each and every tracked version, number of crashes during the previous 1, 3, 7, 14 and 28 days can be seen. This is possible using the appropriate buttons on the top.

This data is gathered from those to volunteer to submit reports to make LibreOffice better.

This statistic is very helpful to understand the robustness of the builds in different versions.

Crash Signatures

If you choose a specific version, you may see signatures of the crashes. This is helpful when trying to fix crashes. For example, this is one of the crash signatures found in LibreOffice 24.8.0.3:

This shows that the crash happens in GetCharFormat() function. One may use this information to track and fix the problem.

Looking into one of the crashes, one may see the details of the crash, including the stack trace in the crashing thread, and link to the exact place of the source code that leads to the crash.

As an example, you can see this crash report.

Sometimes, experienced developers may be able to reproduce the bug using crash signatures while knowing some background. Otherwise, in most cases, filing a bug with documents and instructions to reproduce the bug is essential. Adding a link to the crash report can be helpful.


Tuesday
22 October, 2024


face

Durante el V Congreso Latinoamericano de LibreOffice, que se llevará a cabo el 5 y 6 de diciembre de 2024 en Montevideo, Juan José González (México), desarrollador web de The Document Foundation (TDF), compartirá su visión para mejorar y …


Thursday
17 October, 2024


face

Windows Subsystem for Linux (WSL) is a mechanism to use complete Linux distributions on Windows. Here I discuss how to use it to build LibreOffice for both Linux and Windows binaries.

What is WSL?

WSL is the relatively new mechanism in Windows that lets you use a complete Linux distribution alongside your Windows. Interoperability between WSL and Windows lets you to share files and utilities between Windows and Linux. That is where it becomes helpful for LibreOffice, as LibreOffice make depends heavily on GNU tools, which are available in Linux.

Linux or Windows?

You can use WSL for 2 different scenarios:

1. Building for Linux: this is the full Linux build, in which Linux compilers, libraries and utilities will be used to create a Linux binary. You can then run or package the Linux build. You can find more information here:

Using WSL2 is recommended, as it is supposed to be faster, and also you can simply use the graphical interface of LibreOffice.

LibreOffice build on WSL with Linux binaries, displayed on Windows

LibreOffice build on WSL with Linux binaries, displayed on Windows

When you run the resulting binary, the graphical interface is usable, and it will use GTK fronted by default.

2. Building for Windows: this is the WSL as helper mode, where it uses only a few Linux utilities like pkg-config, make, automake and a few other utilities to configure the project.  Then, GNU Make for Windows will be the tool to build the project. More information is available here:

The results are Windows .exe files, and you can simply run them on Windows as native programs.

Build Options on Windows

You can build LibreOffice on different platforms. On Windows, it is possible to use Cygwin, but using WSL can be faster, and considering some issues with recent Cygwin versions, WSL is an alternative.

One can imagine of other ways to build LibreOffice on Windows, including MinGW. But, at the moment, MinGW, both as a helper to use Visual Studio, and also as an independent distribution to build LibreOffice, is not usable due to various reasons.

And last note: if you do not have prior experience with LibreOffice development but you are interested, you can start from our video tutorial for getting started with LibreOffice development.


face

En el marco del V Congreso Latinoamericano de LibreOffice, que se celebrará el 5 y 6 de diciembre de 2024 en Montevideo, tendremos el privilegio de contar con Ismael Fanlo (España), un referente en el mundo de la ofimática


Tuesday
15 October, 2024


face

General Activities

  1. LibreOffice 24.2.6 was released on September 5
  2. LibreOffice 24.8.1 was released on September 12
  3. LibreOffice 24.8.2 was released on September 27
  4. Olivier Hallot (TDF) continued with a massive Help bookmark cleanup effort, updated help for BASIC Now() function, improved the help for regular expressions by including a description of \w and \W patterns and extended the Document Type Definition of Help XML
  5. Pierre F. improved readability and maintainability of the Document Type Definition of Help XML and updated help for Navigator in Calc after the addition of comment deletion functionality
  6. Dione Maddern added help pages for Properties Sidebar decks, updated help for Styles Sidebar deck and added a help page for database table references
  7. Adolfo Jayme Barrientos improved UI strings in Calc and updated Help pages accordingly
  8. Bogdan Buzea improved UI strings and updated Help pages accordingly
  9. Laurent Balland did many updates and cleanups to Impress templates, for example replacing images with vector graphics for better quality
  10. Miklós Vajna (Collabora) implemented per-paragraph semi-transparent shape text in Impress and added digital signing support to LOKit
  11. Michael Meeks, Tomaž Vajngerl, Bayram Çiçek, Rashesh Padia, Gülşah Köse and Marco Cecchetti (Collabora) worked on LOKit used by Collabora Online
  12. Jaume Pujantell (Collabora) added a command to promote a Writer reply comment to a new main one and fixed an issue with comment threads breaking when exporting ODT files as DOCX
  13. Julien Nabet fixed database queries being saved corrupted, fixed incorrectly included values with BETWEEN and NOT BETWEEN statements in dBASE file connections, fixed an issue preventing the use of Report Builder Wizard and added the new Histogram chart type to Sidebar’s Chart deck
  14. Xisco Faulí (TDF) added the schema for ODF 1.4 while doing several fixes and adaptations related to it, converted many Java tests to CppUnit tests, fixed an issue with Position and Size dialog showing dimensions in incorrect measurement units, upgraded many dependencies and fixed some crashes
  15. Michael Stahl (allotropia) fixed issues with hiding of FlyFrames in hidden sections, made zip file handling more robust, made the display of hidden text with a non-hidden paragraph marker in Microsoft document formats match that of MS Word and fixed an issue related to widow paragraphs in sections
  16. Mike Kaganski (Collabora) made BASIC’s CStr() and Format() functions produce localized output for currency values, fixed a DOCX table layout issue, fixed an issue with undo history being populated simply by opening a certain Impress presentation, implemented a fallback for inline formulas in imported PPTX files, implemented handling of Exit Property for Property Set in BASIC, improved the performance of Writer table row height calculation while also making it correct and fixed an issue resulting in broken OLE objects when re-exporting some PPTX files. He also fixed many crashes and did code cleanups
  17. Caolán McNamara (Collabora) improved the layout of Start Center and made Impress/Draw Navigator focus handling more robust. He also fixed many issues found by static analysers

Friday
04 October, 2024


face

The SVG export in Impress now supports a per-paragraph setting to handle semi-transparent shape text, while previously this was only possible to control at a per-shape level.

This work is primarily for Collabora Online, but the feature is available in desktop Impress as well.

Motivation

As described in a previous post, Impress already had the capability to have semi-transparent shape text, but the SVG export of this for the case when not all paragraphs have the same setting was broken.

Transparency in SVG can be described as a property of a group (<g style="opacity: 0.5">...</g>) and it can be also a property of the text (<tspan fill-opacity="0.5">...</tspan>).

The SVG export works with the metafile of the shape, so when looking for meta actions, it tries to guess if the transparency will be for text: if so, it needs to use the tspan markup, otherwise going with the g markup is OK.

What happened here is that meta action for a normal text started, so the SVG export assumed the text is not semi-transparent, but later the second line was still transparent, so we started a group element, and this resulted in a not even well-formed XML output.

Results so far

The relevant part of the test document is simple: just 3 paragraphs, the second one is semi-transparent (and also has a bullet, as an extra):

Bugdoc: original Impress render

Once this was exported to SVG, this resulted in a non-well-formed XML, so you got this error in a web browser:

Bugdoc: old SVG render

Once tweaking the transparency mask writer to check if text started already, we get the correct SVG render:

Bugdoc: new SVG render

How is this implemented?

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

The bugfix commit was SVG export: fix handling of semi-transparent text inside a list.

The tracking bug was tdf#162782.

Want to start using this?

You can get a development edition of Collabora Online 24.04 and try it out yourself right now: try the development edition. 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 (25.2).


Thursday
03 October, 2024


face

LibreOffice options page provides rich set of settings for everyone who wants to tune LibreOffice to match their needs. But, what if you as a developer, need setting dialogs that are needed elsewhere in the LibreOffice application? Here I discuss some of such use cases, which are handled by defining UNO commands.

Options Page

The code for providing “Tools > Options” is not in a single module, but main part resides in cui module, which contains code which is used across different modules. Looking into cui/source/options/ folder from LibreOffice core source code, you can see various different source files related to the options. The biggest file there is cui/source/options/treeopt.cxx, which is the actual implementation of the tree-based dialog that you see when you open Tools > Options dialog. There are other C++ files that handle .ui files related to options. You can find those UI files in cui/uiconfig/ui/ folder with a name like opt*.ui:

$ ls cui/uiconfig/ui/opt*.ui

These files can be edited and they are used as described in the LibreOffice design blog:

UNO Dispatch Commands

Only some of the dialogs can be opened available via UNO dispatch commands. As an example, you may see “.uno:AdditionsDialog” is used both in cui/source/options/optgdlg.cxx for creating a dialog in Tools > Options (when you click for “more icons”), and also in sfx2/source/appl/appserv.cxx.

You can try running this UNO command in LibreOffice BASIC editor with this code snippet:

Sub Main()
    Set oDispatch = CreateUnoService("com.sun.star.frame.DispatchHelper")
    Dim args(0) As New com.sun.star.beans.PropertyValue
    Set oFrame = StarDesktop.Frames.getByIndex(0)
    oDispatch.executeDispatch(oFrame, ".uno:AdditionsDialog", "", 0, args)
End Sub

The above command is defined specifically to help developers use the “Extensions” dialog, anywhere in LibreOffice UI, from top menus to context menus and toolbars and also in code, in a simple way.

"Extensions

There is another dialog titled “Security Options and Warnings”, which is opened through .uno:OptionsSecurityDialog UNO command. In this way, it can be used easily in other modules of LibreOffice.

SecurityOptionsDialog

SecurityOptionsDialog

Implementing UNO Command

Adding a new UNO command was discussed before, in a separate blog post:

Adding a new UNO command

Adding a new UNO command for an options dialog is basically the same. There can be differences regarding the configurations and the data that is passed between the dialog and the caller.

When you create a dialog box directly like the code snippet below, you have access to the member functions defined for that specific dialog:

IMPL_LINK_NOARG( SwGlossaryDlg, PathHdl, weld::Button&, void )
{
    SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
    ScopedVclPtr<AbstractSvxMultiPathDialog> pDlg(pFact->CreateSvxPathSelectDialog(m_xDialog.get()));
    SvtPathOptions aPathOpt;
    const OUString sGlosPath( aPathOpt.GetAutoTextPath() );
    pDlg->SetPath(sGlosPath);
    if(RET_OK == pDlg->Execute())
    {
        const OUString sTmp(pDlg->GetPath());
        if(sTmp != sGlosPath)
        {
            aPathOpt.SetAutoTextPath( sTmp );
            ::GetGlossaries()->UpdateGlosPath( true );
            Init();
        }
    }
}

As you can see, pDlg->GetPath() is accessible here, and you can use it to


Saturday
28 September, 2024


face

Hoy es un día especial para la comunidad LibreOffice.

Hace 14 años, decidimos dar un paso audaz y crear LibreOffice, la mejor suite ofimática de código abierto.

Desde entonces, hemos conseguido llevar LibreOffice a lo más alto de la comunidad …


Thursday
19 September, 2024


face

Nothing ever happens.

And nothing ever happens, nothing happens at all The needle returns to the start of the song And we all sing along like before -- Del Amitri, Nothing Ever Happens

In my last post on Libreoffice I promised to talk about Writer changes once in a while, but then ... nothing ever happened. However, given that I had an annoying motorcycle accident in the meantime that turned out much more persistently annoying than originally thought, I think I have a bit of an excuse.

So ... what did happen? For one, I fixed quite a few regressions with my name on them, but ... is there much to talk about here? Mostly not: If you look at the fixes, they are often oneliners fixing something that seems rather obvious in retrospect. The more tricky question is: how did these get in in the first place? Its hard for me to say that, as the introducing commits are from even longer ago.

One thing is certain though: Often a unittest would have caught them, so whenever possible, I tried to create a reproducer adding such a test with the fix. To anyone writing bug reports: Creating minimal reproduction test is hugely valuable in this -- not just for finding the issue, but also as a starting point for a regression test. So if a bug bugs you and it is missing a minimal reproduction scenario, adding one is a great way to move this forward. Oh, and maybe verifying a bugfix, if someone provided a fix and the friendly bot say affected users are "encouraged to test the fix and report feedback".

While doing these fixes, I stumbled over Noel suggesting to speed up bookmarks in writer which is of course great, but I noticed that the code could be optimized a bit more as the bookmarks of a document are now sorted by their starting position (which was one of the first changes I made back on OpenOffice.org about more than a decade ago). Thus we can use bisectional search on the bookmarks here, which should be even faster. Now, it would be great if the discussion on this between Noel and me would available for others to learn from, wouldnt it? The cool thing is: it is.

All discussion happened on gerrit in the comments so if you want to learn about bookmark in Writer and how to maybe speed them up for documents that have a lot of them, that is a great starting point! Is there anything to add? Well maybe the following: Currently the bookmarks starting at the same position are currently not sorted. If one would sort them by their end position, the bisectional search could maybe cover even more? This would also remove one extra loop of logic and make the code simpler and easier to read.

The performance improvement is likely irrelevant -- esp. since there will be not that many documents with lots of bookmarks starting at the same position. The simpler code might


Monday
09 September, 2024


face

General Activities

  1. LibreOffice 24.8.0 was released on August 22
  2. Olivier Hallot (TDF) continued with improvements to Calc function help pages, added help pages for Sidebar settings and graphics export via command line, improved help pages for Writer Status Bar, Calc’s Similarity Search and database ranges, updated menu item paths in Help, did lots of Help cleanups, added some extended tooltips, improved the dialog for easy conditional formatting in Calc and removed a misleading Restore Default button from Sidebar Settings
  3. Alain Romedenne improved help for BASIC’s If statement and added unit tests for IF THEN statements in BASIC and VBA
  4. Pierre F. made two dozen improvements to help, in areas such as Calc functions, word count, change tracking, BASIC, regular expressions, AutoRecovery and backup, and freezing of rows and columns in Calc
  5. Dione Maddern added a help page for Quick Find Sidebar deck, updated the help for Writing Aids, reworked help pages for Navigator and Navigation toolbar and updated the instructions for enabling remote control in Impress Remote user guide
  6. Adolfo Jayme Barrientos updated help pages about digital signatures after UI changes
  7. Laurent Balland did cleanups in Resume Writer template and Beehive, Blue Curve, DNA, Blueprint Plans, Focus, Inspiration, Light, DNA, Midnightblue, Piano, Portfolio, and Progress Impress templates
  8. Miklós Vajna (Collabora) made it faster to open DOCX files with many shapes and sections, and headers/footers activated, fixed a layout loop in a certain DOCX file with a complex full-page group shape, fixed losing paragraph styles with many numberings in DOCX export and made Writer layouting smarter, improving performance in LOKit
  9. Sven Göthel, Skyler Grey, Hubert Figuière, Andras Timar, Michael Meeks and Áron Budea (Collabora) worked on LOKit used by Collabora Online. Michael also optimised loading times by reducing the frequency of progress bar updates
  10. Jaume Pujantell (Collabora) implemented handling of firstHeaderRow attibute in XLSX pivot tables and fixed a crash seen when editing text in shapes in Collabora Online
  11. Tomaž Vajngerl (Collabora) worked on the new histogram chart type
  12. Julien Nabet fixed an issue preventing deletion of MySQL/MariaDB tables with spaces in their names and did some code cleanups
  13. Xisco Faulí (TDF) fixed a PDF export crash, improved the contrast accessibility check and did many dependency updates
  14. Michael Stahl (allotropia) improved some automated tests, fixed issues with hidden sections, made HTML pasting more robust when dealing with placeholder fields in Writer, fixed a wrapping issue with long index entries, simplified the code for JPEG quality levels in PDF export and made UA PDFs compatible with Adobe Acrobat Pro’s accessibility checker
  15. Mike Kaganski (Collabora) worked around a bug in MS Access ODBC 64-bit driver preventing database table editing, fixed an issue in Insert Special Character dialog related to changing the font selection and made it possible to filter characters in the dialog by Unicode value, fixed an issue with Calc’s EXACT function when working in array context, improved stability by preventing the closing of a document while it is being layouted

Wednesday
04 September, 2024


face

Un punto de reencuentro para toda la comunidad latinoamericana.

Tras exitosas ediciones anteriores en Paraguay, Brasil y México, el mayor evento del proyecto LibreOffice en América Latina llega a Uruguay.

Con el objetivo de reunir usuarios y colaboradores para promover …


Tuesday
03 September, 2024


face

Writer now has support for doing partial layout passes when LOK clients have pending events, which sometimes improves interactivity a lot.

This work is primarily for Collabora Online, but the feature is useful for any LOK clients.

Motivation

I recently worked with a document that has relatively simple structure, but it has 300 pages, and most of the content is part of a numbered list. Pasting a simple string (like an URL) into the end of a paragraph resulted in a short, but annoying hang. It turns out we updated Writer's layout for all the 300 pages before the content was repainted on the single visible page. In theory, you could reorder events, so you first calculate the first page, you paint the first page, then you calculate the remaining 299 pages. Is this possible in practice? Let's try!

Results so far

The relevant part of the test document is simple: just an empty numbered paragraph, so we can paste somewhere:

Bugdoc: empty paragraph, part of a numbered list and then pasting an URL there

This is a good sample, because pasting into a numbered list requires invalidating all list items in that list, since possibly the paste operation created a new list item, and then the number portion has to be updated for all items in the rest of the list. So if you paste into a numbered list, you need to re-calculate the entire document if all the document is just a numbered list.

The first problem was that Writer tracks its visible area, but LOK needs two kinds of visible areas. The first kind decides if invalidations are interesting for part of the document area. LOK wants to get all invalidations, so in case we cache some document content in the client that is near the visible area, we need to know when to throw away that cache. On the other hand, we want to still track the actually visible viewport of the client, so we can prioritize visible vs hidden parts of the document. Writer in LOK mode thought that all parts of the document are a priority, but this could improved by taking the client's viewport into account.

The second problem was that even if Writer had two layout passes (first is synchronous, for the visible area; second is async, for the rest of the document), both passes were performed before allowing a LOK client to request tiles for the issued invalidations.

This is now solved by a new registerAnyInputCallback() API, which allows the LOK client to signal if it has pending events (e.g. unprocessed callbacks, tiles to be painted) or it's OK for Writer layout to finish its idle job first.

The end result for pasting a URL into this 300 pages document, when measuring end-to-end (from sending the paste command to getting the first updated tile) is a decrease in response time, from 963 ms to 14 ms.

How is this implemented?

If you would like to know


Monday
26 August, 2024


face

When I translated one book about Python to Russian which contained many examples of Python code I though quite long how to highlight them in the normal text. For book writing I used LibreOffice Writer (of course) but Writer has no a standard tool for code highlighting.

So after some searching I found the LibreOffice extension - Code Highlighter 2. It is also available on our extension site. This extension makes code highlighting using Pygments Python library. There is support for many programming languages and many color styles for highlighting there.

The extension worked fine, but I didn't like that for highlighting I should manually select every code example in the text, then press some shortcut, then select another code example, etc...

I wrote an issue on the extension github page and after some discussions the extension author Jean-Marc Zambon implemented a new feature that allows to highlight all code example in the book in only one action using Paragraph style!

So my workflow in this case will be as follows:

  • Create a snippet for the AutoText with code example that has a special paragraph style (for example, with font name Consolas and font size 12pt) with name, for example too - 'Python_code'.
  • Use this snippet to insert code examples
  • In the end of book writing just use the new feature in the extension and highlight all code examples in only one action!

 


Above you can see examples of the Code Highlighter work with some light and some dark styles.


Sunday
25 August, 2024


face

Nova osrednja izdaja ponuja občutno število novih funkcionalnosti ter obilico izboljšav medopravilnosti.


Berlin, 22. avgust 2024 - LibreOffice 24.8, nova osrednja izdaja najboljšega odprtokodnega pisarniškega paketa za Windows (Intel, AMD in ARM), macOS (Apple in Intel) in Linux, ki jo podpirajo prostovoljci, je na voljo na naslovu https://sl.libreoffice.org/prenos. To je druga osrednja izdaja, oštevilčena na novi, na koledarski način (prvo število za letnico izdaje, drugo število za mesec izdaje) ter prva, ki ponuja uradne pakete za osebne računalnike s sistemom Windows s procesorji ARM.

LibreOffice je edini pisarniški paketov ali, če želite, edino programje za ustvarjanje dokumentov, ki lahko vsebuje osebne ali zaupne podatke, a tudi spoštuje zasebnost uporabnikov, s čimer zagotavlja, da se uporabnik lahko odloči, če in s kom je pripravljen deliti vsebino, ki jo je ustvaril. Kot takšen je LibreOffice najboljša izbira za vse uporabnike pisarniških paketov, ki jim je zasebnost pomembna vrednota, po naboru funkcionalnosti pa je primerljiv z vodilnim izdelkom 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 konkurenčnimi pisarniškimi paketi je pogon tehnologije LibreOffice, ena sama programska platforma, na kateri so zasnovani namizne, mobilne in oblačne različice Libreoffice - tudi tiste, ki jih ponujajo podjetja iz ekosistema. To omogoča, da LibreOffice ponuja boljšo izkušnjo uporabnikom in izdela identične in povsem združljive dokumente na osnovi dveh obstoječih standardov ISO: odprtem zapisu ODF (Open Document Format) za uporabnike, in lastniški vrsti datotek Microsoft OOXML (DOCX, XLSX in PPTX). Slednje v sebi skrivajo mnogo umetne kompleksnosti, kar lahko povzroča težave uporabnikom, ki zaupajo, da uporabljajo resnično odprt standard.

Končnim uporabnikom, ki potrebujejo podporo, bo v pomoč že takoj dosegljiv priročnik LibreOffice 24.8 Getting Started Guide (v angl.), ki ga lahko prenesete z naslednje povezave:

https://documentation.libreoffice.org/en/english-documentation/ (v angl.)
Poleg tega je na voljo tudi tehnična pomoč prve ravni prostovoljcev na uporabniških dopisnih seznamih ter spletišču Ask LibreOffice: https://ask.libreoffice.org

Novosti v LibreOffice 24.8


ZASEBNOST

  • Če je potrjena možnost Orodja ▸ Možnosti ▸ LibreOffice ▸ Varnost ▸ Možnosti ▸ Pri shranjevanju odstrani zasebne podatke", se osebni podatki ne bodo izvozili (imena avtorjev in časovni žigi, trajanje urejanja, ime tiskalnika in njegove nastavitve, predloga dokumenta, avtorji in datumi komentarjev ter sledi sprememb);

WRITER

  • Vmesnik: ravnanje z oblikovalnimi znaki, širina podokna komentarjev, izbiranje oznak za sezname, novo pogovorno okno za hiperpovezave, novo zloženo okno Najdi v stranski vrstici;
  • Krmar: dodajanje navzkrižnih sklicev z vleci-in-spusti, brisanje sprotnih in končnih opomb ter izpostavljanje slik z okvarjenimi povezavami;
  • Deljenje besed: izključene besede iz deljenja z novim kontekstnim menijem in

Friday
23 August, 2024


face

In Collabora Online (for the normal mode of operation) we have a single server process (coolwsd) that spawns a separate process (kit) to load and manage each individual document. Each of those per-document kit processes runs in its own isolated environment. See architecture for details.

Each environment contains a minimal file system (ideally bind mounted from a template dir for speed, but linked/copied if not possible) that each kit chroots into, limiting its access to that subtree.

That chroot requires the CAP_SYS_CHROOT capability (and the desirable mount requires the CAP_SYS_ADMIN capability), and granting those capabilities to the coolforkit and coolmount binaries is a root privilege that, for typical deb/rpm packages, is done automatically at install time.

But it would be far more convenient not to require these capabilities to be set to do this isolation. They grant online more ability to affect its host system than it uses, we only want to mount dirs and chroot into dirs that belong to online and have no need or desire to make them available to any other process or user, and it's awkward, especially during development. to require root privileges to set these capabilities.

This scenario is not unique, and Linux provides namespaces, typically used by container implementations, to support achieving this. So recent work in Collabora Online leverages these namespaces to do its own layer of per-document kit isolation. (There's a good series of articles by Steve Ovens on the various namespaces, with the mount namespaces the most relevant one here.)

In essence, a user level process can create its own namespace in which it is apparently root from its own perspective, but as the original uid from the outside perspective and limited to operating on resources that the original uid is limited to accessing. So for each forkit, instead of requiring initial system capabilities and creating a system level bind mount we instead have no specific initial capabilities, enter a new namespace, unique to each forkit, in which that forkit becomes king of its own castle with apparent full capabilities, and can create bind mounts and chroot into its minimal file system.

Which is pretty magical to me as the whole existence of namespaces passed me by entirely without notice despite debuting over a decade ago.

Nothing is ever simple however, so some hurdles along the way.

Entering the namespace "requires that the calling process is not threaded" (man 2 unshare) which is not a problem for the normal use case in each kit, but did pose a problem for the test coolwsd does in advance to probe if there are working namespaces on the system in determine if it should operate kits in namespace mode or not. There it turned out that the Poco::Logger we use backups existing logs when it creates a new one, and then by default spawns a  thread to compress the old log.

I initially had the vague notion that I could treat a namespace as a sort pseudo-sudo and


Wednesday
21 August, 2024


face

General Activities

  1. LibreOffice 24.2.5 was released on July, 25
  2. Olivier Hallot (TDF) did many improvements to Calc function help pages and added documentation for wildcards in the Find & Replace help content
  3. Alain Romedenne added a help page for supported MS Office VBA object features and improved the help for IF Basic statement
  4. Pierre F. did many improvements to Calc function help pages and clarified the help text on crash reporter
  5. Dione Maddern reworked the help pages concerning Styles Sidebar deck and added a help page for Page Sidebar deck
  6. Stanislav Horáček updated help for Calc’s XMATCH function
  7. Gábor Kelemen (allotropia) did code cleanups in the area of warnings
  8. Laurent Balland did cleanups in Yellow Idea, Candy, Freshes and Growing Liberty Impress templates
  9. Miklós Vajna (Collabora) continued polishing support for content controls, improved the performance of working with documents having an unusually large number of bulleted lists, disabled export of form fields as PDF forms by default to match user expectations better and improved font fallback in DOCX import
  10. Szymon Kłos, Jaume Pujantell, Attila Szűcs, Michael Meeks, Pranam Lashkari, Marco Cecchetti, Áron Budea and Henry Castro (Collabora) worked on LOKit used by Collabora Online
  11. Tomaž Vajngerl (Collabora) continued refactoring and improving the code for Impress annotations
  12. Julien Nabet fixed crashes and did code cleanups especially in Python code
  13. Xisco Faulí (TDF) fixed an issue with deleting empty columns in Calc removing formatting from adjacent column, fixed a table copying crash, did simplifications in automated tests, added a dozen new tests, converted some tests from Java to Cppunit and upgraded Python to 3.10 alongside other dependency updates
  14. Michael Stahl (allotropia) made document repairing code more robust and made it possible to remove autoformatting from a Writer table while adding a configuration option to disable automatic updates of autoformatting when editing a table
  15. Mike Kaganski (Collabora) fixed rendering issues with GDI and EMF metafiles, made clipboard handling more robust on Windows, made UI tests more stable on Windows, fixed many issues related to database functionality, also making the Firebird integration better, made HTML/ReqIF export more robust and improved the performance of Calc autoformatting when applying to whole rows. He also did many code cleanups and optimisations
  16. Caolán McNamara (Collabora) fixed incorrect font emphasis in Expert Configuration dialog, fixed an issue with a certain type of imported PDF appearing as blank after exporting, improved font fallback automated tests and fixed crashes. He also fixed many issues found by static analysers and fuzzers
  17. Stephan Bergmann (allotropia) worked on WASM build, finishing the UNO bridge for it and enabling Start Center
  18. Noel Grandin (Collabora) greatly improved the export time of complex XLS/X spreadsheets to ODS, made UI tests more stable by making them use a generic clipboard rather than the system one, improved the performance of rendering animated GIFs in Impress and improved the saving time of ODS files with lots of comments
  19. Justin Luth (Collabora) implemented an option to the page number wizard

Thursday
15 August, 2024


face

Various functionalities of the LibreOffice are available through its programming interface, the UNO API. Here I discuss how to extend it.

What is UNO API?

Many functionalities of the LibreOffice is available through UNO API. You can write extensions and external programs that use LibreOffice functionality without the need to change the LibreOffice core source code.

Extensions work seamlessly with the software, and external applications can connect to the LibreOffice process and use it. The ability to do that depends on the UNO API.

On the other hand, some functionalities may not be available through this API. For example, newer features of the decent versions of LibreOffice, or functionalities that are not useful and/or important for external applications. Sometimes, you may want to use such functionalities elsewhere. Then you have to modify the LibreOffice core source code, and expose those functionalities through the API make them available to the external applications.

Let’s refer to the LibreOffice Developer’s Guide, which is mostly around the LibreOffice UNO API. There, you can read:

“The goal of UNO (Universal Network Objects) is to provide an environment for network objects across programming language and platform boundaries. UNO objects run and communicate everywhere.”

As UNO objects should be usable across different languages and platforms, they are described in an abstract meta language called UNOIDL (UNO interface definition language). This is similar to the IDL definitions in many other technologies like CORBA.

Example UNO API: FullScreen

The API that I discuss here, provides functionality to control full screen functionality for top level windows. Stephan, experienced LibreOffice developer, added that API in this commit:

commit af5c4092052c98853b88cf886adb11b4a1532fff

Expose WorkWindow fullscreen mode via new XTopWindow3

...deriving from the existing XTopWindow2. (Exposing this functionality via UNO
is useful e.g. for some embedded LOWA example application.)

The changes in this commit are over these files:

offapi/UnoApi_offapi.mk
offapi/com/sun/star/awt/XTopWindow3.idl
toolkit/inc/awt/vclxtopwindow.hxx
toolkit/source/awt/vclxtopwindow.cxx

First one, offapi/UnoApi_offapi.mk is needed to introduce the IDL file, according to its module, in a proper location. XTopWindow3.idl is added in com/sun/star/awt, which corresponds to com.sun.star.awt module. The other two, vclxtopwindow.hxx and vclxtopwindow.cxx are the implementation of the API in C++.

Let’s look into XTopWindow3.idl:

module com { module sun { module star { module awt {

/** extends XTopWindow with additional functionality

@since LibreOffice 25.2
*/
interface XTopWindow3: XTopWindow2 {
/** controls whether the window is currently shown full screen */
    [attribute] boolean FullScreen;
};

}; }; }; };

As you may see, it contains these important information:

1. It is an interface, called XTopWindow3.

2.It has a boolean attribute, FullScreen.

3. This functionality will be available in LibreOffice 25.2 and later.

4. This interface extends XTopWindow interface. You may find the documentation for XTopWindow in api.libreoffice.org.

More information about XTopWindow interface can be found in XWindow section of the LibreOffice Developer’s Guide, chapter 2.

C++ Implementation

C++ implementation basically consists of two functions to set


Wednesday
07 August, 2024


face

Writer now has improved support for font fallback when you open a DOCX file that refers to fonts which are not available currently.

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

Motivation

Font embedding is meant to solve the problems around missing fonts, but you can also find documents with stub embedded fonts that are to be ignored and our code didn't have any sanity check on such fonts, leading to unexpected glyph-level fallbacks. Additionally, once font-level fallback happened, we didn't take the font style (e.g. sans vs serif) into account, which is expected to work when finding a good replacement for the missing font.

Results so far

Here is how to the original rendering looked like:

Bugdoc, before: ugly glyph-level fallback

Once the handler for the embedded fonts in ODT/DOCX was improved to ignore stub fonts where even basic glyphs were not available, the result was a bit more consistent, but still bad. Here is a different document to show the problem:

Bugdoc, first improvement: no glyph fallback but the result is sans

Note how now we used the same font, but the glyphs are always sans, not serif. So the final step was to import the font type from DOCX and consider that while deciding font fallback:

Bugdoc, second improvement: no glyph fallback and the result is sans / serif

With this, we ignore stub embedded fonts from DOCX, we import the font type and in general font fallback on Linux takes the font type into account while deciding font fallback.

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 development edition of Collabora Online 24.04 and try it out yourself right now: try the development edition. 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).


Tuesday
30 July, 2024


face

LibreOffice 24.8 will be released as final at the end of August, 2024 ( Check the Release Plan ) being LibreOffice 24.8 Release Candidate 2 (RC2) the forth and last pre-release since the development of version 24.8 started at the beginning of December, 2023. Since the previous release, LibreOffice 24.8 RC1, 138 commits have been submitted to the code repository and 87 issues got fixed. Check the release notes to find the new features included in this version of LibreOffice.

LibreOffice 24.8 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!!

IMPORTANT INFORMATION FOR WINDOWS 7 USERS
Internal python version has been upgraded to python 3.9 which no longer supports Windows 7. Be aware some LibreOffice functionalities written in Python may not work, like the wizards in File – Wizards. Please, do test this version and give us feedback.

Download it now!


Monday
29 July, 2024


face

Here I discuss what fuzz testing is, and how LibreOffice developers use it incrementally to maintain LibreOffice code quality.

Maintaining Code Quality

LibreOffice developers use various different methods and tools to maintain LibreOffice code quality. These are some of them:

1. Code review: Every patch from contributors should pass code review on Gerrit, and after conforming to coding standards and conventions, it can become part of the LibreOffice source code.

2. Static code checking: “Coverity Scan” continuously scans LibreOffice source code to find the possible defects. An automated script reports these issues to the LibreOffice developers mailing list so that developers can fix them.

3. Continuous Testing: There are various C++ unit test and Python UI tests in LibreOffice core source code to make sure that the functionalities of the software remain working during the later changes. They are also helpful for making sure that the fixed regressions do not happen again. These test run continuously for each and every Gerrit submission on CI machines via Jenkins.

4. Crash testing: A good way to make sure that LibreOffice works fine is to batch open and convert a huge set of documents. This task is done regularly, and if some failure occurs developers are informed to fix the issue.

5. Crash reporting: LibreOffice uses crash testing to find out about the recurrent crashes, and fix them.

6. Tinderbox Platforms: Using dedicated machines with various different architectures, LibreOffice developers make sure that LibreOffice source code builds and runs without problem on different platforms. Here is the description of tinderbox (TB) from TDF Wiki:

Tinderbox is a script to run un-attended build on multiple repos, for multiple branches and for gerrit patch review system.

LibreOffice tinderboxes status

LibreOffice tinderboxes status

You can see the build status here:

https://tinderbox.libreoffice.org/

7. Fuzz testing: LibreOffice software is checked continuously using Fuzz testing. This is essentially giving various automated inputs to the program to find the possible places in the code where problem occurs. Then, developers will become aware of the those problematic places in the code, and can fix them.

Fuzz Testing LibreOffice

Fuzz testing on LibreOffice source code is active since 2017, and since then there has been various bug fixes for the problems that the fuzz tester reported. You can see more than 1500 of such fixes in the git log until now:

$ git shortlog -s -n --grep=ofz#

Issues Found with Fuzz Testing

This tool can find various different problems. These issues are then filed in a section of Chromium bug tracker, and after ~30 days, they are made public. When developers fix bugs of this kind, they refer to the issue number (for example 321) as ofz#321. A comprehensive list of all issues found is visible here:

Fixing the Issues

Let’s look at one of the fixes. You can find commits related to fuzzing with:

$ git log --grep=ofz

This is a recent fix from Caolán, an experienced LibreOffice developer that provided most of


Thursday
25 July, 2024


face

In the previous blog post, I provided a brief introduction to LibreOfficeKit API which one can use for accessing LibreOffice functionalities in an external application. Here I discuss in detail how to use LibreOfficeKit for converting an ODT to PDF, or from/to virtually any other format that LibreOffice supports.

LibreOfficeKit C++ Headers

For this example, you only need one header: LibreOfficeKit/LibreOfficeKit.hxx. Include it, and that is enough. This header will be available in the future versions of LibreOffice community. But for now, you may need to download LibreOfficeKit headers folder from LibreOffice core source code, and put it alongside your source code.

C++ Example

The example is relatively short. Here it is:

#include <iostream>
#include <LibreOfficeKit/LibreOfficeKit.hxx>
int main(int argc, char *argv[])
{
    if(argc < 2)
    {
        std::cout << "Usage: lokconvert  \n";
        return 1;
    }
    const char *input = argv[1];
    const char *output = argv[2];

    lok::Office * llo = NULL;
    try
    {
        const char lo_path[] = LOROOT "/program/";
        llo = lok::lok_cpp_init(lo_path);
        if (!llo) {
            std::cerr << "Error: could not initialize LibreOfficeKit\n";
            return 1;
        }

        lok::Document * lodoc = llo->documentLoad(input, NULL /* options */);
        if (!lodoc) {
            std::cerr << "Error: could not load document: " << llo->getError() << "\n";
            return 1;
        }

        if (!lodoc->saveAs(output, "pdf", NULL /* options */))
        {
            std::cerr << "Error: could not export document: " << llo->getError() << "\n";
            return 1;
        }
    }
    catch (const std::exception & e)
    {
        std::cerr << "Error: LibreOfficeKit exception: " << e.what() << "\n";
        return 1;
    }

    std::cerr << "Success!\n";
    return 0;
}

The example is simple. Input and output file names are passed via command line arguments, and are received via argv[1] and argv[2], if argument count, argc, is at least 3. First one is the program name itself, which we don’t use here.

LibreOffice binary folder is needed here, so you should set OO_SDK_URE_BIN_DIR environment variable, or you may even set that in your program itself.

This part of the code is for LibreOfficeKit initialization:

llo = lok::lok_cpp_init(lo_bin_dir);

And after that, it is the time to load the document:

lok::Document* lodoc = llo->documentLoad(input, NULL /* options */);

Having the lodoc pointer is necessary for converting the document using saveAs function:

lodoc->saveAs(output, "pdf", NULL /* options */)

As you can see, relevant code is inside a try/catch block. In case some exception occur, you will see relevant error information on the console. Also, in each step, from initializing LibreOfficeKit, to loading and in the end generating the output, there are error handling mechanisms to make sure that the work goes forward smoothly.

In the end, if everything is successful, you will see this message on the screen:

Success!

Build with cmake

You can use cmake to build this example. Here is an example CMakeLists.txt which also provides LO_ROOT and LO_SDK_ROOT to be used inside C++ file, as an alternative to setting it via an environment variable, or putting it manually in the code.

cmake_minimum_required(VERSION 3.5)

project(lokconv LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_executable(lokconv main.cpp)

include(GNUInstallDirs)

set(LOVERSION 24.2)

if(WIN32)
    set(LOROOT 

<- Current blog entries