tdf#161341 show/hide controls/shapes/pictures in view/print
[LibreOffice.git] / README.md
blob8e39324cbd95a4ad19b2bff3bab3c789c6aa3310
1 # LibreOffice
2 [![Coverity Scan Build Status](https://scan.coverity.com/projects/211/badge.svg)](https://scan.coverity.com/projects/211) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/307/badge)](https://bestpractices.coreinfrastructure.org/projects/307) [![Translation status](https://weblate.documentfoundation.org/widgets/libo_ui-master/-/svg-badge.svg)](https://weblate.documentfoundation.org/engage/libo_ui-master/?utm_source=widget)
4 <img align="right" width="150" src="https://opensource.org/wp-content/uploads/2009/06/OSIApproved.svg">
6 LibreOffice is an integrated office suite based on copyleft licenses
7 and compatible with most document formats and standards. Libreoffice
8 is backed by The Document Foundation, which represents a large
9 independent community of enterprises, developers and other volunteers
10 moved by the common goal of bringing to the market the best software
11 for personal productivity. LibreOffice is open source, and free to
12 download, use and distribute.
14 A quick overview of the LibreOffice code structure.
16 ## Overview
18 You can develop for LibreOffice in one of two ways, one
19 recommended and one much less so. First the somewhat less recommended
20 way: it is possible to use the SDK to develop an extension,
21 for which you can read the [API docs](https://api.libreoffice.org/)
22 and [Developers Guide](https://wiki.documentfoundation.org/Documentation/DevGuide).
23 This re-uses the (extremely generic) UNO APIs that are also used by
24 macro scripting in StarBasic.
26 The best way to add a generally useful feature to LibreOffice
27 is to work on the code base however. Overall this way makes it easier
28 to compile and build your code, it avoids any arbitrary limitations of
29 our scripting APIs, and in general is far more simple and intuitive -
30 if you are a reasonably able C++ programmer.
32 ## The Build Chain and Runtime Baselines
34 These are the current minimal operating system and compiler versions to
35 run and compile LibreOffice, also used by the TDF builds:
37 * Windows:
38     * Runtime: Windows 7
39     * Build: Cygwin + Visual Studio 2019 version 16.10
40 * macOS:
41     * Runtime: 10.15
42     * Build: 12 (13 for aarch64) + Xcode 14
43 * Linux:
44     * Runtime: RHEL 8 or CentOS 8 and comparable
45     * Build: either GCC 12; or Clang 12 with libstdc++ 10
46 * iOS (only for LibreOfficeKit):
47     * Runtime: 11.4 (only support for newer i devices == 64 bit)
48     * Build: Xcode 9.3 and iPhone SDK 11.4
49 * Android:
50     * Build: NDK r23 and SDK 30.0.3
51 * Emscripten / WASM:
52     * Runtime: a browser with SharedMemory support (threads + atomics)
53     * Build: Qt 5.15 with Qt supported Emscripten 1.39.8
54     * See [README.wasm](static/README.wasm.md)
56 Java is required for building many parts of LibreOffice. In TDF Wiki article
57 [Development/Java](https://wiki.documentfoundation.org/Development/Java), the
58 exact modules that depend on Java are listed.
60 The baseline for Java is Java Development Kit (JDK) Version 17 or later.
62 The baseline for Python is version 3.11. It follows the version available
63 in SUSE Linux Enterprise Desktop and the Maintenance Support version of
64 Red Hat Enterprise Linux.
66 If you want to use Clang with the LibreOffice compiler plugins, the minimal
67 version of Clang is 12.0.1. Since Xcode doesn't provide the compiler plugin
68 headers, you have to compile your own Clang to use them on macOS.
70 You can find the TDF configure switches in the `distro-configs/` directory.
72 To setup your initial build environment on Windows and macOS, we provide
73 the LibreOffice Development Environment
74 ([LODE](https://wiki.documentfoundation.org/Development/lode)) scripts.
76 For more information see the build instructions for your platform in the
77 [TDF wiki](https://wiki.documentfoundation.org/Development/How_to_build).
79 ## The Important Bits of Code
81 Each module should have a `README.md` file inside it which has some
82 degree of documentation for that module; patches are most welcome to
83 improve those. We have those turned into a web page here:
85 <https://docs.libreoffice.org/>
87 However, there are two hundred modules, many of them of only
88 peripheral interest for a specialist audience. So - where is the
89 good stuff, the code that is most useful. Here is a quick overview of
90 the most important ones:
92 Module    | Description
93 ----------|-------------------------------------------------
94 [sal/](sal)             | this provides a simple System Abstraction Layer
95 [tools/](tools)         | this provides basic internal types: `Rectangle`, `Color` etc.
96 [vcl/](vcl)             | this is the widget toolkit library and one rendering abstraction
97 [framework/](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
98 [sfx2/](sfx2)           | legacy core framework used by Writer/Calc/Draw: document model / load/save / signals for actions etc.
99 [svx/](svx)             | drawing model related helper code, including much of Draw/Impress
101 Then applications
103 Module    | Description
104 ----------|-------------------------------------------------
105 [desktop/](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
106 [sw/](sw/)           | Writer
107 [sc/](sc/)           | Calc
108 [sd/](sd/)           | Draw / Impress
110 There are several other libraries that are helpful from a graphical perspective:
112 Module    | Description
113 ----------|-------------------------------------------------
114 [basegfx/](basegfx)  | algorithms and data-types for graphics as used in the canvas
115 [canvas/](canvas)   | new (UNO) canvas rendering model with various backends
116 [cppcanvas/](cppcanvas) | C++ helper classes for using the UNO canvas
117 [drawinglayer/](drawinglayer) | View code to render drawable objects and break them down into primitives we can render more easily.
119 ## Rules for #include Directives (C/C++)
121 Use the `"..."` form if and only if the included file is found next to the
122 including file. Otherwise, use the `<...>` form. (For further details, see the
123 mail [Re: C[++]: Normalizing include syntax ("" vs
124 <>)](https://lists.freedesktop.org/archives/libreoffice/2017-November/078778.html).)
126 The UNO API include files should consistently use double quotes, for the
127 benefit of external users of this API.
129 `loplugin:includeform (compilerplugins/clang/includeform.cxx)` enforces these rules.
132 ## Finding Out More
134 Beyond this, you can read the `README.md` files, send us patches, ask
135 on the mailing list libreoffice@lists.freedesktop.org (no subscription
136 required) or poke people on IRC `#libreoffice-dev` on irc.libera.chat -
137 we're a friendly and generally helpful mob. We know the code can be
138 hard to get into at first, and so there are no silly questions.
140 ## SAST Tools
142 [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_medium=github&utm_campaign=open_source) - static analyzer for C, C++, C#, and Java code.