Integrating LibreOffice with SharePoint – part 2

In my previous post, I discuss LibreOffice‘s CMIS integration with SharePoint. This post, as promised, is dedicated to WebDAV method of accessing SharePoint servers from LibreOffice.

Basic WebDAV support is already present in LibreOffice, which inherits it from You may put SharePoint URL into OS’s File Open dialog, and browse and open documents as if they were on local file system. But to claim SharePoint WebDAV support, LibreOffice should provide ease of use no less than its competitors.

Existing users of MS Office are used to access the documents on SharePoint server using web browser integration. This allows to navigate to a document and open it in associated office program simply clicking on its link on web page, or using the page’s options to check-out document, open it for reading, etc. A document that is open this way isn’t downloaded by browser to be opened by application locally, but is open by office application via WebDAV, thus presenting easy way to work with document, including saving your work to proper place automatically. This integration is now available for all modern browsers (the level of feature support vary, though).


There are two mechanisms used to enable such integration. The first (and older) one is using ActiveX control/browser plugin. This method works for IE (classic mode) using OpenDocuments ActiveX control (and also used to work for Firefox and Chrome using NPAPI plugin, but since NPAPI was deprecated, it doesn’t work there anymore). In essence, a JavaScript click handler on the page instantiates the control, and then uses its methods to open the document with corresponding application in required mode. With all implied security considerations.

The second (newer) method is using custom URI schemes. This requires that corresponding URI handler be registered in OS/browser, and the handler application be able to recognize these URIs and extract actual WebDAV URIs required to access the document on server from them.

Both methods were lately addressed in LibreOffice development by Collabora Productivity. To implement first method, a custom ActiveX control was coded, and is now awaiting review on gerrit.

To utilize SharePoint custom URIs, LibreOffice was taught to recognize MS Office’s existing custom URIs. This is required to allow using LibreOffice to open MS Office’s documents from SharePoint on those computers that don’t have MS Office installed. But that’s not enough; we should be able to treat ODF independently, e.g. to allow for configurations where both LibreOffice and MS Office co-exist on a workstation, and must handle their respective native formats. To achieve that, we introduced our own custom URI scheme, vnd.libreoffice.command. Now LibreOffice can accept any of these URIs, and successfully open the document in proper mode.

But for LibreOffice to open them, these URIs must be passed to it from the SharePoint web page. We added registration of our own custom URI handler into installer for Windows OS, and also we now register LibreOffice as MS Office URIs handler if user chooses to register MS formats to open with LibreOffice.

If you choose to use the second (custom URI) integration method, and you don’t need MS Office as handler for DOCXs, PPTXs etc., then you don’t need to configure your SharePoint server for that to work. All that you need is to install recent enough LibreOffice (v.5.3+), and configure it at installation time to open MS Office files.

But if you choose either first method (ActiveX), or second method with coexisting LibreOffice/MS Office workstations, then you will need to configure SharePoint server for that. In both cases, you will need to edit DOCICON.xml file, that  may be found in server’s %ProgramFiles%\Common Files\Microsoft Shared\Web Server Extensions\XX\TEMPLATE\XML. This is an XML file, and we should edit sub-elements of ByExtension element. Such sub-element has the following syntax:

<Mapping Key="odt" Value="icodt.png" EditText="LibreOffice" OpenControl="LOSPSupport.OpenDocuments" OpenApp="vnd.libreoffice.command"/>
  • Key = file extension
  • Value = icon file
  • EditText = Text on “Edit with application” UI button – required for edit option. Optional.
  • OpenControl = ActiveX OpenDocuments control name (currently IE 32-bit only). Optional.
  • OpenApp = custom URI scheme to handle this. Independent from and appears to have priority over OpenControl. Available in 2013 SP1. Optional.

You should use either OpenControl or OpenApp, depending on which integration method you have chosen. Do it for those extensions that you want to be handled by LibreOffice. Of course, you should backup the file prior to modifying it.

After you have made all necessary modifications, to activate the settings, you need to restart IIS. To do that, you may execute command iisreset from the server’s administrator command line.

That’s it, if you did everything right, LibreOffice should now seamlessly integrate with SharePoint website, and be automatically launched when you choose to open files from there, without downloading the file to local machine first.

This is the second of two posts that discuss the current state of SharePoint integration support in LibreOffice. Thank you for reading, and enjoy the best free office suite ever!

Integrating LibreOffice with SharePoint – part 1

LibreOffice is a productivity suite that is suited well for using in corporate environments with centralized document repositories, such as SharePoint. Of course, to use it there, program should offer required functionality in convenient fashion. So what is the current state of LibreOffice’s support for integration with SharePoint?

LibreOffice has two ways to communicate with SharePoint servers:

Lately, Collabora Productivity has made a number of improvements made to LibreOffice, and fixes for some existing problems, that made configuration and usage of both types of SharePoint integration more robust and easy.

In this and the next post, I am discussing current status of support and the methods to setup (and limited usage examples) for both ways. This post is dedicated to CMIS, and the next one will be devoted to WebDAV.

CMIS integration

To use CMIS integration with SharePoint, you need to configure your SharePoint Server to offer the CMIS service, and add new CMIS service to LibreOffice.

Configuring SharePoint Server for CMIS

The following configuration steps are shown on a SharePoint Server 2013 instance taken as example.

First, basic authentication should be enabled in SharePoint Central Administration.

Go to Security, choose Specify authentication providers in General Security group:


Choose required Web Application and click Zone that you want to configure, and enable Basic authentication:


Of course, HTTPS should be enabled for proper security.

Second, configure your site settings.

Login to your site, go to Settings → Site settings and choose Manage site features in Site Actions group:


There you need to activate Content Management Interoperability Services (CMIS) Producer:


That’s it. Now it’s time to setup LibreOffice to access SharePoint via CMIS.

Configuring LibreOffice for SharePoint CMIS access

You will use LibreOffice’s Remote Files feature, that is accessible from Start Center, as well as from main menu:


Click Add service and choose SharePoint 2013 as Type, replace with the address of your SharePoint site, supply SharePoint username and password, then click Refresh button to the right of Repository chooser, after which LibreOffice will connect SharePoint Server and populate the chooser with existing repositories:


To make it easier to use the connection, you may put the directory you want to start from into the Root field, e.g. “/Shared Documents”. This will not prevent you to use other directories later.

Now click OK and you will be prompted for password again. The username and password you entered at the previous step were used to get repositories list, so provide your credentials again. If you choose to save password at this stage, in case you didn’t yet saved passwords for web connections previously, LibreOffice will ask you to set Master Password that is used once per LibreOffice session:


Entering this password first time you access any web connection with stored password, you will not be asked anymore for passwords until program closes. This password is separate from the site’s password, and should differ from it.

Now you are able to navigate your SharePoint server documents, rename or delete them, open, edit and save back (or create new) each time you use the Remote Files feature or accessing last used files from the server. Here is how the Remote Files dialog looks like for a configured connection:


LibreOffice will show you a warning if you have not checked out the document yet, and allows you to do that immediately:


The Check-Out, Cancel Check-Out and Check-In functionality is also accessible from LibreOffice’s File menu. Checking in will bring the following window, where you may fill the required information for new version of the file:


To see the file’s CMIS properties, you may use Properties window, also accessible from File menu. It has CMIS Properties tab, that allows to see and change those properties.

That’s all I wanted to tell about LibreOffice integration with SharePoint using CMIS. The next post will cover WebDAW method to do (almost) the same.