The importance of LinkedIn Pages for the LibreOffice Project

LinkedIn has reached the number of 750 million subscribers worldwide, and is now the best social media to support products, as it is used by almost 100% of enterprises (click on the above thumbnails to see the full image). The Document Foundation has launched the foundation and the LibreOffice LinkedIn pages a while ago, followed in late 2020 by the LibreOffice Enterprise LinkedIn page. These pages have grown organically during the years to reach respectively 1,169, 1.055 and 197 followers. It is now time to leverage the effective potential of these content resources for the growth of the project, especially in areas which are not directly related to the FOSS ecosystem.

We need the help of TDF and community members to grow the number of people subscribed to these pages, and to add contents about community activities, product development, migrations, large enterprise deployments, and the open document format. In general, community activities should be published on The Document Foundation page, product development and open document format news on the LibreOffice page, migrations and large enterprise deployments on the LibreOffice Enterprise page. We are happy to receive your content suggestions, and to put them online.

In addition, if you are not yet a LinkedIn member, you should create your own profile and link it to The Document Foundation and LibreOffice, as this will increase the relevance of the pages, and this will attract subscribers from other FOSS projects and also from outside FOSS projects.

The Document Foundation LinkedIn page
To go to the page and subscribe, click on the image
LibreOffice LinkedIn page
To go to the page and subscribe, click on the image
LibreOffice Enterprise LinkedIn page
To go to the page and subscribe, click on the image

Fixing an Interoperability Bug in LibreOffice: Missing Lines from DOCX (part 2/3)

By Hossein Nourikah, Developer Community Architect at The Document Foundation

In LibreOffice, interoperability is considered a very important aspect of the software. Today LibreOffice can load and save various file formats from many different Office applications from different companies across the world. But, bugs are inevitable parts of every software: There are situations where the application does not behave as it should, and a developer should take action and fix it, so that it will behave as it is expected by the user.

What if you encounter a bug in LibreOffice, and how a developer fixes the problem? In these series of articles, we discuss the steps needed to fix a bug. In the end, we will provide a test and make sure that the same problem does not happen in the future, again.

The article is presented in three parts:

  1. Understanding the Bugs and QA
  2. Developing a Bug Fix
  3. Writing the Tests and Finishing the Task

This is the second part.


2. Developing a Bug Fix

So, if you have read the previous part of “Fixing an Interoperability Bug: Missing Lines in Save and Load” (part 1), this is the sequel. Here we try to develop a solution for the problem with our knowledge of C++.

The first thing we need is to build the LibreOffice core. Depending on the platform, you can find the instructions in the TDF wiki.

See the instructions for building LibreOffice on:

2.1. Finding the Responsible Change

So, now we know that through this commit, these files were changed. One (or possibly all) of the changes is responsible for the regression. So we try to find a minimize set of changes that lead to the problem. We can use --name-only option from git:

$ git show d72e0cadceb0b43928a9b4f18d75c9d5d30afdda --name-only

So, the changed files are:

  1. filter/source/msfilter/escherex.cxx
  2. filter/source/msfilter/msdffimp.cxx
  3. include/svx/msdffdef.hxx
  4. sw/qa/extras/ww8export/data/tdf91687.doc
  5. sw/qa/extras/ww8export/ww8export2.cxx
  6. sw/source/filter/ww8/wrtw8esh.cxx

Sometimes we have to go back to this specific commit using git checkout command to be able to work on the exact commit before the one that created the bug. But, most of the time, reverting the specific commit is easier, and the build will be much faster. Also, building older versions of LibeOffice is tricky. We can instead invoke this command:

$ git revert d72e0cadceb0b43928a9b4f18d75c9d5d30afdda

Now we should try to resolve the possible conflicts, then build the code and make sure the problem has gone away! Then we can try to re-introduce one or more changes to achieve a minimal set of changes that reproduces the problem.

We can start at the file level to find the relevant files to work on. Files 4 and 5 are related to the tests, so they should have no impact. File 1 and 2 seem to be related, as both are from filter/source/msfilter folder, file 3 is also related to these two files. After leaving out all the files, we see that changes from 6 (sw/source/filter/ww8/wrtw8esh.cxx) is enough to reproduce the problem. So, we have few lines of code changes in front of us:

@@ -756,7 +756,12 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
                OSL_ENSURE(pObj, "Where is the SDR-Object?");
                if (pObj)
                {
-                   aRect = pObj->GetSnapRect();
+                   aRect = pObj->GetLogicRect();
+
+                    // We have to export original size with padding
+                    const SfxItemSet& rSet = pObj->GetMergedItemSet();
+                    const SdrMetricItem* pItem = static_cast(rSet.GetItem(SDRATTR_TEXT_UPPERDIST));
+                    aRect.SetSize(Size(aRect.GetWidth(), aRect.GetHeight() + pItem->GetValue()));
                }
            }

If we work further on this piece of code, we will find that the change from pObj->GetSnapRect() to pObj->GetLogicRect() is the source of regression: Good catch!

2.2. Creating a Fix

As described in the previous section, going back to pObj->GetSnapRect() fixes the problem, but wait! Isn’t that change supposed to fix a problem?

(GOOD)

(BAD)

Figure 1: Wrong increase of watermark size
after save and reload

If we go back to git master using:

git reset --hard HEAD^1

and then only change pObj->GetSnapRect() to pObj->GetSnapRect(), this test fails with the change. Try:

$ make CPPUNIT_TEST_NAME="testTdf91687" -sr CppunitTest_sw_ww8export2

If we take a look at the tdf#91687 in the Bugzilla, we see the example sw/qa/extras/ww8export/data/tdf91687.doc that contains a watermark (Figure 1) that gets bigger by save and reload! Looking more carefully to the changes, it becomes clear that rotation is important here. If we change the watermark example in order to set rotation to zero, nothing happens.

This is not limited to watermarks: Saving and re-loading any custom shape leads to such a wrong increase in size. On the other hand, this does not have any effect on the lines, rotated or not.

2.3. Fixing the Side Effects

In order to fix the undesired side effects, we should make a difference between the lines and the complex shapes. So, what is the difference? If we look closely to the code, we find out that pObj object is from SdrObj class, which is abstract DrawObject. The documentation for this class can be found here:
https://docs.libreoffice.org/svx/html/classSdrObject.html

Figure 2. Class hierarchy for SdrObject

So, objects from different SdrObject subclasses are sent here, and appropriate GetSnapRect() or GetLogicRect() is called. But which method? According to the runtime polymorphism, this is determined at runtime. So without debugging, nothing becomes clear.

By setting a break-point at this modified line and stepping into the GetLogicRect() function, it becomes clear that two types of object are created for the shapes:

  • pObj is SdrObjCustomShape (x4): representing 4 ellipeses
  • pObj is SdrPathObj (x5): representing 5 lines

So, the trick would be creating a GetLogicRect() method for SdrPathObj and make it invoke GetSnapRect(). In this way, lines and custom shapes are treated differently.

We declare GetLogicRect() in include/svx/svdopath.hxx:

virtual const tools::Rectangle& GetLogicRect() const override;

and add its implementation in svx/source/svdraw/svdopath.cxx:

const tools::Rectangle &SdrPathObj::GetLogicRect() const
{
    return GetSnapRect();
}

Then we rebuild the LibreOffice by invoking make, and then start the LibreOffice from instdir/program/soffice. After loading, saving, and re-loading the example DOCX file, we see that this fix actually works!

In the third part, we are going to talk about the steps needed to get our changes merged into the LibreOffice Code. If you want to get involved in LibreOffice development, it is suggested that you join the LibreOffice development mailing list. See the instructions here.


Hossein Nourikhah is the Developer Community Architect at the The Document Foundation (TDF), the non-profit behind LibreOffice. If you need assistance getting started with LibreOffice development, you can get in touch with him:

E-Mail: hossein@libreoffice.org

IRC: hossein in the IRC channel #libreoffice-dev on the Libera.Chat network connect via webchat

Tender to implement support for editing and creation of a Dynamic Diagram feature (#202108-02)

The Document Foundation (TDF) is the charitable entity behind the world’s leading free/libre open source (FLOSS) office suite LibreOffice.

We are looking for an individual or company to implement support for editing and creation of Dynamic Diagrams.

The work has to be developed on LibreOffice master, so that it will be released in the next major version.

The task is to solve the following problem: Our existing “SmartArt” import uses the fallback stream in OOX files (and has some issues). It therefore gives us only the draw shapes that are imported, so we lose the original layout. Additionally, in older file versions we don’t have the cached shapes, and therefore can’t render anything.

The solution we seek, and as such the scope of this tender, is to have a schema driven diagram layout as a core feature. This should be interoperable with OOX (at least MSO2016) and have suitable extensions for ODF. It should layout interoperability, and allow editing of the underlying data, and selection of a schema.

The tender consists of the packages

A) Import and export in ODF and OOXML

  • load/save diagram data (layout and data model)
  • show the diagram in a cross-platform and pixel-perfect way
  • this should solve the issues from tdf#106547
  • provide automated test for the diagram layout mechanism

B) Creation of new diagrams within all modules, at least Writer and Draw/Impress

    • the solution should provide a couple of exemplary layouts such as a hierarchy with rectangle for organizational charts, for example, and linear as well circular arrangements of shapes to illustrate processes
    • values should be entered by the user with a floating widget presenting a bullet list that describes the hierarchical position

  • consider accessibility at all UI parts

C) Modification of existing diagrams

  • It must be possible to modify the data model later and add or delete content to the diagram; ideally, the floating input widget opens when the diagram is selected

D) Sharing of diagram layouts via extensions

  • Diagrams are generated from complex XML layouts, which should be provided and shared by the community

E) Document the Dynamic Diagram feature

and optionally

F) Provision of an interactive diagram layout tool

  • In coordination with the UX/design team an user interface should be implemented that simplifies creation of XML layouts

The following two bugs are amongst the relevant ones for this tender:

Support for Editing and Creation of SmartArt: https://bugs.documentfoundation.org/show_bug.cgi?id=37932

Auto-Layout for flowcharts and automatic flowcharts from Calc / Excel: https://bugs.documentfoundation.org/show_bug.cgi?id=92902

Further information can also be found in these two blogposts:

Note: There was recent effort on the layouting side. While this is better than 2-3 years ago, it still requires much work. Especially the editing functionality is just a proof of concept.

All technology standards of relevance, as well as their targeted versions for this tender should be declared or defined in the offer’s description of implementation (e.g. name and version of the cryptographic API on the respective operating systems).

A key item of the deliverables for this tender, and therefore also a decision criteria – besides qualification, references, price, and completeness of fulfilment – is extensive documentation about the approach chosen to implement the above items, covering more than just the pure implementation. We expect bidders to provide documentation on both the code and the non-code parts of this tender, e.g. methodology, structure and technical aspects. The Document Foundation will publish this under a free and open source license and make it available to the general public. Another criteria for the evaluation of the bids will be the description of the required test activities and the delivery of (automated) tests supporting work items for the described tender implementation or feature specification.

Required skills

  • Extensive knowledge of C++
  • Experience working on the LibreOffice source code

Other skills

  • English (conversationally fluent in order to coordinate and plan with members of TDF)

We use free, libre and open source (FLOSS) software for development wherever possible, and the resulting work must be licensed under the Mozilla Public License v2.0.

TDF welcomes applications from all suitably qualified persons regardless of their race, sex, disability, religion/belief, sexual orientation or age.

Bidders will get a preference for including a partner or independent developer who has not been involved in a successful tender before. For such developers, who have not yet been part of a successful tender bid, we aim on a best-effort basis, but without any guarantees whatsoever, to provide some mentoring in understanding the code base and the process in contributing to the code. We expect that time and efforts on the bidder’s side should not be part of the paid work for this tender. Please mention such need of LibreOffice development mentoring in your offer.

As always, TDF will give some preference to individuals who have previously shown a commitment to TDF, including but not limited to certified developers and/or members of TDF. Not being a member, or never having contributed before, does not exclude any applicants from consideration.

The task offered is a project-based one-off, with no immediate plans to a mid- or long-term contractual relationship. It is offered on a freelance, project basis. Individuals and companies applying can be located anywhere in the world.

When budgeting, we anticipated that this project (all items combined) to take in the region of 16 weeks of work. Should bidders’ assessment result in a significantly different number, please reach out to us before sending your bid, so we can clarify upfront.

TDF is looking forward to receiving your applications for one or more of the aforementioned tasks, your financial expectations and the earliest date of your availability, via e-mail to a committee at tender20210802@documentfoundation.org no later than September 20, 2021.

Applicants who have not received feedback by October 18, 2021 should consider that their application, after careful review, was not accepted.

All bidders are invited to ask their questions on this tender until September 6, 2021. Questions and answers will be made public in a collected and anonymized form.

 

Tender to implement autoupdater (#202108-01)

The Document Foundation (TDF) is the charitable entity behind the world’s leading free/libre open source (FLOSS) office suite LibreOffice.

We are looking for an individual or company to implement an autoupdater for LibreOffice.

Currently, LibreOffice can notify the user about a new version, but download and installation require manual action by the user, it is not automated. With plans of a “rolling release” model, that results in more frequent updates, e.g. biweekly or monthly, we want to improve this system.

Mandatory requirements

  • The solution has to work on all currently LibreOffice-supported Windows, Linux and macOS versions.
  • The implemented solution should not break the MSI-based LibreOffice installation set.
  • The implemented solution cannot solely rely on app stores autoupdaters, as The Document Foundation does not provide binaries in app stores currently.
  • The work has to be developed on LibreOffice master, so that it will be released in the next major version.
  • The implementation has to be provided with extensive documentation, about the approach chosen to implement the above items. We expect bidders to provide documentation on both the code and the non-code parts of the implementation, e.g. methodology, structure and technical aspects.

Optional items

The proposed solution might include some of the items of the following list, which is neither complete nor exhaustive, and is presented as a set of examples. These items are not mandatory to the completion of the tender, but might favor the granting of the tender in case of ex aequos, after checking that mandatory requirements are fulfilled:

  • Achieve partial and/or delta downloads: in order to optimize the bandwidth of the users, the implementation might proceed with the sole download of the whole changed files (partial downloads) or chunks of changed files or the whole package (delta downloads).
  • The implementation might keep track of other languages than English that the user might have installed and currently uses, and implement the download of the respective updated language packs, as well as of eventual offline help packages.
  • The implementation might verify the compatibility and/or update any extensions the user might have installed and currently uses.
  • The implementation is ready for the integration with the app stores’ installers/updaters.

Additional considerations

The choice of technology or technologies used is up to the bidders. Some of the available options, with none of them being a sole strict requirement, are the following:

The idea behind this tender is described in the following required tickets, whereas the implementation we seek for does not mandate a specific technology to be used, even if the tickets suggest otherwise:

The Document Foundation will publish the related documentation under a free and open source license and make it available to the general public.

Required skills

  • Extensive knowledge of C++
  • Experience working on the LibreOffice source code

Other skills

  • English (conversationally fluent in order to coordinate and plan with members of TDF)

We use free, libre and open source (FLOSS) software for development wherever possible, and the resulting work on the program code must be licensed under the Mozilla Public License v2.0.

TDF welcomes applications from all suitably qualified persons regardless of their race, sex, disability, religion/belief, sexual orientation or age.

Bidders will get a preference for including a partner or independent developer who has not been involved in a successful tender before.

As always, TDF will give some preference to individuals who have previously shown a commitment to TDF, including but not limited to certified developers and/or members of TDF. Not being a member, or never having contributed before, does not exclude any applicants from consideration.

The task offered is a project-based one-off, with no immediate plans to a mid- or long-term contractual relationship. It is offered on a freelance, project basis. Individuals and companies applying can be located anywhere in the world.

When budgeting, we anticipated that this project (all items combined) to take in the region of 60 days of work. Should bidders’ assessment result in a significantly different number, please reach out to us before sending your bid, so we can clarify upfront.

TDF is looking forward to receiving your applications for one or more of the aforementioned tasks, your financial expectations and the earliest date of your availability, via e-mail to a committee at tender20210801@documentfoundation.org no later than September 20, 2021.

Applicants who have not received feedback by October 18, 2021 should consider that their application, after careful review, was not accepted.

All bidders are invited to ask their questions on this tender until September 6, 2021. Questions and answers will be made public in a collected and anonymized form.

LibreOffice project recap: July 2021

Check out our summary of what happened in the LibreOffice community last month…

  • We started July by welcoming allotropia to The Document Foundation’s Advisory Board. Founded in late 2020 with five long-time LibreOffice developers, allotropia’s stated mission is to bring LibreOffice to shine – in as many different shapes and forms as necessary, to serve the modern needs of office productivity software. allotropia was spun off from CIB, another long-time provider of LibreOffice-based products and services (and also a member of the Advisory Board).

  • On the very same day, our documentation team announced the LibreOffice Getting Started Guide 7.1. Covering all LibreOffice modules, from the Calc spreadsheet to the Base database and including chapters on the suite settings as well as macro coding, the Getting Started Guide 7.1 is a valuable companion for organizations that want to deploy documentation on LibreOffice together with the software suite on their offices and also at user’s homes.

  • Meanwhile, we chatted with Tim Brennan Jr. from the Brazilian LibreOffice community. He’s on the Brazilian Portuguese translation and editing team, and recently decided to become a Member of The Document Foundation. Welcome, Tim!

  • Then the Spanish-speaking community held an online meeting with video talks streamed live. The activity was attended by several members, who are recognized for their participation and collaboration in the project.

  • Looking for LibreOffice tutorial videos? We have playlists in English, German and French – but the videos don’t just happen by magic. They’re created by volunteers, so we asked Harald Berger how he makes the German videos. Check it out, and help us to make more!

  • LibreOffice 7.2 is tantalisingly close; it’s due to be released in the middle of this month. We held a Bug Hunting Session for the first release candidate, to identify and squash any last bugs before it goes live.

  • Our LibreOffice New Generation project aims to bring new – and especially younger – contributors into the LibreOffice community. Earlier in the year, we created a flyer for schools and universities, and we’ve sent out printed versions to many people around the world. Now, here’s an alternative design, thanks to Rizal Muttaqin and the Indonesian community!

  • LibreOffice’s documentation team is driven by volunteers around the world. We wanted, we want to say a special thanks to members of the Brazilian Portuguese community, who’ve worked hard to translate and update user guides. So we sent out Open Badges – special, customised badges with embedded metadata, describing their achievements.

  • Our second community interview in the month was with Jackson Cavalcanti Junior, who told us about his work in the documentation project.

  • Release-wise, we had one update in July: LibreOffice 7.1.5 with 55 bugfixes and compatibility improvements.

  • The LibreOffice Conference 2021 is coming up: check out the sponsorship package. The event will run online again this year, due to the ongoing pandemic situation, from September 23 – 25.

  • Just before the end of the month, the documentation team announced another guide: the Draw Guide 7.1. This covers all aspects of the image-editing component of the suite. Great work, everyone!

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

LibreOffice Conference 2021: Announcing the logo!

In late June, we started a competition to design the logo for our upcoming LibreOffice Conference 2021. We received 22 submissions with many great ideas – thanks to everyone who took part!

The conference organisers examined every design and ranked them, and today we’re announcing the winner, which is created by Alan Ward. Here’s how it looks:

Alan also provided a simplified monochrome version which can be used on merchandise – stay tuned to this blog for more on that. And here’s what he had to say about the design:

This design is inspired by the theme of a community coming together to share common experience. The hexagonal grid motif suggests networking from a technical and a human standpoint. The viewer’s attention is drawn to the LibreOffice emblem, as a focal point in the center. Colors have been chosen from a palette derived from the official LibreOffice typography, to suit both light and dark backgrounds.

Several versions of the logo have been prepared, to suit different applications. These include both full color and monochrome versions, in both hi and low resolution. High resolution printing process can reproduce thinner lines correctly (eg printed documents, PDF files). However, the use of several colors increases production costs or may not be available, so a simple monochrome may be required as an alternative to full-color. Either color or monochrome hires versions of the logo may easily be adapted as a base for a themed wallpaper.

Low-resolution printing processes such as those used to print T-shirts or engrave metal or wood articles require the use of relatively bold lines to show up correctly on the finished product. This is why a simple design with few elements is most effective in this situation. The use of several colors also increases production costs, so a simple monochrome approach is perhaps best for these applications. The monochrome design can easily be adapted for different colors of the support material (e.g. T-shirts in white, gray, black).

Thanks again to Alan for his design – a magic box of LibreOffice goodies is on his way to him! And thanks to everyone else for their submissions (we’ll get in touch and send you some LibreOffice stickers). Even though we had to choose one design in the end, there were plenty of great and creative ideas, and we really appreciate the input.

Now, onwards and upwards to the conference! Keep an eye on this blog for more updates…