blob: 64aab9b6db79dd1d265e356714372f0d8720760f [file] [log] [blame] [view]
Adolfo Jayme Barrientosb9630862015-05-24 19:42:51 -05001# LibreOffice
2[![Coverity Scan Build Status](https://scan.coverity.com/projects/211/badge.svg)](https://scan.coverity.com/projects/211)
3
Adolfo Jayme Barrientos89d825c2015-03-22 21:21:57 -06004A quick overview of the LibreOffice code structure.
5
6## Overview
7
8You can develop for LibreOffice in one of two ways, one
9recommended and one much less so. First the somewhat less recommended
Michael Stahldeec9bd2015-03-31 14:55:56 +020010way: it is possible to use the SDK to develop an extension,
11for which you can read the API docs [here](http://api.libreoffice.org/)
12and [here](http://wiki.services.openoffice.org/wiki/Documentation/DevGuide).
13This re-uses the (extremely generic) UNO APIs that are also used by
14macro scripting in StarBasic.
Adolfo Jayme Barrientos89d825c2015-03-22 21:21:57 -060015
16The best way to add a generally useful feature to LibreOffice
17is to work on the code base however. Overall this way makes it easier
18to compile and build your code, it avoids any arbitrary limitations of
19our scripting APIs, and in general is far more simple and intuitive -
20if you are a reasonably able C++ programmer.
21
22
23## The important bits of code
24
25Each module should have a `README` file inside it which has some
26degree of documentation for that module; patches are most welcome to
27improve those. We have those turned into a web page here:
28
29http://docs.libreoffice.org/
30
31However, there are two hundred modules, many of them of only
32peripheral interest for a specialist audience. So - where is the
33good stuff, the code that is most useful. Here is a quick overview of
34the most important ones:
35
36Module | Description
37----------|-------------------------------------------------
38sal/ | this provides a simple System Abstraction Layer
39tools/ | this provides basic internal types: 'Rectangle', 'Color' etc.
40vcl/ | this is the widget toolkit library and one rendering abstraction
Michael Stahldeec9bd2015-03-31 14:55:56 +020041framework | 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
42sfx2/ | legacy core framework used by Writer/Calc/Draw: document model / load/save / signals for actions etc.
43svx/ | drawing model related helper code, including much of Draw/Impress
Adolfo Jayme Barrientos89d825c2015-03-22 21:21:57 -060044
45Then applications
46
47Module | Description
48----------|-------------------------------------------------
49desktop/ | this is where the 'main' for the application lives, init / bootstrap. the name dates back to an ancient StarOffice that also drew a desktop
Michael Stahldeec9bd2015-03-31 14:55:56 +020050sw/ | Writer
51sc/ | Calc
52sd/ | Draw / Impress
Adolfo Jayme Barrientos89d825c2015-03-22 21:21:57 -060053
54There are several other libraries that are helpful from a graphical perspective:
55
56Module | Description
57----------|-------------------------------------------------
58basebmp/ | enables a VCL compatible rendering API to render to bitmaps, as used for LibreOffice Online, Android, iOS, etc.
59basegfx/ | algorithms and data-types for graphics as used in the canvas
60canvas/ | new (UNO) canvas rendering model with various backends
61cppcanvas/ | C++ helper classes for using the UNO canvas
Michael Stahldeec9bd2015-03-31 14:55:56 +020062drawinglayer/ | View code to render drawable objects and break them down into primitives we can render more easily.
Adolfo Jayme Barrientos89d825c2015-03-22 21:21:57 -060063
64
65## Finding out more
66
67Beyond this, you can read the `README` files, send us patches, ask
68on the mailing list libreoffice@lists.freedesktop.org (no subscription
69required) or poke people on IRC `#libreoffice-dev` on irc.freenode.net -
70we're a friendly and generally helpful mob. We know the code can be
71hard to get into at first, and so there are no silly questions.