| Michael Meeks | 6ec6319 | 2013-04-08 14:05:06 +0100 | [diff] [blame] | 1 | * A quick overview of the LibreOffice code structure. |
| 2 | |
| 3 | ** Overview |
| 4 | |
| 5 | You can develop for LibreOffice in one of two ways, one |
| 6 | recommended and one much less so. First the somewhat less recommended |
| 7 | way: it is possible to use the SDK, for wihch you can read the API |
| 8 | docs here http://api.libreoffice.org/. This re-uses the (extremely |
| 9 | generic) APIs we provide for macro scripting in StarBasic. |
| 10 | |
| 11 | The best way to add a generally useful feature to LibreOffice |
| Thomas Arnhold | cf9bc83 | 2013-04-08 15:34:25 +0200 | [diff] [blame] | 12 | is to work on the code base however. Overall this way makes it easier |
| Michael Meeks | 6ec6319 | 2013-04-08 14:05:06 +0100 | [diff] [blame] | 13 | to compile and build your code, it avoids any arbitrary limitations of |
| 14 | our scripting APIs, and in general is far more simple and intuitive - |
| 15 | if 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 |
| 21 | degree of documentation for that module; patches are most welcome to |
| 22 | improve 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 |
| 27 | peripheral interest for a specialist audience. So - where is the |
| 28 | good-stuff, the code that is most useful. Here is a quick overview of |
| 29 | the 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 |
| 49 | graphical 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 |
| 62 | on the mailing list libreoffice@lists.freedesktop.org (no subscription |
| 63 | required) or poke people on IRC #libreoffice-dev on irc.freenode.net - |
| 64 | we're a friendly and generally helpful mob. We know the code can be |
| 65 | hard to get into at first, and so there are no silly questions. |
| 66 | |
| 67 | |