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.


Sunday
06 November, 2022


face
  • Up lateish, All Saints - played with H. in the band, shared lunch afterwards - good to see lots of people celebrating Susan & Philips Allison's service with us before they move on.
  • Home, brief hibernation, back out to Cedric's blood-cancer charity fund raising concert at All Saints, H. played the organ, cheese & wine - home. Watched Enora Holmes 2 happily together, bed.

Friday
04 November, 2022


face

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

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

Keynotes and Advocating

Michael Meeks: Sponsor Keynote Collabora

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

Watch the talk
Download the slides

Michael Meeks: The ongoing story of Online

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

Watch the talk
Download the slides

Technical Talks

Sarper Akdemir: Chasing an Interoperability Bug in Impress

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

Watch the talk
Download the slides

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

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

Watch the talk
Download the slides

Miklos Vajna : Content Controls in Writer

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

Watch the talk
Download the slides

Follow Collabora


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

 

 

The post Collabora’s Contributions to the LibreOffice Conference 2022 in Milan appeared


Thursday
03 November, 2022


face

One category of the bugs that we see in computer programs including LibreOffice is the unexpected crashes. You’re working with the application, and it is suddenly closed! In the previous part, I have discussed crashes that are caused by segmentation fault. In this article, I discuss the crashes from invoking abort() function. Please note that not an abort is not always a bad thing, or a bug.

Abort

In C/C++ sometimes we have to check the validity of certain conditions, and avoid certain bad situations. We do that to avoid data corruption or other problems that leads us to terminate the application instead of trying to continue.

This is different from normal error handling routines, because in error handling, we usually try to find errors, find ways out of the problem automatically, or ask user to fix the problem by changing the input and things like that. But, this is not always the case.

Better to Be Safe Than Sorry!

If you search for abort in the .cxx files, you will find a lot abort() usages:

git grep "abort(" *.cxx

Let’s look at some example. When writing tests, one of the problems that may occur while testing font rendering is the font fallback because of using fonts that are not available via LibreOffice. In this situation, it is better to stop the test application, so that the developers understand that they should use fonts that are available via LibreOffice. You can look vcl/unx/generic/fontmanager/fontconfig.cxx for more information.

Another example is the problem with the GPU. If you look at vcl/skia/gdiimpl.cxx, you can see this code. The comments explain the situation. When we run out of memory, the error is “unrecoverable without possible data loss”. So, the best thing that we can do, is to abort the program.

// If there's a problem with the GPU context, abort.
if (GrDirectContext* context = GrAsDirectContext(mSurface->getCanvas()->recordingContext()))
{
    // Running out of memory on the GPU technically could be possibly recoverable,
    // but we don't know the exact status of the surface (and what has or has not been drawn to it),
    // so in practice this is unrecoverable without possible data loss.
    if (context->oomed())
    {
        SAL_WARN("vcl.skia", "GPU context has run out of memory, aborting.");
        abort();
    }
    // Unrecoverable problem.
    if (context->abandoned())
    {
        SAL_WARN("vcl.skia", "GPU context has been abandoned, aborting.");
        abort();
    }
}

Generally speaking, the developer should try to recover from the errors, but in the end, some unrecoverable errors may remain, and the developer might decide to do an abort().

Fixing Bugs Related to abort

On the other hand, sometimes it is possible to avoid doing an abort(), and recover from an error. In such a case, fixing the crash would involve finding a way out of the problem, and continuing the normal execution of the program.

For example, take a look at tdf#138022 – LibreOffice exits/crashes when minimizing start center after closing a document (SKIA).  This issue is fixed in this patch


face

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

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

Motivation

Rendering of a title for a content control

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

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

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

Results so far

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

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

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

How is this implemented?

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

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

Want to start using this?

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


Tuesday
01 November, 2022


face

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

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


Monday
31 October, 2022


face

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

Tell me about yourself!

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

When did you first become interested in coding?

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

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

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

What have you been doing over the Summer?

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

What have you been working on?

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

What is SDK? How can that be useful?

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

Why did you want to spend your Summer at Collabora?

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

What did you learn from your time at Collabora?

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

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

Definitely! I think it was a good learning experience – it taught me personally what I want, and gave me a good insight into what a professional setting is


Friday
28 October, 2022


face

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

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

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

Blog post is here.


Monday
24 October, 2022


face

As discussed in the “crash fixes for LibreOffice, part 1: segfaults“, bugs that lead to crash in LibreOffice or other native applications can have different causes, and therefore need completely different fixes. Some of these bugs are hard to fix: you have to change the behavior of the application in order to avoid crashes.

On the other hand, there are some cases that a fix can be simple checking for a pointer to make sure that it is not NULL/nullptr before actually using it. Or, making sure that a variable has properly initialization before its use. In these cases, fixing the bug is not too hard, and a fix can be provided very quickly.

Example EasyHacks Related to Crashes

Thanks to Mike, this week we have 2 new EasyHacks of this kind:

When accessing uninitialized a TextInputStream, an exception should be thrown, in which leads to Basic run-time error. Instead, because of lack of appropriate checks, it leads to a crash.

You can debug and see the crash point by executing this LibreOffice BASIC code snippet:

Sub crash
  stream = CreateUnoService("com.sun.star.io.TextInputStream")
  stream.available()
End Sub

To fix this bug, one should take a look at OTextInputStream code inside core/io/source/TextInputStream/TextInputStream.cxx:53 and make sure to check and throw runtime exception where appropriate.

This second issue is a crash that happens when parsing an XML with undeclared namespace. To catch and debug such a crash, you should create a tiny xml file as described in the bug report:

<?xml version="1.0" encoding="UTF-8"?>
<a:xml/>

Then, try to parse it with this LibreOffice BASIC script:

Sub Parse
  source = CreateUnoStruct("com.sun.star.xml.sax.InputSource")
  source.aInputStream = CreateUnoService("com.sun.star.ucb.SimpleFileAccess").openFileRead(ConvertToURL("path/to/file.xml"))
  parser = CreateUnoService("com.sun.star.xml.sax.FastParser")
  parser.ParseStream(source)
End Sub

Then, you will see that the crash happens in this part of the code in core/sax/source/fastparser/fastparser.cxx:1281:

if ( !m_bIgnoreMissingNSDecl || URI != nullptr   )
    sNamespace = OUString( XML_CAST( URI ), strlen( XML_CAST( URI )), RTL_TEXTENCODING_UTF8 );

If you look closely, you will understand that if m_bIgnoreMissingNSDecl is false, then the URI check to make sure that it not nullptr is not happening. And dereferencing nullptr leads to crash.

The above two EasyHacks are good for the newcomers. So, if you have some knowledge on C++ and you are able to build LibreOffice, you can work on these issues. If so, first try to gain a basic understanding of the problem. Then assign the bug to yourself and try to fix it.

Writing Tests for Crash Fixes

Writing tests for the crash is also not a very hard task. Either a CppUnitTest, or a UITest can do the exact things that leads to crash without a fix. Then, the test will fail if a crash occurs preventing the same problem in the future.

If you


Monday
17 October, 2022


face

 

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

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


Community Day

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

Partner Day

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

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

Technical Day

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

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

COOL Days Slides

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

Pedro’s Blog

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

 

We hope to see you at our next COOLDays event…

 

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

Open Source Experience

November 8 - 9, 2022 – Paris, France

SFSCon

November 11 - 12, 2022 – Bolzano, Italy

Univention Summit

January 17 - 18, 2023 – Bremen, Germany

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


Friday
14 October, 2022


face

 

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

Tell me about yourself!

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

When did you first become interested in coding?

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

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

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

What else have you been working on over the Summer?

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

Why did you want to spend your Summer at Collabora?

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

What did you learn from your time at Collabora?

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

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

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

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

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

 

Christopher has been continuing to


Tuesday
11 October, 2022


face

General Activities

  1. LibreOffice 7.3.6 was released on September 8
  2. LibreOffice 7.4.1 was released on September 15
  3. Rafael Lima added help for “Math baseline” option in Writer and improved the layout of Template Manager
  4. Adolfo Jayme Barrientos improved the layout of the Page Style dialog and made some cleanups both in UI strings and Help
  5. Alain Romedenne made Help updates on macro-related menus and dialogs
  6. Olivier Hallot (TDF) reworked and enriched the Help pages for conditional formatting and made many Help cleanups
  7. Laurent Balland fixed a formatting issue with the templates shipped with Impress, made documents created via Windows explorer be 0 bytes so they use the default template and created a UI test for Go to Sheet command
  8. Miklós Vajna (Collabora) added PDF export support for content controls in Writer and implemented combo box control type. He also added support for video looping in PPTX files, fixed several HTML import and export issues and started adding Help pages for content controls
  9. Jean-Pierre Ledure worked on the ScriptForge library
  10. Tünde Tóth (NISZ) fixed a z-ordering issue with embedded OLE objects in PPTX files
  11. Szymon Kłos, Ashod Nakashian and Henry Castro (Collabora) worked on LOKit improvements
  12. Tor Lillqvist (Collabora) replaced outdated uses of symbol fonts with OpenSymbol, made iOS-related code cleanups and build fixes and made font substitution more robust
  13. Szymon Kłos (Collabora) made Clone Formatting brush override old direct formatting instead of just appending new formatting. He also made it so the number format dialog always appears where expected
  14. Eike Rathke (Red Hat) improved internationalisation support for constructed languages, fixed an issue with spreadsheet functions implemented as Add-In sometimes getting saved with their programmatic name in XLSX files, implemented better error checking for Calc’s conditional formatting expressions, made Calc’s Name Box dropdown immediately reflect changes to named ranges, fixed an issue with named ranges breaking when the original base-cell-address got deleted, fixed Add-In functions comparing matrix/array elements incorrectly, made it so Calc’s CELL() function is compatible with INDIRECT(), made INDIRECT() work with 16 thousand columns, fixed an issue with recalculating in Calc after sorting and made copying autofilters more robust. He also made some cleanups in Help
  15. Tomaž Vajngerl (Collabora) continued polishing the chart data table feature and made some code cleanups
  16. Julien Nabet made many optimisations by simplifying internal text replacement operations, fixed importing SVGZ files, added support for Kamenický and Mazovia encodings, fixed a crash with artistic image filtering, made the context menu entry for Conditional Formatting work intuitively and made cleanups
  17. Jim Raykowski made search results available to screen readers again (together with Michael Weghorn), made search display the number of found matches, enriched the Customize dialog with tooltips for Assigned Commands and made many improvements to Navigator
  18. Andreas Heinisch made it so the optional parameters of MsgBox are initialised with their default values, changed Calc’s optimal row/column height so it doesn’t change hidden status of targets and added support for VBA

Saturday
08 October, 2022


face

 

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

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


Monday
03 October, 2022


face

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

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

Motivation

PDF export of Writer content controls into PDF

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

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

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

Results so far

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

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

How is this implemented?

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

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

Want to start using this?

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


Thursday
29 September, 2022


face

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


Monday
26 September, 2022


face

 

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

Tell me about yourself!

My name is Skyler and I’m currently studying Maths, Further Maths, Computer Science and Business Studies at college. I spent the summer holidays doing an internship at Collabora Productivity. I’m into software development and video games, especially Minecraft and Celeste. I have a huge Steam library!

When did you first become interested in technology/coding?

When I was 11, my parents got me Raspberry Pi and I became fascinated with learning how to programme. Then in Secondary school I had an awesome Computer Science teacher who let us use old laptops to create a server where we built a small internal website. Since then I’ve been doing software development as a hobby.

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

Oh, there’s quite a few to choose from! I’ve made several Discord bots which are automated game bots, including one to play Cards Against Humanity which was installed on over 2000 servers. I also made a version of Ultimate Tic Tac Toe – you can access it at https://uttt.crawling.us. I particularly enjoy creating smaller things that feed into one another to create something larger.

What have you been doing over the summer?

I’ve mostly been working on JSDialog, such as ‘repair document’, ‘number format’ or ‘split table’. I think the most common (and arguably most important) one I’ve worked on is ‘insert captions’ which is ~90% done: there’s 3 dialogs that work together to make our captioning work and I’ve converted 2 of them fully and figured out but not fully fixed an issue for the third.

Why did you want to spend your Summer interning at Collabora?

I went to a talk by Michael at my school where he told us about the benefits we’d get from doing an internship. He mentioned developing scalable techniques for big projects which I thought would be interesting and useful to learn.

I would have spent all Summer doing software programming anyway so I thought instead of letting the summer slip away, I would spend it learning. Plus it looks good on a university application!

What did you learn from your time at Collabora?

The main thing I learnt was the importance of taking notes efficiently so you can see what you were thinking and see if there were any assumptions you made that were wrong. I also learned how to implement scalable techniques (as Michael was talking about) which has really helped me.

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

I’ve thought of various things I’d like to work on but I really enjoy back end development, much more than front end. I enjoy DevOps, scripts and testing – it’s


face

On September 19, The Document Foundation (TDF) announced the release of LibreOffice on Apple’s Mac App Store, to support end users who want to get all of their desktop software from Apple’s sales channel. TDF will continue to provide LibreOffice for macOS free from the LibreOffice website, which is the recommended source for all users.

LibreOffice packaged for the Mac App Store is based on the same source code, but does not include Java – because external dependencies are not allowed on the store – and therefore limits the functionalities of LibreOffice Base.

The full TDF blog post is here.


Thursday
15 September, 2022


face

 After the work to support 16384 columns in LibreOffice Calc I have also made sure that the feature works also in Collabora Online, thanks to the funding of NGI.

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 871498.

 

 

 

 

Since the Calc core is the same, the underlying functionality works just like in LibreOffice. But the online functionality presented some additional challenges that needed handling, as having more cells in a spreadsheet may mean more data sent over the network, slowing things down. There definitely used to be problems with large spreadsheets, as the tiled rendering used by Online in fact was already limited to 500000 rows compared to 1048576 rows of the desktop version (in fact, git history shows that this started at only 1000 rows initially and then was continually raised over the time as things improved). So together with raising column count to 16384 I have raised this to the normal 1048576 rows as well.

While working on this, one of the problems I needed to handle was a rather unusual one - some automated tests were failing because of timing out. Only with debug builds, because they of course do more checks compared to optimized release builds. And the problem turned out to be how some tests checked resulting spreadsheets after some operations. Since testing Calc running in a browser is more complicated than testing the desktop version, what the tests did was to select a large number of cells (e.g. one entire row), paste that to the clipboard and then the clipboard data was present in browsers HTML data, so the testing framework could test it and verify it is as expected. And this failed with unoptimized debug builds because even though the spreadsheet was almost empty, the unoptimized code checked every cell involved and together it added up enough to exceed the test timeout. Ironically enough, a significant portion was spent in code that was trying to optimize the size of the clipboard data. So I needed to improve the tests and optimize handling of unoptimized code, as strange as it may sound.

Now with hopefully all performance problems solved, Collabora Online 22.05 should support these spreadsheet sizes just as fine as the desktop version.







face

Chart data table is a feature of charts, that presents in the chart area a data table with the values that are visualised by the chart. The data table is positioned automatically at the bottom of the chart, and can for certain chart types replace the X-axis labels. Until now this feature has been missing in LibreOffice, but thanks to the funding of NGI, it is now implemented.


This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 871498




Figure 1: Charts with a data table

Chart data table usage and description

Figure 2: Insert data table dialog


The chart data table can be added to the chart from the menu (Insert -> Data Table...), where it is possible to select to show the data table and set the data table specific properties (see Figure 2). The data table specific properties are:

  • Show Horizontal Border
  • Show Vertical Border
  • Show Outline
  • Show Keys
The properties "Show Horizontal Border" and "Show Vertical Border" control if the inner horizontal or vertical borders of the data table are shown or not. The "Show Outline" controls if the outline - borders around the data table are shown or not. "Show Key" controls if the legend keys for the data series are shown in the data table in addition to the data series (row) names.

Figure 3: Data Table Dialog


In addition to those data table specific properties it is also possible to change the line, fill and font properties of the data table (see Figure 3). For example the line properties define how the borders (lines) will be shown, so it is possible to change the line style (continuous line, dashes, dots), the colour of the line, transparency, line thickness. The fill properties defines the colour of the cell background and the font properties what font and size the is used for the text in the data tables.

Implementation

The data table implementation is located in the chart2 component, like all the other chart related code. A data table is represented in the model by a new DataTable (chart2/source/inc/DataTable.hxx) class (extending the XDataTable interface) and lives on the "Diagram" object. If there is no DataTable object, it means the data table is turned off. The DataTable holds the data table specific properties as well as line, fill and font properties.

The automatic positioning of the data table is done similar like the x-axis labels, as the data table is also meant to replace the x-axis labels, unless it is not able to do so, because of the chart type (for example the "bar chart", which has the main x and y axis swapped). 

Rendering is done on the DataTableView class (chart2/source/view/inc/DataTableView.hxx), which creates a table shape and positions that into the chart. The row headers (data series names) and column headers (x-axis names) and values (from the data series) are filled into the table cell by cell, where

Tuesday
06 September, 2022


face

One of the bugs that we see in computer programs including LibreOffice is the crash. You’re working with the application, and the program is suddenly closed! Here we discuss the usual causes for these crashes, and how to fix some of them.

Crash Report

Crash Report

There can be many reasons for a crash in C/C++, including segmentation faults (segfaults), assertion failures, aborts, and exceptions that lead to abort. Here we discuss the segmentation faults.

Usual Causes for the Segmentation Fault Crashes

There can be many reasons for a segfault in C/C++, and most of them are are related to the incorrect use of memory. For example:

1. Accessing memory that the program does now own
2. Using memory outside the allocated parts
3. Using uninitialized variables

If you use a variable without properly initializing it, that may lead to a segfault. For example:

int main() {
    int *p;
    *p = 1;
    return 0;
}

Trying to de-reference a null pointer also leads to crash.

int main() {
    int *p = nullptr;
    *p = 1;'
    return 0;
}

$ g++ main.cpp -o main; ./main
Segmentation fault (core dumped)

In C/C++, most compilers do not check the array bounds automatically. When working with arrays, you have to take care that you are accessing inside the array bounds, and not beyond them. Look at this example:

int main() {
    int a[10];
    a[1000000] = 1;
    return 0;
}

When working with pointers, it is important to make sure that the pointer is not null before working with it. For example, look at this file:

sc/source/ui/view/tabview.cxx

Inside it, look at this method:

bool lcl_HasRowOutline( const ScViewData& rViewData )
{
    const ScOutlineTable* pTable = rViewData.GetDocument().GetOutlineTable(rViewData.GetTabNo());
    if (pTable)
    {
    const ScOutlineArray& rArray = pTable->GetRowArray();
    if ( rArray.GetDepth() > 0 )
        return true;
    }
    return false;
}

Here, before working with pTable, with the condition “if (pTable)“, we make sure that the pTable pointer is not null.

That is also the case when working with arguments. Look at this function inside the same file:

IMPL_LINK_NOARG(ScTabView, TimerHdl, Timer *, void)
{
    if (pTimerWindow)
        pTimerWindow->MouseMove( aTimerMEvt );
}

The condition makes sure that pTimerWindow is not null.

How to Fix the segfaults?

To describe how to fix some of the segfaults, I discuss to fixes that are merged recently by Caolan and me.

First, please take a look at this recently fixed crash by Caolan:

The crash was happening when you created a page break, and then tried to edit it. The backtrace showed that the problem is happening in this file:

sw/source/uibase/docvw/PageBreakWin.cxx

inside this method:

IMPL_LINK_NOARG(SwPageBreakWin, FadeHandler, Timer *, void)

just in this line, when invoking IsVisible().

if (IsVisible( ) && m_nFadeRate > 0 && m_nFadeRate < 100)
    m_aFadeTimer.Start();

In a debug session for LibreOffice, one can see that the window object is actually destroyed, but the code wants to check if the window is visible or not. In this way, it leads to a segfault. Looking carefully, it becomes visible that the


face

General Activities

  1. LibreOffice 7.4.0 was released on August 18
  2. Rafael Lima added documentation in Help for the new method Normalize in ScriptForge FileSystem and made the Templates dialog work better with HiDPI displays
  3. Olivier Hallot (TDF) made some smaller fixes and cleanups in Help
  4. Laurent Balland fixed an issue with Impress’s Inspiration template
  5. Christian Lohmaier (TDF) did preparatory work for publishing LibreOffice in Microsoft Store under TDF
  6. Miklós Vajna (Collabora) added support for cropped video for media shapes in Impress, made shift-clicking/double-clicking graphics in Writer work and fixed problems with exporting to XHTML with graphics as OLE objects and with vertical text and clearing breaks in Writer. He also made some crash fixes.
  7. Jean-Pierre Ledure worked on the ScriptForge library
  8. Tünde Tóth (NISZ) fixed a problem with decimal tabulators in DOCX files and made it so long legend texts in charts are truncated
  9. Szymon Kłos, Tor Lillqvist, Mert Tumer and Henry Castro (Collabora) worked on LOKit improvements
  10. Eike Rathke (Red Hat) fixed an issue with calling Calc’s add-in functions via macros while having a non-English UI, made it so switching to English function names in Calc does not require a restart, made Calc’s date pattern evaluation more robust and made it possible to create a new language list entry by simply dropping an autocorrect .dat file into a relevant autocorr directory inside the user profile
  11. Tomaž Vajngerl (Collabora) continued working on data tables for charts
  12. Julien Nabet fixed hyphenation issues with Greek language, made it possible to align date fields in macro dialog boxes, fixed preview issues with horizontal alignment of objects in frames and page dimension in Print Preview. He also made some crash fixes.
  13. Jim Raykowski made it so object selections in Impress or Draw are reflected in the Navigator, made page number display in status bar more intuitive and fixed an issue with Navigator’s Navigate By Page Next functionality
  14. Andreas Heinisch made cursor navigation with Ctrl key in Writer treat narrow no-break spaces the same way as other space characters, made narrow no-break spaces visible by drawing a gray background, fixed Calc’s Formula to Value not taking immediate effect, improved Basic macro error messages and fixed Calc’s Formula bar suggestion tooltips misbehaving with non-ASCII characters
  15. László Németh improved the layout of drop cap characters, made several improvements to change tracking and fixed regressions
  16. Xisco Faulí (TDF) added over a dozen automated tests, made SVG marker-mid and marker-end handling more robust and fixed a crash
  17. Heiko Tietze (TDF) made several UI improvements and made the recovery dialog easier to understand (thanks to earlier work by Danie Truter)
  18. Michael Stahl (allotropia) fixed issues with dropdowns and paragraph borders in RTF files, made WebDAV TLS work with self-signed Certification Authorities and improved bookmark handling in the Navigator
  19. Michael Weghorn fixed a qt/kf5 double-click issue (only in unreleased code) and made nearly sixty improvements and cleanup changes to Windows and Linux accessibility code
  20. Mike Kaganski

face

Cover of Calc Guide 7.4The LibreOffice documentation team published a new user guide in August: LibreOffice 7.4 Calc Guide, available in free PDF and ODT. Low-cost printed copies are available from Lulu.com.

Visit the Documentation page on the LibreOffice website for links.


Thursday
01 September, 2022


face

Impress now supports cropped videos in slide edit mode and during slideshow for documents imported from PowerPoint.

First, thanks to our partner SUSE for working with Collabora to make this possible.

Motivation

PowerPoint-style cropped video in Impress

PowerPoint handles videos by taking a preview bitmap from the video, and then it allows users to apply various effects on that bitmap, like cropping. The complex aspect of this is that such filters are also respected while playing the video as well.

Impress didn't store such properties on the media shape, which lead to distorted aspect ratio when playing some cropped videos from PPTX files. This lead to this preview in Impress before the work:

Video with lost cropping in Impress

Results so far

The first problem was that the Impress preview was picked from the 3rd second of the video (presumably to avoid a black preview in many videos that start with a short black fade-in), while PowerPoint can store an explicit preview from the video (seems to be the first frame), so no matter what effects you apply, the previews were just different as the source bitmap was different. This could be fixed by looking for an explicitly provided bitmap for the video first, and only then asking the various avmedia/ backends to produce a preview.

Once the preview's initial bitmap was OK, it was necessary to take cropping into account. This was first done for the preview bitmap, and then also for the gstreamer backend (the relevant one for Linux, as a start) of avmedia/, which is responsible for the actual video playback. The gstreamer bits were done by first creating a videocrop element and then connecting that to the existing playbin.

With these sorted out, we get rendering which matches the reference:

Cropped video in PowerPoint

The last step was to load/save the explicit preview and the crop from/to ODF as well, not only PPTX. We use a markup like this to store the information:

<style:style style:name="gr1">
  <style:graphic-properties fo:clip="rect(0cm, 1.356cm, 0cm, 1.356cm)"/>
</style:style>

And now that the gr1 automatic style is defined, we can refer to it from a media shape:

<draw:frame draw:name="test" draw:style-name="gr1">
  <draw:plugin xlink:href="..." xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:mime-type="application/vnd.sun.star.media">
    ...
  </draw:plugin>
  <draw:image xlink:href="Pictures/MediaPreview1.png"/>
</draw:frame>

The nice property of this markup is that automatic styles are already used for other shapes and image previews are also used for e.g. table shapes, so this is just using existing markup in a new context, but the ODF spec already allows this markup.

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:


Saturday
27 August, 2022


face

 

After the recent 1.7.1 release of hunspell I spent a little time massaging the source to address some long standing coverity complaints and achieved the elusive 0 outstanding defects with 0 dismissed state.


Friday
19 August, 2022


face

LibreOffice 7.4 Community was released on 18 August 2022. Here is the official blog post about it, with much more information about the release and about LibreOffice.

You can get LibreOffice 7.4 from the download page for Windows, macOS (Apple Silicon and Intel processors), and Linux.

A video summarizing the top new features in LibreOffice 7.4 Community is available on YouTube.

Most Significant New Features

GENERAL
Support for WebP images and EMZ/WMZ files
Help pages for the ScriptForge scripting library
Search field for the Extension Manager
Performance and compatibility improvements

WRITER
Better change tracking in the footnote area
Edited lists show original numbers in change tracking
New typographic settings for hyphenation

CALC
Support for 16,384 columns in spreadsheets
Extra functions in drop-down AutoSum widget
New menu item to search for sheet names

IMPRESS
New support for document themes


Tuesday
16 August, 2022


face

Open Document Format (ODF) is a standard (ISO/IEC 26300) and native file format that LibreOffice uses. OASIS developed this file format based on the file format of StarOffice, the ancestor of LibreOffice.

To understand the ODF standard, working with the LibreOffice code and fixing a small bug is enlightening. Here we discuss a related EasyHack.

ODF File Extensions

If you are a LibreOffice user, you may already know these extensions:

.odt for text processing documents (LibreOffice Writer)

.odp for presentations (LibreOffice Impress)

.ods for spreadsheets (LibreOffice Calc)

.odg for drawings (LibreOffice Draw)

.odf for formulas (LibreOffice Math)

Essentially, these are zip files containing XML and binary files. Additionally, Open Document Format can also be text-only format with the extensions of .fodt, .fods and .fodg instead of .odt, .ods, and odg respectively.

Open Document Specification

OASIS website provides the documents that describe the Open Document Format extensively . You can find the specifications for ODF 1.3, which is the latest version of the standard here:

OpenDocument V1.3 OASIS Standard published

Beside LibreOffice, several other applications support ODF standard, including Microsoft Office, ONLYOFFICE, Calligra Suite, Google Docs, and many others! But here, we focus on LibreOffice.

Basically, LibreOffice handles the Open Document format by opening the zip file using the zip parser and the deflate algorithm, and then parses the XML files inside it using libxml2 library.

On the other hand, the meaning of the XML tags and attributes are available via the specification from OASIS. In essence, the specification describes the text, pictures, shapes and other elements of the text processing, presentations, spreadsheets and formulas. Additionally, ODF standard discusses accessibility, collaboration and many more topics.

An EasyHack Related to ODF

To best way to understand the ODF standard, is working with the LibreOffice code. Please take a look at this small bug, which has the label of EasyHack (tdf#150302):

In this EasyHack, there is a sample document which is using a specific feature in the drawings. Looking at the <draw:enhanced-geometry> tag, one can see that there is an attribute draw:text-path-same-letter-heights that is used to control the way that text is rendered in shapes. It is described in ODF standard as:


19.224 draw:text-path-same-letter-heights

The draw:text-path-same-letter-heights attribute specifies if all letters in a custom shape have the same height.

The defined values for the attribute are:

  • false: letters in a custom shape need not have the same height.
  • true: letters in a custom shape have the same height.

The default value for this attribute is false.


The issue is that handling this parameter in the code is not correct. Specifically, the effect of this bug is that if you open the sample file and click on the SameLetterHeights button in the Fontwork toolbar, nothing happens. On the other hand, the correct behavior should be that the shape changes, and “shows the characters vertical stretched to fit the place between the paths”.

Shapes inside the example ODF file

Shapes inside the


Wednesday
10 August, 2022


face

General Activities

  1. LibreOffice 7.3.5 was announced on July 21
  2. Adolfo Jayme Barrientos improved the layout of many dialogs
  3. Rafael Lima expanded the help for ScriptForge with many new features
  4. Olivier Hallot (TDF) updated the help for Fontwork and CSV import
  5. Laurent Balland fixed an issue with customer number formats with embedded text in decimal not saving correctly to ODS. He also fixed the footer of some Impress templates
  6. Christian Lohmaier (TDF) did lots of preparatory work for publishing LibreOffice in Apple Store under TDF
  7. Miklós Vajna (Collabora) fixed an issue with RTL text and floating objects in DOCX files and a couple of XHTML export issues. He also continued working on content controls for Writer
  8. Jean-Pierre Ledure worked on the ScriptForge library
  9. Tünde Tóth (NISZ) fixed DOCX export of line breaks in text frames and made saving style names to DOCX more robust
  10. Szymon Kłos, Henry Castro and Michael Meeks (Collabora) worked on LOKit improvements
  11. Eike Rathke (Red Hat) made it so two leading apostrophes before a number collapse to one when typing into a Calc cell with default formatting. He also made handling of Calc date formats more robust
  12. Bartosz Kosiorek fixed an issue with ordered bullets in Lotus Word Pro documents
  13. Tomaž Vajngerl (Collabora) worked on implementing data tables for charts and fixed an issue with hidden Writer fields becoming visible with PDF export
  14. Julien Nabet extended clone formatting functionality in Impress and Draw to work in more cases, fixed regressions affecting the copying of database tables from HSQLDB to MariaDB and the Draw Dimensions dialog and fixed displaying the OpenType tag for fraction
  15. Jim Raykowski made some Navigator fixes and tweaks
  16. Andreas Heinisch made Writer chapter numbering character style list alphabetically sorted, made Calc’s function wizard also search through function descriptions and changed Ctrl+Backspace to behave more intuitively in Calc cell editing. He also made narrow no-break spaces visible in Writer
  17. László Németh continued polishing change tracking of numbered paragraphs in Writer
  18. Xisco Faulí (TDF) added many new unit tests, fixed some crashes found through the crash reporter and made many improvements to SVG import, including adding support for Orient auto-start-reverse in markers and more robust handling of URLs and fill properties
  19. Heiko Tietze (TDF) made autocorrecting org-mode/markdown-like formatting marks to Writer formatting deactivated by default and fixed a regression preventing detaching of sub-toolbars like Basic shapes
  20. Michael Stahl (allotropia) fixed many Writer regressions, made handling ODF-imported automatic styles in Writer more robust and made it possible to edit the text content of a bookmark through the Insert → Bookmarks dialog
  21. Michael Weghorn fixed some qt/kf5 visual issues, fixed loading printer settings from documents in case of long printer/driver names and made some Linux accessibility improvements
  22. Mike Kaganski (Collabora) made it so editing hyperlinked text in Writer no longer breaks it up into multiple links, fixed rendering errors in Soft Edges image effect in Impress and corrected handling of Undo/Redo keyboard shortcuts in Math

Wednesday
03 August, 2022


face

 

GTK4 screenshot of writer using true GtkScrollbars rather than themed Vcl ScrollBars. Long press enters gtk's usual fine control mode for scrolling.


Monday
01 August, 2022


face

The LibreOffice Quality Assurance (QA) Team is happy to announce that LibreOffice 7.4 Release Candidate 2 (RC2) is available for testing!

LibreOffice 7.4 will be released as final in mid August, 2022 (check the Release Plan for more information), with LibreOffice 7.4 RC2 being the fourth pre-release since the development of version 7.4 started at the end of November 2021. Since the previous release, LibreOffice 7.4 RC1, 99 commits have been submitted to the code repository and 56 issues got fixed. Check the release notes to find the new features included in this version of LibreOffice.

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

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

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

LibreOffice is a volunteer-driven community project and your help is much appreciated.

Happy testing!


face

Writer now supports a 6th content control type: it is possible to insert a plain text content control.

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

Motivation

Word-style plain text content control, user interface

Writer users can put a content control around a piece of rich text, see Content controls in Writer: dropdown, picture and date types for the first five types.

The next step in this journey is plain text: even if one of the big advantages of content controls over input fields is that they allow rich formatting, sometimes you want to restrict this. For example, if one has to fill in their name, then it makes no sense to mark the family name as bold while leaving the given name as non-bold. This would just lead to inconsistent look.

Results so far

There is now a new Form → Content Controls → Insert Plain Text Content Control menu item to create a plain text content control. If you try to make a selection that is a subset of the text inside the content control and you try to format it, the whole text in the content control is formatted to maintain the invariant that plain text has no formatting itself, just the formatting of the whole content control.

As usual, you can delete this content control later. You can also load/save it to ODT/DOCX and it's preserved.

How is this implemented?

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

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

Want to start using this?

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


Thursday
28 July, 2022


face

 

Bootstrapped using GtkPopovers to implement popups from LibreOffice's main menubars for GTK4.

<- Current blog entries