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
blog_commenter
Active Member
Not for windows? Smiley Sad
wabson
Active Member II
The screenshots are obviously not Windows-based, but I don't see why the Windows builds of LibreOffice would lack this feature. Did you turn on the experimental features?
blog_commenter
Active Member
Yes.
blog_commenter
Active Member
At least they are going into the right direction. Hopefully someone who stumbles into this post will heed into their call for help:

http://wiki.alfresco.com/wiki/Help_Wanted#LibreOffice_Alfresco_Implementation
blog_commenter
Active Member
I must also tick the 'Use LibreOffice' dialogues to make it work. Smiley Happy
blog_commenter
Active Member
Works great in Ubuntu 12.10 / LibreOffice 3.6 client and Alfresco Community 4,2.
blog_commenter
Active Member
I, i try this feature on Alfresco 4.2.D and LibreOffice 4.0.0.3.

CMIS works!

One question, when i save new document how i assign a content model to the new document upload?
wabson
Active Member II
Good question, and I'm afraid not one I know the answer to. It would be worth asking this on the LibreOffice mailing lists. Do update this post if you get any additional info.
blog_commenter
Active Member
blog_commenter
Active Member
May I ask which URL to use with Alfresco in the cloud? localhost will obviously not work. There's no documentation available sadly.
wabson
Active Member II
Unfortunately I doubt that it will work with the cloud service, since it uses OAuth to authorize users. The CMIS client used in LibreOffice takes a username and password and performs Basic auth, and cannot negotiate access via OAuth.
blog_commenter
Active Member
Oh well. No problem. I was just wondering. Thanks, Will.
blog_commenter
Active Member
I test cmis support with LibreOffice 4 and Alfresco 4.0.d. It work fine. But if I use https instead of http, then the connection doesn't work. LibreOffice can not load the list of repositories. Exists a limitation on the CMIS in LibreOffcie about the protocol?
wabson
Active Member II
I found I could not load the list of repositories if I used the default SOAP-based server URL that is suggested by the Add Server dialog. However if I use the AtomPub URL https://server/alfresco/cmisatom as my earlier post suggested then the list loads perfectly well for me.
blog_commenter
Active Member
Wow thank for this great tutorial! Works just fine here.



I noticed that to see the ellipsis, you might need to use the LibreOffice open/save dialog box and not the KDE/Gnome supplied ones. Tools > Options > General -- check Use LibreOffice Dialogs.
wabson
Active Member II
Good point for those users using the Linux version, as I do myself on my home machine.
blog_commenter
Active Member
Hi,



I have a problem when using LibreOffice to access Alfresco 4 through CMIS. I'm only able to list repositories when I log in as admin, and if try with regular users it just crashes.



Did anyone encountered similar problem?



Thanks,

Nikola
blog_commenter
Active Member
In the same dialog, it is also important to check the option 'Use LibreOffice dialogs'.

It is disabled by default, at least on Ubuntu 2012.04.

Keep up the great work!

Nicolas Raoul
blog_commenter
Active Member
[…] Yes, but does it work to open the document from libreoffice not using this plugin as described here (although the process differs in the current libreoffice version, its almost the same):https://www.alfresco.com/blogs/wabson/2012/11/01/cmis-support-in-libreoffice-experimental-features/ […]
blog_commenter
Active Member
[…] dialog. Also, the dialog is different in LibreOffice 4 than in LibreOffice 3.6. Take a look at this blog post, but after several unsuccessful tries I decided to do it with LO4 because that was what I […]
federicovallejo
Member II

any new information if this works with LibreOffice 501?

I cant get the information - User and the Extras from the CMIS i n the Document.