Lodahl's blog

12 September 2014

Apache Open Office and LibreOffice should join forces

This proposal has been said many times over the last couple of years and lately repeated by Daniel Brunner, head of the IT department of Switzerland's Federal Supreme Court.https://joinup.ec.europa.eu/community/osor/news/open-and-libre-office-projects-should-reunite.

And from the first point of view I can only agree. There is no reason what so ever that the two open source projects shouldn't. But it hasn’t happened yet and there are reasons. Its not a simple thing to do.

Before I continue I would like to emphasize that I'm part of the game and therefore you should consider this as one of many voices in the choir and not some kind of "I know the truth" statement. I'm member of The Document Foundation and not a neutral opinion. I would also emphasize that I'm speaking on behalf of my self and not as member of any organization. 

First lets take a tour down Memory Lane. Kind'a old school but it can help understand the complexity.

Sun was purchased by Oracle Corporation in early 2010. OpenOffice.org community members were concerned at Oracle's behavior towards open source software, and the lack of activity on OpenOffice.org.

On 28 September 2010, The Document Foundation was announced as the host of LibreOffice, a new derivative of OpenOffice.org. The announcement was well accepted in the free software environment because The Document Foundation shares many values with free software. This includes strong copyleft licensing, and a meritocratic organization. At the same time TDF decided NOT to ask contributors to hand over any other rights to the foundation than licensing the code which was clearly a result of requirements from SUN Microsystems and Oracle in the OpenOffice.org-days. The foundation focuses furthermore very much on the diversity among members and contributes which has attracted hundreds of volunteer contributors.

Shortly after Oracle announced their continuous strong commitment to OpenOffice.org.

Oracle announced in April 2011 that it was ending its development of OpenOffice.org and in June 2011 it was announced that it would donate the OpenOffice.org code and trademark to the Apache Software Foundation. Open Office was then re-licensed with the Apache License which is not copyleft. The Apache License is considered permissive in that it does not require a derivative work of the software, or modifications to the original, to be distributed using the same license (unlike copyleft licenses).

The two license philosophies means that code can go from Apache Open Office to LibreOfffice but NOT the other way. This is not a decision made explicitly but its a consequence of the choice of licenses in the two projects.

Please take notice of the order in which these actions took place! When TDF was announced, nobody knew about Oracle donating anything to Apache. But when it happened, it was clear to both Oracle and Apache that TDF was strongly in favor of strong copyleft licenses.
The consequence of the choice of a permissive license was at the time clear to all: It can never happen that code goes from LibreOffice to Open Office but visa versa is possible at any time. The decision was in other words taken by Oracle and Apache NOT by TDF.

I agree that it would be great if the two projects would join. Combining the effort would naturally benefit the community, but the decision can only be taken by one of the parts. Members of the projects has been invited to join TDF at many occasions from the very beginning.

It takes two to tango and the one who can make the decision is Apache Open Office - who unfortunately refuses to dance. TDF can't make any decision except from stick to its original honorable principles about openness and diversity.

19 December 2013

I have been fooling around

I have been fooling around for a couple of days. 

Yes I admit it. From time to time I enjoy working with something totally different from what I do in my daily life and something that is absolutely irrational. This time I suddenly found my self playing around with ownCloud (https://www.owncloud.org ).

I found that I could launch a pre-configured cloud server on Amazon ( http://aws.amazon.com ) from Bitnami ( http://bitnami.com/stack/owncloud/cloud ).

It took me about half an hour to order and fire up the basic server and after another hour of configuration I had a safe and sound cloud server running. And it all comes in my native language (Danish) out of the box.

I wanted to install a few extra apps for different tasks e.g., a music player that for some reason isn't included in the standard edition of ownCloud 6. The only problem with that was that the music app depends on another apps 'App Framework'. Unfortunately that wasn't very clear in the instructions, and it took me a couple of hours to find the solution and implement it. I made another mistake by activating the app 'FluXX Compensator (Y)'. A friend of mine recommended it to me, but it seems to mess up ownCloud completely. It took me quite some time what caused the problem but when I found the cause it was pretty easy to disable it. I couldn't use the web interface (as it was messed up) but I could remove the app folder through SSH.

So now my family and I can store and share files in a relatively safe way. I know that Amazon might not be the safest place (in the Snowden years), but I somehow feel safer now where I son't have to use Dropbox or Google Drive. I don't like storing my private documents on a server that doesn't belong to me. 

Never mind.

I'n now using my ownCloud as family calendar completely sync'ed with my locally installed Thunderbird/Lightning. The only missing feature is the lack of inviting and accepting invitations directly in my mail and calendar program.
What I find extremely interesting is the way ownCloud can work with documents. First of all ownCloud supports WebDAV and I can open and save files directly from LibreOffice.

Open documents in LibreOffice

But more interesting is a new interesting feature in ownCloud 6: WebODF ( http://webodf.org/ )!

WebODF is a separate open source project that is a JavaScript implementation of the OpenDocument format. So far WebODF only implemented som very basic parts of text documents but its a nice first step. And a step in the right direction. I know that WebODF is working on a spreadsheet thing too and that's exiting.
Another extremely cool feature is that WebODF supports collaborative editing of rich-text documents. We are talking about two or more editors working on the same document at the same time.

Editing on line

WebODF is not a web version of LibreOffice but you can create and edit documents with basic formatting and styles. I even discovered that uploading a rather complicated ODT document from LibreOffice with a table of content and cross references works fine. Some visual features are visible in the browser version of the document, but even if not the unsupported features survives being edited with WebODF.


My conclusion is clearly 'enthusiasm'. I will certainly be using ownCloud as my private cloud server from now on and I can see some very cool ideas coming in the future. I'm exited about WebODF working with ODF documents using JavaScript and I can see many useful things to use it for. I can clearly see ownCloud useful for small business and e.g., schools and NGOs.

I give it a thumb up.

03 December 2013

LibreOffice now has a built in XML-parser

LibreOffice is using a XML based document format so of cause there is a built in XML parser. But until now it has been quite cumbersome to deal with XML in macros. You need to manually traverse through the entire XML structure like this example (thanks to Andrew Pitonyak):

Function CreateDocumentHandler()
oDocHandler = CreateUnoListener( "DocHandler_", "com.sun.star.xml.sax.XDocumentHandler" )
glLocatorSet = False
CreateDocumentHandler() = oDocHandler
End Function

' Methods of our document handler call these
' global functions.
' These methods look strangely similar to
' a SAX event handler. ;-)
' These global routines are called by the Sax parser
' as it reads in an XML document.
' These subroutines must be named with a prefix that is
' followed by the event name of the com.sun.star.xml.sax.XDocumentHandler interface.

Sub DocHandler_characters( cChars As String )

if xNode = "lipsum" then
cChars= Left(cChars,len(cChars)-1)
if len(cChars)>1 then
cChars= cChars+ Chr$(13)
WriteLoremipsum (cChars, oWrite)
Else oWrite=0
End Sub

Sub DocHandler_ignorableWhitespace( cWhitespace As String )
End Sub

Sub DocHandler_processingInstruction( cTarget As String, cData As String )
End Sub

Sub DocHandler_startDocument()
End Sub

Sub DocHandler_endDocument()
End Sub

Sub DocHandler_startElement( cName As String, oAttributes As com.sun.star.xml.sax.XAttributeList )
xNode = cName
End Sub

Sub DocHandler_endElement( cName As String )
End Sub

Sub DocHandler_setDocumentLocator( oLocator As com.sun.star.xml.sax.XLocator )
' Save the locator object in a global variable.
' The locator object has valuable methods that we can
' call to determine
goLocator = oLocator
glLocatorSet = True
End Sub

This example above is from the extension Lorem Ipsum generator that you can download from here: http://extensions.libreoffice.org/extension-center/magenta-lorem-ipsum-generator

But now its much easier as LibreOffice 4.2 comes with two new spreadsheet functions called WEBSERVICE and FILTERXML. In a macro it is possible to call and use such built in spreadsheet functions even when you are working with text documents.

The example below does pretty much the same as the one above

Sub Main
svc = createUnoService( "com.sun.star.sheet.FunctionAccess" ) 'Create a service to use Calc functions
XML_String = svc.callFunction("WEBSERVICE",array("http://www.lipsum.com/feed/xml?amount=2&what=paras&start=Yes"))
Lipsum = svc.callFunction("FILTERXML", array(XML_String, "/feed/lipsum" ))
Print Lipsum
End Sub

I'm really looking forward play around with these nifty little features in Calc.

08 August 2013

How to benefit

How to take advantage of crowd sourcing and contribute too:

I'm looking forward to my vacation starting two days from now. My wife and I are happy to see southern Spain.

We will rent a car in the airport and drive the approximately 100 km to the house in the small village called Gualchos.

As always when preparing a vacation where I need to find my way around by myself I start looking for maps. Years ago that was printed maps. Who remembers the good old fashioned maps from Michelin? Today that is digital maps on the internet. Like Google, Bing or OpenStreetMap.

About a month ago I started looking for maps and found that the area was pretty bad covered on both Google, Bing and OSM. Bad luck.

I then invested about two saturday afternoons mapping the village and the close surroundings from air photos. Most of the world is covered by images taken from airplanes.

You can see the result here: http://tools.geofabrik.de/mc/?lon=-3.3897&lat=36.74396&zoom=16&num=2&mt0=mapnik&mt1=google-map

Yesterday I downloaded the resulting data as a Garmin navigation file from http://garmin.openstreetmap.nl/ and installed it on my own Garmin device. It works like a charm.

So could I have done the same thing with Google Maps? Perhaps I could. But not for my Garmin device or any other device exept for devices that Google chooses to support. The reason for this is that Google owns and control the data behind their maps and they don't give me access to the core data. They only gives me access to the services that Google wants me to use. I'm not the customer so I'm part of the product.

From OpenStreetMap nobody owns or controls the data. The data belongs to you and me and we can do with them what we want. Without any restrictions exept for respecting the license.

When I get back from my vacation I will bring local knowledge and notes about further observations. I will also bring the trip log from my Garmin navigator. I will then update the map with corrections and additional information.

I hope other tourists or locals will take advantage of my improvements and I also hope that other tourists in Spain, Denmark and other places will do the same and add details to the map.

Note: When you map areas that you don't know your self you must be very carefull. Don't make up details and remember that its pretty difficukt to interpret air photos from a landscape that you don't know your self. So don't map anything that you are not 100% certain is what you think it is.

Happy mapping.

16 July 2013

LibreOffice is becoming the Swiss army knife in the office

What started as a simple text editor and later became am office suite is actually becoming a very comprehensive set of tools for the daily office work.

LibreOffice is most likely the only application that can open almost any office file format in the world. Legacy and modern - it doesn't matter LibreOffice can handle them. Even some legacy file formats from older versions of Microsoft Office that can't be recognized by supported versions of Microsoft Office can be opened and converted with LibreOffice. Its a well known fact that some corrupted files from legacy Microsoft Office versions can only be opened with LibreOffice. I'm just mentioning a few file formats here: Lotus Word Pro, MS Works, WordPerfect and Cores Draw. Also older versions of office files from outdated Mac computers like Microsoft Word for Mac, Write Now, MacWrite Pro and AppleWorks is now accessible.

Besides that LibreOffice is constantly improving the Microsoft OOXML Import and Export filters as well as for the Microsoft Office binary file formats and the RTF format.

With LibreOffice you can store PDF-files and even embed the original text document or spreadsheet within the PDF. This makes it possible to do later edits of the file directly by loading it into LibreOffice. But there is more that. With the drawing application you can open any PDF-file that is stored without encryption. You can even edit the content and you can merge and split the document as you like. Hereby LibreOffice can replace some of the separate tools that is often used to do these tasks.

With the spreadsheet application Calc you can import CSV files and even arbitrary XML files into a spreadsheet.

LibreOffice runs on almost any thinkable platform ans operating system and its free. Free as in free beer and as in free speech. you can download it from here: https://www.libreoffice.org/download/ .

What more do you want of interoperability?