Submitted By:            Igor Živković <contact@igor-zivkovic.from.hr>
Date:                    2013-10-16
Initial Package Version: 4.1.2.3
Upstream Status:         Unknown
Origin:                  http://anzwix.com/a/LibreOffice/SwitchedToUseLibcmisFuture040Code
Description:             Fixes building with system-installed LibCMIS version >= 0.4

diff -Naur libreoffice-4.1.2.3.orig/configure.ac libreoffice-4.1.2.3/configure.ac
--- libreoffice-4.1.2.3.orig/configure.ac	2013-09-29 01:20:00.000000000 +0200
+++ libreoffice-4.1.2.3/configure.ac	2013-10-16 17:41:33.781679374 +0200
@@ -7217,7 +7217,7 @@
 dnl ===================================================================
 dnl Check for system libcmis
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libcmis],[CMIS],[libcmis-0.3 >= 0.3.1])
+libo_CHECK_SYSTEM_MODULE([libcmis],[CMIS],[libcmis-0.4 >= 0.4.0])
 
 dnl ===================================================================
 dnl Check for system libwpd
diff -Naur libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/auth_provider.hxx libreoffice-4.1.2.3/ucb/source/ucp/cmis/auth_provider.hxx
--- libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/auth_provider.hxx	2013-09-29 01:20:00.000000000 +0200
+++ libreoffice-4.1.2.3/ucb/source/ucp/cmis/auth_provider.hxx	2013-10-16 17:41:33.782679374 +0200
@@ -9,7 +9,7 @@
 #ifndef AUTH_PROVIDER_HXX
 #define AUTH_PROVIDER_HXX
 
-#include <libcmis/session.hxx>
+#include <libcmis/libcmis.hxx>
 
 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
 
diff -Naur libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/cmis_content.cxx libreoffice-4.1.2.3/ucb/source/ucp/cmis/cmis_content.cxx
--- libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/cmis_content.cxx	2013-09-29 01:20:00.000000000 +0200
+++ libreoffice-4.1.2.3/ucb/source/ucp/cmis/cmis_content.cxx	2013-10-16 17:41:33.782679374 +0200
@@ -32,8 +32,6 @@
 #include <com/sun/star/ucb/XCommandInfo.hpp>
 #include <com/sun/star/ucb/XDynamicResultSet.hpp>
 
-#include <libcmis/document.hxx>
-
 #include <comphelper/processfactory.hxx>
 #include <ucbhelper/cancelcommandexecution.hxx>
 #include <ucbhelper/content.hxx>
diff -Naur libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/cmis_content.hxx libreoffice-4.1.2.3/ucb/source/ucp/cmis/cmis_content.hxx
--- libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/cmis_content.hxx	2013-09-29 01:20:00.000000000 +0200
+++ libreoffice-4.1.2.3/ucb/source/ucp/cmis/cmis_content.hxx	2013-10-16 17:41:33.782679374 +0200
@@ -21,7 +21,7 @@
 #include <com/sun/star/ucb/TransferInfo.hpp>
 #include <com/sun/star/ucb/XContentCreator.hpp>
 #include <ucbhelper/contenthelper.hxx>
-#include <libcmis/session-factory.hxx>
+#include <libcmis/libcmis.hxx>
 
 #include <list>
 
diff -Naur libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/cmis_provider.hxx libreoffice-4.1.2.3/ucb/source/ucp/cmis/cmis_provider.hxx
--- libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/cmis_provider.hxx	2013-09-29 01:20:00.000000000 +0200
+++ libreoffice-4.1.2.3/ucb/source/ucp/cmis/cmis_provider.hxx	2013-10-16 17:41:33.782679374 +0200
@@ -12,7 +12,7 @@
 
 #include <com/sun/star/beans/Property.hpp>
 #include <ucbhelper/providerhelper.hxx>
-#include <libcmis/session.hxx>
+#include <libcmis/libcmis.hxx>
 
 namespace cmis
 {
diff -Naur libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/cmis_repo_content.cxx libreoffice-4.1.2.3/ucb/source/ucp/cmis/cmis_repo_content.cxx
--- libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/cmis_repo_content.cxx	2013-09-29 01:20:00.000000000 +0200
+++ libreoffice-4.1.2.3/ucb/source/ucp/cmis/cmis_repo_content.cxx	2013-10-16 17:41:33.782679374 +0200
@@ -40,7 +40,7 @@
 {
     RepoContent::RepoContent( const uno::Reference< uno::XComponentContext >& rxContext,
         ContentProvider *pProvider, const uno::Reference< ucb::XContentIdentifier >& Identifier,
-        list< libcmis::RepositoryPtr > aRepos )
+        vector< libcmis::RepositoryPtr > aRepos )
             throw ( ucb::ContentCreationException )
         : ContentImplHelper( rxContext, pProvider, Identifier ),
         m_pProvider( pProvider ),
@@ -169,7 +169,7 @@
 
         if ( !m_sRepositoryId.isEmpty() )
         {
-            for ( list< libcmis::RepositoryPtr >::iterator it = m_aRepositories.begin( );
+            for ( vector< libcmis::RepositoryPtr >::iterator it = m_aRepositories.begin( );
                     it != m_aRepositories.end( ) && NULL == repo.get( ); ++it )
             {
                 if ( STD_TO_OUSTR( ( *it )->getId( ) ) == m_sRepositoryId )
@@ -349,7 +349,7 @@
 
         if ( m_sRepositoryId.isEmpty( ) )
         {
-            for ( list< libcmis::RepositoryPtr >::iterator it = m_aRepositories.begin( );
+            for ( vector< libcmis::RepositoryPtr >::iterator it = m_aRepositories.begin( );
                     it != m_aRepositories.end(); ++it )
             {
                 URL aUrl( m_aURL );
diff -Naur libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/cmis_repo_content.hxx libreoffice-4.1.2.3/ucb/source/ucp/cmis/cmis_repo_content.hxx
--- libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/cmis_repo_content.hxx	2013-09-29 01:20:00.000000000 +0200
+++ libreoffice-4.1.2.3/ucb/source/ucp/cmis/cmis_repo_content.hxx	2013-10-16 17:41:33.783679375 +0200
@@ -20,8 +20,9 @@
 #include <com/sun/star/ucb/TransferInfo.hpp>
 #include <com/sun/star/ucb/XContentCreator.hpp>
 #include <ucbhelper/contenthelper.hxx>
-#include <libcmis/repository.hxx>
+#include <libcmis/libcmis.hxx>
 
+#include <vector>
 #include <list>
 
 namespace com { namespace sun { namespace star {
@@ -52,7 +53,7 @@
     URL                    m_aURL;
     OUString          m_sRepositoryId;
 
-    std::list< libcmis::RepositoryPtr > m_aRepositories;
+    std::vector< libcmis::RepositoryPtr > m_aRepositories;
 
 private:
 
@@ -76,7 +77,7 @@
     RepoContent( const com::sun::star::uno::Reference<
         com::sun::star::uno::XComponentContext >& rxContext, ContentProvider *pProvider,
         const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& Identifier,
-        std::list< libcmis::RepositoryPtr > aRepos = std::list< libcmis::RepositoryPtr > ( ) )
+        std::vector< libcmis::RepositoryPtr > aRepos = std::vector< libcmis::RepositoryPtr > ( ) )
             throw ( com::sun::star::ucb::ContentCreationException );
 
     virtual ~RepoContent();
diff -Naur libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/cmis_url.cxx libreoffice-4.1.2.3/ucb/source/ucp/cmis/cmis_url.cxx
--- libreoffice-4.1.2.3.orig/ucb/source/ucp/cmis/cmis_url.cxx	2013-09-29 01:20:00.000000000 +0200
+++ libreoffice-4.1.2.3/ucb/source/ucp/cmis/cmis_url.cxx	2013-10-16 17:41:33.783679375 +0200
@@ -7,7 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include <libcmis/session-factory.hxx>
+#include <libcmis/libcmis.hxx>
 
 #include <rtl/uri.hxx>
 
