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