LibreOffice 5.1 Under the Hood Changes

From The Document Foundation Wiki
Jump to: navigation, search

About this page

This is an in-progress scratch-pad of notes to build the list of under-the-hood changes from as and when we release. Please do not list changes that are to be shipped already in the 5.0 release! Please do not add wish-list changes that you hope will be done, but only what actually has been done already.

What does a good change description look like here:

  • It has a description what has been done (and why).
  • It credits the main authors who did the work – just add them in brackets after the feature, where possible.
  • If it is possible to show the progress using a graph, a graph should be included.

Thanks in advance for your help filling this out!


UI-related

  • Uno commands have two new properties: PopupLabel and TooltipLabel. With these, it's possible to use different labels in Popup menus and tooltips. (Maxim Monastirsky, Samuel Mehrbrodt [CIB])
  • Introduced CommandInfoProvider (based on an existing sidebar-only class) to provide command labels and icons in a single place (Samuel Mehrbrodt, CIB)
  • upstreamed elementary theme (Bjoern Michaelsen, Simon Steinbeiss)

Build / platform improvements

  • Initial work has started to cross-compile LibreOffice to Javascript using Emscripten (Samuel Mehrbrodt, CIB)
  • Import tests for DLP import libraries (libmwaw, libetonyek, etc.) have been reworked to take into account version of the library that is used for build and only test import of documents of format supported by that version. That allows us to remove requirements for a particular (typically the newest) version of some of the libraries when building with system libraries. (David Tardon)
  • Support for building with Visual Studio 2015 and new universal C runtime (David Ostrovsky)

Code quality work

  • add assert()s for touching SwClient/SwModify without holding the SolarMutex (Bjoern Michaelsen)
  • wrote a "badstatics" clang plugin to find problematic global variables referencing VCL objects that may cause crashes on shutdown and fixed a bunch of those (Michael Stahl)

Code cleanup

C++11

  • Many less readable pieces are being rewritten to range-based for loop: for (const auto & i : aContainer) { i.doSomething(); } (Daniel Robertson)
  • Hundreds of boost::ptr_container replaced by std::container<std::unique_ptr> (Michael Stahl, Noel Grandin)
  • Lots of legacy integers of types like sal_uLong converted to sane integer types (Matteo Casalin)
  • Old SGI STL extensions compatibility functions o3tl::project1st/project2nd have been replaced by lambdas (Daniel Robertson)
  • alias old custom sw::UnoImplPtr to a plain C++11 std::unique_ptr (Bjoern Michaelsen)
  • use more initializer_lists (Bjoern Michaelsen)
  • replaced all alloca() calls that don't look obviously small with new [] and std::unique_ptr (Michael Stahl)
  • replaced all boost::function with std::function (Michael Stahl)

Automatic rewrites

  • Larger classes in sw now have consistent "m_" prefixes for class member variables. blog post (Miklos Vajna)

General Refactoring

  • Fix UnoCrsr memory management and refcounting in Writer (Bjoern Michaelsen)
  • Some debugging improvements on the old SwClient/SwModify observer pattern (Bjoern Michaelsen)
  • removed a bunch of duplicate implementations of trivial Uno interfaces like XPropertySetInfo that were causing build failures with MSVC --enable-mergedlibs (Michael Stahl)

Misc

  • Added a script bin/includebloat to find the most expensive included headers and fixed the biggest offenders to reduce the number of bytes read for a full build by the preprocessor by 20%. (Michael Stahl)
  • Removed code for exporting to the obsolete (pre-Unicode) WW6 format (Michael Stahl)

Test Infrastructure

  • Split UNO-Api Tests for faster integration tests on modern multicode hardware (Bjoern Michaelsen)
  • add ./logerrit testfeature helper for feature branch testing on gerrit CI (Bjoern Michaelsen)
  • add more python UNO integration tests for writer UNO API (Bjoern Michaelsen)
  • add stagingcheck target for instable or staged tests (Bjoern Michaelsen)
  • added numerous additional unit tests (Varun Dhall, GSoC)
  • fixed a long standing deadlock scenario when using SolarMutexReleaser on Windows that affected our out-of-process tests (Michael Stahl)

Miscellaneous improvements

  • Wiki Publisher: replaced the deprecated bundled external Apache Commons HTTPClient library with JRE 6 built-in HttpURLConnection code and removed 3 now unnecessary bundled external libraries (Michael Stahl, Rene Engelhard)
  • theServiceDocumenter: allow easy access to online documentation of UNO services (Bjoern Michaelsen)
  • replaced outdated and badly seeded implementation of rtlRandomPool with a new one that reads random data suitable for cryptographic purposes from the OS (Norbert Thiebaud)