blob: a2b715f55e84bb3fb7d843afc539e3119a83ae4d [file] [log] [blame]
Michael Meeks6ec63192013-04-08 14:05:06 +01001* A quick overview of the LibreOffice code structure.
2
3** Overview
4
5 You can develop for LibreOffice in one of two ways, one
6recommended and one much less so. First the somewhat less recommended
7way: it is possible to use the SDK, for wihch you can read the API
8docs here http://api.libreoffice.org/. This re-uses the (extremely
9generic) APIs we provide for macro scripting in StarBasic.
10
11 The best way to add a generally useful feature to LibreOffice
Thomas Arnholdcf9bc832013-04-08 15:34:25 +020012is to work on the code base however. Overall this way makes it easier
Michael Meeks6ec63192013-04-08 14:05:06 +010013to compile and build your code, it avoids any arbitrary limitations of
14our scripting APIs, and in general is far more simple and intuitive -
15if you are a reasonably able C++ programmer.
16
17
18** The important bits of code
19
20 Each module should have a README file inside it which has some
21degree of documentation for that module; patches are most welcome to
22improve those. We have those turned into a web-page here:
23
24 http://docs.libreoffice.org/
25
26 However, there are two hundred modules, many of them of only
27peripheral interest for a specialist audience. So - where is the
28good-stuff, the code that is most useful. Here is a quick overview of
29the most important ones:
30
31 sal/ - this provides a simple System Abstraction Layer
32 tools/ - this provides basic internal types: 'Rectangle', 'Color' etc.
33 vcl/ - this is the widget toolkit library and one rendering abstraction
34 svx/ - graphics related helper code, including much of 'draw' / 'impress'
35 sfx2/ - core framework: document model / load/save / signals for actions etc.
36 framework - UNO wrappers around the core framework, responsible for building
37 toolbars, menus, status bars, and the chrome around the document
38 using widgets from VCL, and XML descriptions from */uiconfig/ files
39
40 Then applications
41
42 desktop/ - this is where the 'main' for the application lives, init / bootstrap
43 the name dates back to an ancient StarOffice that also drew a desktop
44 sw/ - writer.
45 sc/ - calc
46 sd/ - draw / impress
47
48 There are several other libraries that are helpful from a
49graphical perspective:
50
51 basebmp/ - enables a VCL compatible rendering API to render to bitmaps,
52 as used for LibreOffice on-line, Android, iOS etc.
53 basegfx/ - algorithms and data-types for graphics as used in the canvas
54 canvas/ - new (UNO) canvas rendering model with various backends
55 cppcanvas/ - C++ helper classes for using the UNO canvas
56 drawinglayer/ - code to render and manage document drawing shapes and break
57 them down into primitives we can render more easily.
58
59** Finding out more
60
61 Beyond this, you can read the README files, send us patches, ask
62on the mailing list libreoffice@lists.freedesktop.org (no subscription
63required) or poke people on IRC #libreoffice-dev on irc.freenode.net -
64we're a friendly and generally helpful mob. We know the code can be
65hard to get into at first, and so there are no silly questions.
66
67