Luboš Luňák f6bd95704e use std::atomic rather than OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER
Sources such as
http://preshing.com/20130930/double-checked-locking-is-fixed-in-cpp11/
or https://en.wikipedia.org/wiki/Double-checked_locking suggest that
it wasn't possible to reliably do a portable double-checked initialization
before C++11. It may be true that for all platforms we support those
memory barriers are in fact not needed (which seems to be the assumption
behind OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER being empty), and
looking at the generated assembly here on x86-64 seems to confirm that, but
in the worst case then this is a more chatty and standard way of writing
a no-op.

I don't want to use threadsafe statics or std::call_once() because
ScGlobal::Clear() does cleanup, which would be non-trivial to do with these,
and also some functions may not necessarily always force
creation of the singleton when touching the pointer, so it can't be easily
hidden behind a single function call.

The need to explicitly use load() with delete (thus preventing DELETEZ)
looks like a Clang bug to me.

Change-Id: Id3b0ef4b273ed25a5c154f90cde090ea1f9674fb
Reviewed-on: https://gerrit.libreoffice.org/55851
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-06-18 10:56:35 +02:00
2018-05-25 21:46:32 +02:00
2018-06-17 20:33:42 +02:00
2018-04-16 15:57:08 +02:00
2018-06-13 09:47:04 +02:00
2018-06-14 21:57:20 +02:00
2018-06-17 17:12:32 +02:00
2018-05-29 22:11:07 +02:00
2018-06-17 17:12:32 +02:00
2018-06-11 11:38:15 +02:00
2018-06-11 11:38:15 +02:00
2018-06-18 09:02:31 +02:00
2018-06-18 08:39:25 +02:00
2018-06-11 11:38:15 +02:00
2018-06-18 10:00:51 +02:00
2018-06-07 21:51:36 +03:00
2018-04-16 15:57:08 +02:00
2018-04-16 15:57:08 +02:00
2018-06-13 08:20:35 +02:00
2018-05-27 10:12:35 +02:00
2018-06-14 17:50:52 +02:00
2018-06-12 08:24:45 +02:00
2018-04-16 15:57:08 +02:00
2018-06-18 02:26:27 +02:00
2018-05-01 15:15:38 +02:00
2018-06-18 10:01:52 +02:00
2018-05-27 10:12:35 +02:00
2018-04-14 08:05:36 +02:00
2018-06-17 17:12:32 +02:00
2018-05-27 20:26:31 +02:00
2018-05-25 21:46:49 +02:00
2018-06-12 11:29:04 +02:00
2018-06-14 23:13:12 +02:00
2018-06-14 21:57:20 +02:00
2018-06-17 17:12:32 +02:00
2018-03-24 14:05:45 +01:00
2018-06-14 17:16:37 +02:00
2018-06-07 07:28:54 +02:00
2018-06-07 14:30:41 +02:00
2018-05-09 19:59:35 +02:00
2018-04-16 23:19:34 +02:00
2018-03-15 20:09:53 +01:00
2018-03-16 16:18:45 +01:00
2018-04-16 15:57:08 +02:00
2018-05-05 09:21:24 +02:00
2018-06-18 10:00:51 +02:00
2018-04-13 15:41:09 +02:00
2018-06-07 09:27:46 +02:00
2018-04-16 23:19:34 +02:00
2018-06-14 21:57:20 +02:00
2018-06-13 09:47:04 +02:00
2018-06-15 16:23:03 +02:00
2018-06-03 19:14:54 +02:00

LibreOffice

Coverity Scan Build Status CII Best Practices

LibreOffice is an integrated office suite based on copyleft licenses and compatible with most document formats and standards. Libreoffice is backed by The Document Foundation, which represents a large independent community of enterprises, developers and other volunteers moved by the common goal of bringing to the market the best software for personal productivity. LibreOffice is open source, and free to download, use and distribute.

A quick overview of the LibreOffice code structure.

Overview

You can develop for LibreOffice in one of two ways, one recommended and one much less so. First the somewhat less recommended way: it is possible to use the SDK to develop an extension, for which you can read the API docs here and here. This re-uses the (extremely generic) UNO APIs that are also used by macro scripting in StarBasic.

The best way to add a generally useful feature to LibreOffice is to work on the code base however. Overall this way makes it easier to compile and build your code, it avoids any arbitrary limitations of our scripting APIs, and in general is far more simple and intuitive - if you are a reasonably able C++ programmer.

The build chain and runtime baselines

These are the current minimal operating system and compiler versions to run and compile LibreOffice, also used by the TDF builds:

  • Windows:
    • Runtime: Windows 7
    • Build: Cygwin + Visual Studio 2015 Update 3
  • macOS:
    • Runtime: 10.9
    • Build: 10.12 + Xcode 8
  • Linux:
    • Runtime: RHEL 6 or CentOS 6
    • Build: GCC 4.8.1 or Clang
  • iOS (only for LibreOfficeKit):
    • Runtime: 11.4 (only support for newer i devices == 64 bit)
    • Build: Xcode 9.3 and iPhone SDK 11.4

At least Clang 3.4.2 is known to be too old to pass the configure.ac check "whether $CXX supports C++17, C++14, or C++11" in its current form (due to the #pragma GCC diagnostic ignored "-Wpragmas" that it does not understand).

If you want to use Clang with the LibreOffice compiler plugins, the minimal version of Clang is 3.8. Since Xcode doesn't provide the compiler plugin headers, you have to compile your own Clang to use them on macOS.

You can find the TDF configure switches in the distro-configs/ directory.

To setup your initial build environment on Windows and macOS, we provide the LibreOffice Development Environment (LODE) scripts.

For more information see the build instructions for your platform in the TDF wiki.

The important bits of code

Each module should have a README file inside it which has some degree of documentation for that module; patches are most welcome to improve those. We have those turned into a web page here:

https://docs.libreoffice.org/

However, there are two hundred modules, many of them of only peripheral interest for a specialist audience. So - where is the good stuff, the code that is most useful. Here is a quick overview of the most important ones:

Module Description
sal/ this provides a simple System Abstraction Layer
tools/ this provides basic internal types: 'Rectangle', 'Color' etc.
vcl/ this is the widget toolkit library and one rendering abstraction
framework UNO framework, responsible for building toolbars, menus, status bars, and the chrome around the document using widgets from VCL, and XML descriptions from /uiconfig/ files
sfx2/ legacy core framework used by Writer/Calc/Draw: document model / load/save / signals for actions etc.
svx/ drawing model related helper code, including much of Draw/Impress

Then applications

Module Description
desktop/ this is where the 'main' for the application lives, init / bootstrap. the name dates back to an ancient StarOffice that also drew a desktop
sw/ Writer
sc/ Calc
sd/ Draw / Impress

There are several other libraries that are helpful from a graphical perspective:

Module Description
basegfx/ algorithms and data-types for graphics as used in the canvas
canvas/ new (UNO) canvas rendering model with various backends
cppcanvas/ C++ helper classes for using the UNO canvas
drawinglayer/ View code to render drawable objects and break them down into primitives we can render more easily.

Rules for #include directives (C/C++)

Use the "..." form if and only if the included file is found next to the including file. Otherwise, use the <...> form. (For further details, see the mail Re: C[++]: Normalizing include syntax ("" vs <>).)

The UNO API include files should consistently use double quotes, for the benefit of external users of this API.

Finding out more

Beyond this, you can read the README files, send us patches, ask on the mailing list libreoffice@lists.freedesktop.org (no subscription required) or poke people on IRC #libreoffice-dev on irc.freenode.net - we're a friendly and generally helpful mob. We know the code can be hard to get into at first, and so there are no silly questions.

Description
LibreOffice mirror (not auto-updating).
Readme 1.9 GiB
Languages
C++ 82.4%
Java 5.3%
Rich Text Format 2.3%
PostScript 1.9%
Python 1.9%
Other 5.7%