Lodahl's blog

24 January 2013

LibreOffice and OpenClipart.org


For several years I have been very fond of clip arts from the Open Clipart Library (OCAL) and when LibreOffice now has built in usage of SVG files I was very happy. Now I could use these exelent cliparts in scalable format. Until then the only way was to convert to bitmap (png or jpg) format first.
Soon I began thinking of getting access to the library directly from the UI in LibreOffice. I  discovered that from Inkscape you can insert cliparts from online already.


Hmmm. It must be possible in LibreOffice also. I investigated the API.
I started prototyping in LibreOffice Basic and even got as far as designing a dialog and access to the API.

Aaaarg handling JSON and XML in LibreOffice Basic is .......trouble! Ok I then started over with Python. Perfect because I can handle JSON and XML quite easy.


The project has been described before and its on the list of potential GSOC project on the wiki.
Nice. And there is even a prototype from an earlier GSOC project there ;-) 


I made a few mock ups (Gimp) showing my idea about using the task panel.

I talked to one of my colleagues about it (I don't know about C++ at all). He grapped the idea just a few days ago and we will continue to work on it together. The idea is to look at both the Inkscape implementation and the GSOC project and create a prototype.

Dear students: I don't like taking the bread out of your mouth bu my colleage is a newbee in LibreOffice context and I am taking the liberty to look at this as "easy hack" for my friend.

Please tell me what you say about the rough drafts here. Is this something that will be of value to you?

13 December 2012

MSIEXEC parameters

Some time ago I wrote a few articles about administrative installation of LibreOffice on Windows. I have had quite a lot of feedback. Later there has come a wiki page on The Document Foundation wiki: Its called Deployment and Migration.

Nice but its still rather cumbersome to actually create a parameter string that works.

I have created a MSIEXEC parameter generator in a very simple spreadsheet. You can fill in the questionnaire and with a single click you get the complete string of parameters. There is not much error handling and evaluation so you can actually generate strings that doesn't work when you try to run it. But that might come later if any interest?

You can find the template with the macro on the extension website: http://templates.libreoffice.org/template-center/libreoffice-msi-generator . The template is waiting for approval currently, but I expect it to be approved shortly. Until the template gets approved you can get it from Dropbox here: http://dl.dropbox.com/u/9348527/LibreOffice_MSI.ots.

09 April 2012

The task panel in LibreOffice

LibreOffice has a very little known feature called the task pane. You might already be familiar with the navigator and the Styles and formatting dialogues. These dialogues are dockable whitch means that you can glue the dialogues to the border of the LibreOffice window.

It is however possible to create your own dockable dialogues. The dialogue becomes dockable through the so called task panel.

The task panel is only visible when you actively choose to show it and besides that you can only show it if it has content. In the view menu you might find the menu item “Task panel”. But as mentioned its only present in the menu if the task panel has an active content. When its visible it can be docked to one of the sides of the window or it can be floating. You can move it around and put it where you find it best for you.

In my case I have transformed an existing extension – the “Lorem Ipsum Generator” to show up in the task panel. As the task panel has a very little prominent occurrence in LibreOffice I decided to keep the Lorem Ipsum icon in the tool bar but now it only toggles the task panel on and off.

The result is that the tool becomes available at all times. Not open and close the dialogue any more. Just put the cursor wherever you want some dummy text and click the button in the task panel.

Usability

In the discussion about usability and “the new GUI” I think this could be the beginning. Of course the whole concept must have an overhaul as there are still some problems. First of all I don't think it's possible to use a localizable dialogue in the task panel. Therefore I had to keep the dialoque in English only but I hope that this will be only for a short time until I find out how to localize it. Another problem is that its not a trivial task to transform a dialogue into a a task panel item. I don't even think its possible to do with basic alone. i think it should be possible to generate an extension with dockable dialogues as its possible to generate extensions with the extension packager.

Anyway. I believe that the task panel could easily become a very important step into a new GUI. Not alone but followed by other efforts. Also we need to discuss if some of the existing built in dialogues in LibreOffice could easily be transformed into dockable tools. One thing I personally would like to see is the word count dialogue made dockable. Since 3.5 this dialogue has been modal witch means that it can be open while you type. It would be an obvious decision to put that dialogue in the dock.

What do you think? Would it be a good idea to continue to work on the task panel idea?

If you want to try my extension you can find it here: http://dl.dropbox.com/u/9348527/LoremIpsum.oxt but please have in mind that its not yet completely finished.

18 November 2011

Now you can buy LibreOffice merchandise

You can buy several merchandise products from the LibreOffice shop at libreoffice.spreadshirt.dk.


17404580-24219071

17 November 2011

Silent installation - following up

In my earlier post about administrative installation of LibreOffice i described how its possible to use the program ORCA to manipulate the msi-file by creating a new mst-file.

Unfortunately this subject is not very well documented from the developers. if you are a developer and find that I am giving wrong or inaccurate information then please notify me ASAP.

Lately I have investigated some more details and possibilities in the installation process.

I have found that its possible to pass all the parameters directly to the installation without using a mst-file. The mst is like bundling the parameters in a container and in some situations this can be convenient e.g., if you need to distribute or publish a specific installation.

Overall I have found two interesting features. Basically I looked into the msi-file using ORCA and I found that the tables Feature and Properties include the most interesting parameters. All these can be manipulated as parameters at installation time.

Feature
The installed features are core components and it pretty much corresponds with the the page in the dialog that is only available if you select Custom installation from the gui.



If you want to manipulate the installed components with parameters you must first either identify every single component you want to install or better: install everything with the parameter ADDLOCAL=ALL and then define everything you don't want. This is done with the REMOVE parameter. Be aware that evetything you want to remove must be specified in one string with comma as separator and no space. E.g.,

REMOVE=gm_o_Testtool,gm_o_Xsltfiltersamples,gm_o_jf_Palm,gm_o_jf_Pocketpc

Predefined extensions can be removed like this:

REMOVE=gm_o_Extensions_PRESENTER_SCREEN,gm_o_Extensions_REPORTDESIGN

You can also remove dictionaries. Dictionaries are also installed as predefined extensions but in the installer process these are categorized as Dictionaries, so you need to add an extra part to the REMOVE like this:

REMOVE=gm_Dictionaries,gm_r_Extension_Dictionary_Af,gm_r_Extension_Dictionary_Pt

Please note the first value: gm_Dictionaries

Property
Another very important thing you can do during installation is setting some properties. The list is not complete, but only some examples:

  • ALLUSERS (default=1) - performs a per-user installation or per-machine installation depending on the access privileges of the user
  • CREATEDESKTOPLINK (default=1) - Create desktop shortcut icon
  • INSTALLLOCATION - specify installation directory
  • ISCHECKFORPRODUCTUPDATES (default=1) - Check for updates – I think this property is deprecated.
  • REGISTER_ALL_MSO_TYPES (default=0) - Use LibreOffice as the default application for Microsoft Office file formats
  • REGISTER_NO_MSO_TYPES (default=0) – Dont use LibreOffice as default application for any Microsoft Office file formats
  • REGISTER_DOC (default=0) - Use LibreOffice as the default application for Microsoft Word file format .doc (You can use similar for .xls, .ppt etc.)
  • IS1033 (default=1) – Unfortunately all languages are installed as default so you must specify each language that you DONT want to install. In the following example only Danish will be installed:
IS1033=0 IS1078=0 IS1025=0 IS1101=0 IS1610=0 IS1059=0 IS1026=0 IS2117=0 IS2121=0 IS1150=0 IS1603=0 IS5146=0 IS1027=0 IS32771=0 IS1029=0 IS1106=0 IS1030=1 IS1031=0 IS1604=0 IS2129=0 IS1032=0 IS2057=0 IS7177=0 IS1553=0 IS1034=0 IS1061=0 IS1069=0 IS1065=0 IS1035=0 IS1036=0 IS2108=0 IS1084=0 IS1110=0 IS1095=0 IS1037=0 IS1081=0 IS1050=0 IS1038=0 IS1057=0 IS1039=0 IS1040=0 IS1041=0 IS1079=0 IS1087=0 IS1107=0 IS1099=0 IS1042=0 IS1111=0 IS1120=0 IS1574=0 IS1108=0 IS1063=0 IS1062=0 IS1605=0 IS1071=0 IS1100=0 IS1104=0 IS1112=0 IS1102=0 IS1109=0 IS1044=0 IS1121=0 IS1043=0 IS2068=0 IS1580=0 IS1132=0 IS1154=0 IS2162=0 IS1096=0 IS1094=0 IS1045=0 IS2070=0 IS1046=0 IS1048=0 IS1049=0 IS1569=0 IS1103=0 IS1606=0 IS1113=0 IS2074=0 IS2133=0 IS1051=0 IS1060=0 IS1052=0 IS3098=0 IS1579=0 IS1072=0 IS1053=0 IS1089=0 IS1097=0 IS1098=0 IS1064=0 IS1054=0 IS1074=0 IS1055=0 IS1073=0 IS2200=0 IS1058=0 IS1091=0 IS1075=0 IS1066=0 IS1076=0 IS2052=0 IS1028=0 IS1077=0

I found a list of numeric language codes here: http://www.science.co.il/language/locale-codes.asp

This is an example of an installation with Danish language and only danish spellchecker (I don't remove gm_r_Extension_Dictionary_Da) with a few more details:

msiexec /qn /i libreoffice34.msi /L* ../Log/logfile1.txt TRANSFORMS=trans_da.mst SELECT_WORD=1 SELECT_EXCEL=1 SELECT_POWERPOINT=1 CREATEDESKTOPLINK=0 IS1033=0 IS1078=0 IS1025=0 IS1101=0 IS1610=0 IS1059=0 IS1026=0 IS2117=0 IS2121=0 IS1150=0 IS1603=0 IS5146=0 IS1027=0 IS32771=0 IS1029=0 IS1106=0 IS1030=1 IS1031=0 IS1604=0 IS2129=0 IS1032=0 IS2057=0 IS7177=0 IS1553=0 IS1034=0 IS1061=0 IS1069=0 IS1065=0 IS1035=0 IS1036=0 IS2108=0 IS1084=0 IS1110=0 IS1095=0 IS1037=0 IS1081=0 IS1050=0 IS1038=0 IS1057=0 IS1039=0 IS1040=0 IS1041=0 IS1079=0 IS1087=0 IS1107=0 IS1099=0 IS1042=0 IS1111=0 IS1120=0 IS1574=0 IS1108=0 IS1063=0 IS1062=0 IS1605=0 IS1071=0 IS1100=0 IS1104=0 IS1112=0 IS1102=0 IS1109=0 IS1044=0 IS1121=0 IS1043=0 IS2068=0 IS1580=0 IS1132=0 IS1154=0 IS2162=0 IS1096=0 IS1094=0 IS1045=0 IS2070=0 IS1046=0 IS1048=0 IS1049=0 IS1569=0 IS1103=0 IS1606=0 IS1113=0 IS2074=0 IS2133=0 IS1051=0 IS1060=0 IS1052=0 IS3098=0 IS1579=0 IS1072=0 IS1053=0 IS1089=0 IS1097=0 IS1098=0 IS1064=0 IS1054=0 IS1074=0 IS1055=0 IS1073=0 IS2200=0 IS1058=0 IS1091=0 IS1075=0 IS1066=0 IS1076=0 IS2052=0 IS1028=0 IS1077=0 REGISTER_DOC=1 ADDLOCAL=ALL REMOVE=gm_o_Testtool,gm_o_Xsltfiltersamples,gm_o_jf_Palm,gm_o_jf_Pocketpc,gm_o_Quickstart,gm_o_Extensions_PRESENTER_SCREEN,gm_o_Extensions_REPORTDESIGN,gm_o_Extensions_MEDIAWIKI,gm_o_Extensions_MINIMIZER,gm_Dictionaries,gm_r_Extension_Dictionary_Af,gm_r_Extension_Dictionary_Pt,gm_r_Extension_Dictionary_Ca,gm_r_Extension_Dictionary_Hr,gm_r_Extension_Dictionary_Cs,gm_r_Extension_Dictionary_Nl,gm_r_Extension_Dictionary_Et,gm_r_Extension_Dictionary_Fr,gm_r_Extension_Dictionary_De_AT,gm_r_Extension_Dictionary_De_DE,gm_r_Extension_Dictionary_De_CH,gm_r_Extension_Dictionary_He,gm_r_Extension_Dictionary_Hu,gm_r_Extension_Dictionary_It,gm_r_Extension_Dictionary_Ku_Tr,gm_r_Extension_Dictionary_Lt,gm_r_Extension_Dictionary_Ne,gm_r_Extension_Dictionary_No,gm_r_Extension_Dictionary_Oc,gm_r_Extension_Dictionary_Pl,gm_r_Extension_Dictionary_Ro,gm_r_Extension_Dictionary_Ru,gm_r_Extension_Dictionary_Sr,gm_r_Extension_Dictionary_Sk,gm_r_Extension_Dictionary_Sl,gm_r_Extension_Dictionary_Es,gm_r_Extension_Dictionary_Sv,gm_r_Extension_Dictionary_Th,gm_r_Extension_Dictionary_Uk,gm_r_Extension_Dictionary_Vi,gm_r_Extension_Dictionary_Zu


If you take a look in the log file you can see some details about how the installation process was. You can also see most of the properties that you can set in the installation.

Thanks to my colleague and good friend Beemen Beshara for valuable input.