CMIS support in LibreOffice Experimental Features

cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS support in LibreOffice Experimental Features

wabson
Active Member II
0 21 34.3K
Since I upgraded the LibreOffice installation on my Macbook to version 3.6, I've been playing around with the CMIS integration built into this version. This is currently an experimental LibreOffice feature, which means you should not use this against a production server.



The integration allows LibreOffice to connect to a remote Alfresco server in order to open and save documents. This is a feature Microsoft Office has had for a long time, although limited to SharePoint-compatible servers (including Alfresco, via our SharePoint protocol support!). Now you can do the same thing with LibreOffice, via the magic of CMIS.



The first thing to do is to enable LibreOffice's experimental features within the Preferences dialogue.







After you've confirmed that change, you can open a file stored in Alfresco using the standard Open menu. When the file browser loads, you should notice a small button next to the location drop-down menu labelled with an ellipsis (...).







Clicking that button allows you to add a server. LibreOffice supports a range of server types, including the CMIS AtomPub service provided by Alfresco.



First you must enter a name for the server - I entered 'Alfresco' - and select the server type. If you do not see CMIS (Atom Binding) in the list then check to ensure that you have LibreOffice 3.6+ and that you have enabled Experimental Features.







The binding URL for Alfresco 4.2 will be something like http://localhost:8080/alfresco/cmisatom if you are running a local instance. I found that if I used the legacy CMIS URL below /alfresco/service (or the short form /alfresco/s) then document saves did not work, but the newer URL worked great.



Next is the slightly tricky part, entering the CMIS repository ID. Your Alfresco instance will only expose one repository, but other CMIS providers provide others, and so you need to enter this.



Hitting the repository binding URL directly will give you the ID, but unfortunately the non-standard document MIME type returned means it does not open directly in a web browser. You could save the response to disk and then use a text editor to view its contents, but I found it easier to use curl at the command line, together with less.

curl -u admin:admin http://localhost:8080/alfresco/cmisatom | less


In the response, do a search for the string repositoryId and within that element you should see a GUID value which you can copy and paste into the dialogue in LibreOffice.



The last item you need to enter is the username that will be used to access Alfresco (you will enter the password later).







You should now have the full set of information needed to add the server. Click OK, and it should be added to the side panel on the left of the Open dialogue.



You can navigate through the folders below the repository's Company Home space, and open any compatible document. I used the Word documents located under Sites > swsdp > documentLibrary > Meeting Notes, which opened perfectly.







You can make any modifications, hit Save and the content will be automatically saved back into Alfresco.







I also tried creating a new document from the New menu, and was able to save the document back to a folder Alfresco via the Save As dialogue. I found I needed to set the correct MIME type for new documents back in Alfresco Share to get previews to work, but this could easily be done using a rule.



All in all not bad for an experimental feature, and it will be interesting to see if this makes it into LibreOffice 3.7 for real.
21 Comments