LibreOffice IDE integration

Sometimes I wonder if the world’s so small,
Can we ever get away from the sprawl?

Sprawl II — Arcade Fire

So these days, most people prefer to use an IDE to navigate their source code. This has often been greeted with some defensive elitism of the “real programmers” kind since the early days of the open sourcing of StarOffice. One does not simply load a code base the size of LibreOffice in your wimpy IDE: while it is possible somehow in the end, its a lot more trouble than its worth to manually set up e.g. all the include path manually to get the fancy stuff like autocompletion. Add to that, that e.g. UNO headers are generated during the build and header were at distributed over multiple IDE unfriendly locations, with many headers even available as copies from multiple locations, before we fixed that.

All these things are fixed now. And while LibreOffice still is a huge beast with our new build system we can get a holistic view of what needs to get build where, how and when. This makes it easy, almost trivial to generate an IDE project file from the build system. And to prove this point, I did just that for the kdevelop IDE. This isnt limited in principle to this one IDE — in fact the kdevelop specific part of this is some 150 lines of Python. So no matter what IDE you use: Eclipse, Netbeans, Anjuta, Visual Studio, Code::Blocks or XCode — you should be able to adapt this. In fact, while writing this, I find there is already work going on for XCode. Feel invited to join the party and make LibreOffice trivially buildable in your favourite IDE!

So as announced to the developer list, this allows you to make navigating, editing, building, testing and running LibreOffice much easier, giving you features like:

  • autocompletion
  • building a module from the IDE
  • building all of LibreOffice from the IDE
  • nondebug and debug build configs for the above
  • starting LibreOffice from the IDE
  • running unitchecks, slowchecks and subsequentchecks from the IDE

Dont believe it? Here is a video featuring a stuttering german guy (me) on the audio track showing this:

If you want to show this around on social media, there is also a shorter version featuring the essentials (make sure to link to the HD versions).

A closing note: A long time, common IDEs embrace and extended into the buildsystems so once you used an IDE, you could only use this one IDE and no other. In retrospect, this is obviously doing it wrong. With the current approach, we can make LibreOffice easily buildable in any IDE on any platform. A very important fact for a product available on so many platforms.

addendum: As Karl Fogel wrote LibreOffice is now ridiculously easy to build. before we even had this, it just shows that one can always do better. ;)

About these ads

About bmichaelsen

productivity liberator

7 responses to “LibreOffice IDE integration”

  1. Shiraz says :


    In the video you have shown how we can test using an IDE. I want to execute the Libre office after the build using command line. How can i do that ?

    • bmichaelsen says :

      On *nix systems its: ./instdir/program/soffice to start LibreOffice. Alternatively, you can run make debugrun which starts LibreOffice in a debugger session, which might be helpful sometimes.

      • eric_opensource says :

        Hi, i downloaded libreoffice sourcecode (zip file) from libreoffice website then opened it up using Kdevelop IDE. So now i have all the components of the libreoffice with all the modules inside the Kdevelop. But i watched your video on Kdevelop and libreoffice development, and in it you demoed only writer module. How do i do that now that my Kdevelop has the whole package uploaded unto itself (kdevelop). I can’t seem to find the module you demonstrated in the video. i am using libreoffice I only have a little experience in programming and i wanted to develop it further by experimenting with opensource projects like libreoffice.

      • bmichaelsen says :

        Hmm, I cant quite guess what your problem is. I would suggest to use git to download the current state of LibreOffice development though and start off as per:

        If you have trouble still, the developer webchat at (IRC) might be the best way to get quick and interactive help from other developers.

  2. eric_opensource says :

    I did it, i used the
    1. downloaded libreoffice 4.3 tar bz… ( i already have it downloaded and git is also not applicable since i have an intermittent connection)
    2. then unpacked it.
    3. then installed required dependencies for ubuntu
    4. then cd to downloaded libreoffice folder…
    5. then on cli, “./”… it automatically downloaded updates for the libreoffice files…
    6. then “make”… it took a significant amount of time to make…
    7. then “make kdevelop-ide-integration”… and voila, it opened in kdevelop… and successfully run the libreoffice-dev.
    8. now where can i find the rotate image by increment in libreoffice-draw and apply that code on libreoffice-writer so i can rotate images in writer by increments and by mouse. =)

    cheeers! Thank you!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: