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