[Libreoffice-commits] .: Branch 'libreoffice-3-6' - 6 commits - fpicker/source libcmis/libcmis-0.2.3-allowable-actions.patch libcmis/libcmis-0.2.3.patch libcmis/libcurl-version-fix.patch libcmis/makefile.mk ucb/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Wed Jul 4 02:58:27 PDT 2012


 fpicker/source/office/ServerDetailsControls.cxx |    2 
 libcmis/libcmis-0.2.3-allowable-actions.patch   |  284 ++++++++++++++++++++++++
 libcmis/libcmis-0.2.3.patch                     |   34 ++
 libcmis/libcurl-version-fix.patch               |   21 -
 libcmis/makefile.mk                             |    5 
 ucb/source/ucp/cmis/cmis_content.cxx            |   14 +
 ucb/source/ucp/cmis/cmis_content.hxx            |    1 
 ucb/source/ucp/cmis/cmis_datasupplier.cxx       |    8 
 ucb/source/ucp/cmis/cmis_url.cxx                |   25 +-
 ucb/source/ucp/cmis/cmis_url.hxx                |    2 
 10 files changed, 369 insertions(+), 27 deletions(-)

New commits:
commit b4dd054d6929dfdddd04ff274dcae2fc2e174c07
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Tue Jul 3 17:06:49 2012 +0200

    libcmis: added a patch to workaround an alfresco bug and avoid HTTP requests
    
    Change-Id: Ifbdaa6fce3812ff7d5c884527924b0b321133856

diff --git a/libcmis/libcmis-0.2.3-allowable-actions.patch b/libcmis/libcmis-0.2.3-allowable-actions.patch
new file mode 100644
index 0000000..8cd84ab
--- /dev/null
+++ b/libcmis/libcmis-0.2.3-allowable-actions.patch
@@ -0,0 +1,284 @@
+diff -ur libcmis-0.2.3/src/libcmis/allowable-actions.cxx misc/build/libcmis-0.2.3/src/libcmis/allowable-actions.cxx
+--- libcmis-0.2.3/src/libcmis/allowable-actions.cxx	2012-07-03 16:47:28.063183460 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/allowable-actions.cxx	2012-07-03 16:48:24.178187938 +0200
+@@ -28,14 +28,122 @@
+ 
+ #include "allowable-actions.hxx"
+ #include "object.hxx"
++#include "xml-utils.hxx"
+ 
+ using namespace std;
+ 
+ namespace libcmis
+ {
+-    AllowableActions::AllowableActions( ) :
++    ObjectAction::ObjectAction( xmlNodePtr node ) :
++        m_type( ObjectAction::DeleteObject ),
++        m_enabled( false ),
++        m_valid( false )
++    {
++        try
++        {
++            m_type = parseType( string( ( char* ) node->name ) );
++            m_valid = true;
++        }
++        catch ( const Exception& e )
++        {
++            m_valid = false;
++        }
++
++        // Invalid xsd:bool will be mean false... not sure what the spec says
++        try
++        {
++            xmlChar* content = xmlNodeGetContent( node );
++            m_enabled = parseBool( string( ( char* )content ) );
++            xmlFree( content );
++        }
++        catch ( const Exception& e )
++        {
++            m_enabled = false;
++        }
++    }
++
++    ObjectAction::Type ObjectAction::parseType( string type ) throw ( Exception )
++    {
++        Type value = DeleteObject;
++        if ( type == "canDeleteObject" )
++            value = DeleteObject;
++        else if ( type == "canUpdateProperties" )
++            value = UpdateProperties;
++        else if ( type == "canGetFolderTree" )
++            value = GetFolderTree;
++        else if ( type == "canGetProperties" )
++            value = GetProperties;
++        else if ( type == "canGetObjectRelationships" )
++            value = GetObjectRelationships;
++        else if ( type == "canGetObjectParents" )
++            value = GetObjectParents;
++        else if ( type == "canGetFolderParent" )
++            value = GetFolderParent;
++        else if ( type == "canGetDescendants" )
++            value = GetDescendants;
++        else if ( type == "canMoveObject" )
++            value = MoveObject;
++        else if ( type == "canDeleteContentStream" )
++            value = DeleteContentStream;
++        else if ( type == "canCheckOut" )
++            value = CheckOut;
++        else if ( type == "canCancelCheckOut" )
++            value = CancelCheckOut;
++        else if ( type == "canCheckIn" )
++            value = CheckIn;
++        else if ( type == "canSetContentStream" )
++            value = SetContentStream;
++        else if ( type == "canGetAllVersions" )
++            value = GetAllVersions;
++        else if ( type == "canAddObjectToFolder" )
++            value = AddObjectToFolder;
++        else if ( type == "canRemoveObjectFromFolder" )
++            value = RemoveObjectFromFolder;
++        else if ( type == "canGetContentStream" )
++            value = GetContentStream;
++        else if ( type == "canApplyPolicy" )
++            value = ApplyPolicy;
++        else if ( type == "canGetAppliedPolicies" )
++            value = GetAppliedPolicies;
++        else if ( type == "canRemovePolicy" )
++            value = RemovePolicy;
++        else if ( type == "canGetChildren" )
++            value = GetChildren;
++        else if ( type == "canCreateDocument" )
++            value = CreateDocument;
++        else if ( type == "canCreateFolder" )
++            value = CreateFolder;
++        else if ( type == "canCreateRelationship" )
++            value = CreateRelationship;
++        else if ( type == "canDeleteTree" )
++            value = DeleteTree;
++        else if ( type == "canGetRenditions" )
++            value = GetRenditions;
++        else if ( type == "canGetACL" )
++            value = GetACL;
++        else if ( type == "canApplyACL" )
++            value = ApplyACL;
++        else
++            throw Exception( "Invalid AllowableAction type: " + type );
++        
++        return value;
++    }
++
++    AllowableActions::AllowableActions( xmlNodePtr node ) :
+         m_states( )
+     {
++        for ( xmlNodePtr child = node->children; child; child = child->next )
++        {
++            // Check for non text children... "\n" is also a node ;)
++            if ( !xmlNodeIsText( child ) )
++            {
++                ObjectAction action( child );
++                if ( action.isValid( ) )
++                    m_states.insert( pair< libcmis::ObjectAction::Type, bool >(
++                                action.getType( ),
++                                action.isEnabled() ) );
++            }
++        }
+     }
+ 
+     AllowableActions::AllowableActions( const AllowableActions& copy ) :
+diff -ur libcmis-0.2.3/src/libcmis/allowable-actions.hxx misc/build/libcmis-0.2.3/src/libcmis/allowable-actions.hxx
+--- libcmis-0.2.3/src/libcmis/allowable-actions.hxx	2012-07-03 16:47:28.018183456 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/allowable-actions.hxx	2012-07-03 16:48:24.178187938 +0200
+@@ -29,6 +29,11 @@
+ #define _ALLOWABLE_ACTIONS_HXX_
+ 
+ #include <map>
++#include <string>
++
++#include <libxml/tree.h>
++
++#include "exception.hxx"
+ 
+ namespace libcmis
+ {
+@@ -37,8 +42,6 @@
+     class ObjectAction
+     {
+         public:
+-            virtual ~ObjectAction( ){ }
+-
+             enum Type
+             {
+                 DeleteObject,
+@@ -71,6 +74,25 @@
+                 GetACL,
+                 ApplyACL
+             };
++
++        private:
++            Type m_type;
++            bool m_enabled;
++            bool m_valid;
++
++        public:
++            ObjectAction( xmlNodePtr node );
++            virtual ~ObjectAction( ){ }
++
++            Type getType( ) { return m_type; }
++            bool isEnabled( ) { return m_enabled; }
++            bool isValid( ) { return m_valid; }
++
++            /** Parses the permission name into one of the enum values or throws
++                an exception for invalid input strings.
++              */
++            static Type parseType( std::string type ) throw ( Exception );
++
+     };
+ 
+     /** Class providing access to the allowed actions on an object.
+@@ -81,7 +103,7 @@
+             std::map< ObjectAction::Type, bool > m_states;
+ 
+         public:
+-            AllowableActions( );
++            AllowableActions( xmlNodePtr node );
+             AllowableActions( const AllowableActions& copy );
+             virtual ~AllowableActions( );
+ 
+Only in libcmis-0.2.3/src/libcmis: atom-allowable-actions.cxx
+Only in libcmis-0.2.3/src/libcmis: atom-allowable-actions.hxx
+diff -ur libcmis-0.2.3/src/libcmis/atom-document.hxx misc/build/libcmis-0.2.3/src/libcmis/atom-document.hxx
+--- libcmis-0.2.3/src/libcmis/atom-document.hxx	2012-07-03 16:47:28.094183463 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-document.hxx	2012-07-03 16:48:24.178187938 +0200
+@@ -35,6 +35,7 @@
+ 
+ #include "document.hxx"
+ #include "exception.hxx"
++#include "folder.hxx"
+ #include "atom-object.hxx"
+ 
+ class AtomDocument : public libcmis::Document, public AtomObject
+diff -ur libcmis-0.2.3/src/libcmis/atom-object.cxx misc/build/libcmis-0.2.3/src/libcmis/atom-object.cxx
+--- libcmis-0.2.3/src/libcmis/atom-object.cxx	2012-07-03 16:47:28.095183463 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-object.cxx	2012-07-03 16:48:24.179187937 +0200
+@@ -435,12 +435,14 @@
+         // Get the infos URL as we may not have it
+         m_infosUrl = getLink( "self", "application/atom+xml;type=entry" )->getHref( );
+ 
+-        // Get the URL to the allowableActions
+-        AtomLink* allowableActionsLink = getLink( "http://docs.oasis-open.org/ns/cmis/link/200908/allowableactions", "application/cmisallowableactions+xml" );
+-        if ( NULL != allowableActionsLink )
++        // Get the allowableActions
++        xpathObj = xmlXPathEvalExpression( BAD_CAST( "//cmis:allowableActions" ), xpathCtx );
++        if ( xpathObj && xpathObj->nodesetval && xpathObj->nodesetval->nodeNr > 0 )
+         {
+-            m_allowableActions.reset( new AtomAllowableActions( m_session, allowableActionsLink->getHref( ) ) );
++            xmlNodePtr node = xpathObj->nodesetval->nodeTab[0];
++            m_allowableActions.reset( new libcmis::AllowableActions( node ) );
+         }
++        xmlXPathFreeObject( xpathObj );
+ 
+         // First get the type id as it will give us the property definitions
+         string typeIdReq( "//cmis:propertyId[@propertyDefinitionId='cmis:objectTypeId']/cmis:value/text()" );
+diff -ur libcmis-0.2.3/src/libcmis/atom-object.hxx misc/build/libcmis-0.2.3/src/libcmis/atom-object.hxx
+--- libcmis-0.2.3/src/libcmis/atom-object.hxx	2012-07-03 16:47:28.043183458 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-object.hxx	2012-07-03 16:48:24.179187937 +0200
+@@ -30,7 +30,7 @@
+ 
+ #include <libxml/tree.h>
+ 
+-#include "atom-allowable-actions.hxx"
++#include "allowable-actions.hxx"
+ #include "object.hxx"
+ 
+ class AtomPubSession;
+@@ -64,7 +64,7 @@
+         libcmis::ObjectTypePtr m_typeDescription;
+ 
+         std::map< std::string, libcmis::PropertyPtr > m_properties;
+-        boost::shared_ptr< AtomAllowableActions > m_allowableActions;
++        boost::shared_ptr< libcmis::AllowableActions > m_allowableActions;
+ 
+         std::vector< AtomLink > m_links;
+ 
+diff -ur libcmis-0.2.3/src/libcmis/atom-session.cxx misc/build/libcmis-0.2.3/src/libcmis/atom-session.cxx
+--- libcmis-0.2.3/src/libcmis/atom-session.cxx	2012-07-03 16:47:27.989183454 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-session.cxx	2012-07-03 16:48:24.179187937 +0200
+@@ -311,6 +311,7 @@
+     string pattern = getWorkspace().getUriTemplate( atom::UriTemplate::ObjectById );
+     map< string, string > vars;
+     vars[URI_TEMPLATE_VAR_ID] = id;
++    vars[string( "includeAllowableActions" )] = string( "true" );
+     string url = createUrl( pattern, vars );
+ 
+     try
+@@ -340,6 +341,7 @@
+     string pattern = getWorkspace().getUriTemplate( atom::UriTemplate::ObjectByPath );
+     map< string, string > vars;
+     vars[URI_TEMPLATE_VAR_PATH] = path;
++    vars[string( "includeAllowableActions" )] = string( "true" );
+     string url = createUrl( pattern, vars );
+ 
+     try
+diff -ur libcmis-0.2.3/src/libcmis/Makefile.am misc/build/libcmis-0.2.3/src/libcmis/Makefile.am
+--- libcmis-0.2.3/src/libcmis/Makefile.am	2012-07-03 16:47:28.021183457 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/Makefile.am	2012-07-03 16:48:24.177187939 +0200
+@@ -32,8 +32,6 @@
+ 	atom-utils.cxx \
+ 	atom-workspace.hxx \
+ 	atom-workspace.cxx \
+-	atom-allowable-actions.hxx \
+-	atom-allowable-actions.cxx \
+ 	allowable-actions.cxx \
+ 	property.cxx \
+ 	property-type.cxx \
+diff -ur libcmis-0.2.3/src/libcmis/makefile.mk misc/build/libcmis-0.2.3/src/libcmis/makefile.mk
+--- libcmis-0.2.3/src/libcmis/makefile.mk	2012-07-03 16:47:28.052183459 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/makefile.mk	2012-07-03 16:48:24.179187937 +0200
+@@ -25,7 +25,6 @@
+ 
+ SLOFILES= \
+     $(SLO)$/allowable-actions.obj \
+-	$(SLO)$/atom-allowable-actions.obj \
+ 	$(SLO)$/atom-document.obj \
+ 	$(SLO)$/atom-folder.obj \
+ 	$(SLO)$/atom-object-type.obj \
diff --git a/libcmis/makefile.mk b/libcmis/makefile.mk
index cedddf9..b5ffd5d 100644
--- a/libcmis/makefile.mk
+++ b/libcmis/makefile.mk
@@ -46,6 +46,8 @@ TARFILE_MD5=0d2dcdfbf28d6208751b33057f5361f0
 
 # Pushed upstream in both master and libcmis-0.2 branches
 PATCH_FILES+=libcmis-0.2.3.patch
+# Pushed upstream to master branch, but not to libcmis-0.2
+PATCH_FILES+=libcmis-0.2.3-allowable-actions.patch
 
 .IF "$(OS)$(COM)" == "WNTMSC"
 PATCH_FILES+=boost-win.patch
commit dc825ad0ba119aaed32bef4ce5f67d59aaa5d1e1
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Mon Jul 2 16:41:01 2012 +0200

    CMIS UCP: fallback to URL with id as the mark if we can't get the path
    
    This situation will happen in several cases:
     * We don't have the permission to retrieve the object parents
     * For unfiled objects... though I'm still wondering how those could
       sneak into the UI.
    
    Change-Id: I2095334fa1c9152389c5c824e34375bf48bfbedf

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 332d0c7..ff10bd5 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -162,6 +162,7 @@ namespace cmis
         // Split the URL into bits
         m_sURL = m_xIdentifier->getContentIdentifier( );
         cmis::URL url( m_sURL );
+        SAL_INFO( "cmisucp", "Content::Content() " << m_sURL );
 
         // Look for a cached session, key is binding url + repo id
         rtl::OUString sSessionId = url.getBindingUrl( ) + url.getRepositoryId( );
@@ -174,6 +175,7 @@ namespace cmis
         }
 
         m_sObjectPath = url.getObjectPath( );
+        m_sObjectId = url.getObjectId( );
         m_sBindingUrl = url.getBindingUrl( );
     }
 
@@ -189,6 +191,7 @@ namespace cmis
         // Split the URL into bits
         m_sURL = m_xIdentifier->getContentIdentifier( );
         cmis::URL url( m_sURL );
+        SAL_INFO( "cmisucp", "Content::Content() " << m_sURL );
 
         // Look for a cached session, key is binding url + repo id
         rtl::OUString sSessionId = url.getBindingUrl( ) + url.getRepositoryId( );
@@ -201,6 +204,7 @@ namespace cmis
         }
 
         m_sObjectPath = url.getObjectPath( );
+        m_sObjectId = url.getObjectId( );
         m_sBindingUrl = url.getBindingUrl( );
 
         // Get the object type
@@ -218,10 +222,13 @@ namespace cmis
         {
             if ( !m_sObjectPath.isEmpty( ) )
                 m_pObject = m_pSession->getObjectByPath( OUSTR_TO_STDSTR( m_sObjectPath ) );
+            else if (!m_sObjectId.isEmpty( ) )
+                m_pObject = m_pSession->getObject( OUSTR_TO_STDSTR( m_sObjectId ) );
             else
             {
                 m_pObject = m_pSession->getRootFolder( );
                 m_sObjectPath = "/";
+                m_sObjectId = rtl::OUString( );
             }
         }
 
@@ -440,6 +447,8 @@ namespace cmis
         {
             if ( !m_sObjectPath.isEmpty( ) )
                 m_pSession->getObjectByPath( OUSTR_TO_STDSTR( m_sObjectPath ) );
+            else if ( !m_sObjectId.isEmpty( ) )
+                m_pSession->getObject( OUSTR_TO_STDSTR( m_sObjectId ) );
             // No need to handle the root folder case... how can it not exists?
         }
         catch ( const libcmis::Exception& )
diff --git a/ucb/source/ucp/cmis/cmis_content.hxx b/ucb/source/ucp/cmis/cmis_content.hxx
index e98c88d..e61a223 100644
--- a/ucb/source/ucp/cmis/cmis_content.hxx
+++ b/ucb/source/ucp/cmis/cmis_content.hxx
@@ -72,6 +72,7 @@ private:
     libcmis::Session*      m_pSession;
     libcmis::ObjectPtr     m_pObject;
     rtl::OUString          m_sObjectPath;
+    rtl::OUString          m_sObjectId;
     rtl::OUString          m_sURL;
     rtl::OUString          m_sBindingUrl;
 
diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.cxx b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
index edddc9e..29458b2 100644
--- a/ucb/source/ucp/cmis/cmis_datasupplier.cxx
+++ b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
@@ -96,7 +96,13 @@ namespace cmis
             vector< string > paths = maResults[nIndex]->pObject->getPaths( );
             if ( paths.size( ) > 0 )
                 sObjectPath = paths.front( );
-            // TODO Handle the unfiled objects with their id... but can they manage to come here?
+            else
+            {
+                // Handle the unfiled objects with their id...
+                // They manage to sneak here if we don't have the permission to get the object
+                // parents (and then the path)
+                sObjectPath += "#" + maResults[nIndex]->pObject->getId( );
+            }
 
             // Get the URL from the Path
             URL aUrl( mxContent->getIdentifier( )->getContentIdentifier( ) );
diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx
index d7a8e7e..3357a24 100644
--- a/ucb/source/ucp/cmis/cmis_url.cxx
+++ b/ucb/source/ucp/cmis/cmis_url.cxx
@@ -57,6 +57,10 @@ namespace cmis
 
         // Store the path to the object
         m_sPath = aUrl.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
+        m_sId = aUrl.GetMark( );
+
+        if ( !m_sId.isEmpty( ) )
+            m_sPath = rtl::OUString( );
     }
 
     map< int, string > URL::getSessionParams( )
@@ -75,6 +79,11 @@ namespace cmis
         return m_sPath;
     }
 
+    rtl::OUString& URL::getObjectId( )
+    {
+        return m_sId;
+    }
+
     rtl::OUString& URL::getBindingUrl( )
     {
         return m_sBindingUrl;
@@ -88,6 +97,7 @@ namespace cmis
     void URL::setObjectPath( rtl::OUString sPath )
     {
         m_sPath = sPath;
+        m_sId = rtl::OUString( );
     }
 
     rtl::OUString URL::asString( )
@@ -100,9 +110,16 @@ namespace cmis
                 RTL_TEXTENCODING_UTF8 );
         sUrl = "vnd.libreoffice.cmis+atom://" + sEncodedBinding;
 
-        if ( m_sPath[0] != '/' )
-            sUrl += "/";
-        sUrl += m_sPath;
+        if ( !m_sPath.isEmpty( ) )
+        {
+            if ( m_sPath[0] != '/' )
+                sUrl += "/";
+            sUrl += m_sPath;
+        }
+        else if ( !m_sId.isEmpty( ) )
+        {
+            sUrl += "#" + m_sId;
+        }
 
         return sUrl;
     }
diff --git a/ucb/source/ucp/cmis/cmis_url.hxx b/ucb/source/ucp/cmis/cmis_url.hxx
index 4033a17..3d41690 100644
--- a/ucb/source/ucp/cmis/cmis_url.hxx
+++ b/ucb/source/ucp/cmis/cmis_url.hxx
@@ -42,6 +42,7 @@ namespace cmis
             rtl::OUString m_sBindingUrl;
             rtl::OUString m_sRepositoryId;
             rtl::OUString m_sPath;
+            rtl::OUString m_sId;
             rtl::OUString m_sUser;
             rtl::OUString m_sPass;
 
@@ -50,6 +51,7 @@ namespace cmis
 
             std::map< int, std::string > getSessionParams( );
             rtl::OUString& getObjectPath( );
+            rtl::OUString& getObjectId( );
             rtl::OUString& getBindingUrl( );
             rtl::OUString& getRepositoryId( );
             void setObjectPath( rtl::OUString sPath );
commit f6610381befe2b122fb9a5c38d6522e86b045064
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Mon Jul 2 14:57:43 2012 +0200

    libcmis: fixed unexpected exception thrown
    
    Change-Id: Iaa42756f596333747a9100e075a2638b839175b3

diff --git a/libcmis/libcmis-0.2.3.patch b/libcmis/libcmis-0.2.3.patch
new file mode 100644
index 0000000..3b21e70
--- /dev/null
+++ b/libcmis/libcmis-0.2.3.patch
@@ -0,0 +1,34 @@
+diff -ru libcmis-0.2.3/src/libcmis/atom-document.cxx misc/build/libcmis-0.2.3/src/libcmis/atom-document.cxx
+--- libcmis-0.2.3/src/libcmis/atom-document.cxx	2012-07-02 14:39:04.815222889 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-document.cxx	2012-07-02 14:41:09.088229625 +0200
+@@ -129,15 +129,22 @@
+ vector< string > AtomDocument::getPaths( )
+ {
+     vector< string > paths;
+-    vector< libcmis::FolderPtr > parents = getParents( );
+-    for ( vector< libcmis::FolderPtr >::iterator it = parents.begin( );
+-         it != parents.end(); ++it )
++    try
+     {
+-        string path = ( *it )->getPath( );
+-        if ( path[path.size() - 1] != '/' )
+-            path += "/";
+-        path += getName( );
+-        paths.push_back( path );
++        vector< libcmis::FolderPtr > parents = getParents( );
++        for ( vector< libcmis::FolderPtr >::iterator it = parents.begin( );
++             it != parents.end(); ++it )
++        {
++            string path = ( *it )->getPath( );
++            if ( path[path.size() - 1] != '/' )
++                path += "/";
++            path += getName( );
++            paths.push_back( path );
++        }
++    }
++    catch ( const libcmis::Exception& )
++    {
++        // We may not have the permission to get the parents
+     }
+     return paths;
+ }
diff --git a/libcmis/makefile.mk b/libcmis/makefile.mk
index 37e4f6b..cedddf9 100644
--- a/libcmis/makefile.mk
+++ b/libcmis/makefile.mk
@@ -44,6 +44,9 @@ TARGET=cmis
 TARFILE_NAME=libcmis-0.2.3
 TARFILE_MD5=0d2dcdfbf28d6208751b33057f5361f0
 
+# Pushed upstream in both master and libcmis-0.2 branches
+PATCH_FILES+=libcmis-0.2.3.patch
+
 .IF "$(OS)$(COM)" == "WNTMSC"
 PATCH_FILES+=boost-win.patch
 .ENDIF
commit 8bfa8ca9795686ca496a8329391ea643be44f031
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Mon Jul 2 14:38:33 2012 +0200

    libcmis: forgot to remove now unneeded patch
    
    Change-Id: I61e04283702f0ae839bfdd15c51a42ddbe002b86

diff --git a/libcmis/libcurl-version-fix.patch b/libcmis/libcurl-version-fix.patch
deleted file mode 100644
index 075fc6c..0000000
--- a/libcmis/libcurl-version-fix.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -ur misc/build/libcmis-0.2.2.old/src/libcmis/atom-session.cxx misc/build/libcmis-0.2.2/src/libcmis/atom-session.cxx
---- misc/build/libcmis-0.2.2.old/src/libcmis/atom-session.cxx	2012-06-04 20:35:46.400203393 +0200
-+++ misc/build/libcmis-0.2.2/src/libcmis/atom-session.cxx	2012-06-04 20:36:16.255205010 +0200
-@@ -382,7 +382,7 @@
-         if ( pos != string::npos )
-         {
-             // Escape the URL by chunks
--#if LIBCURL_VERSION_VALUE >= 71504
-+#if LIBCURL_VERSION_VALUE >= 0x071504
-             char* escaped = curl_easy_escape( m_curlHandle, value.c_str(), value.length() );
- #else
-             char* escaped = curl_escape( value.c_str(), value.length() );
-@@ -550,7 +550,7 @@
-     {
-         curl_easy_setopt( m_curlHandle, CURLOPT_HTTPAUTH, CURLAUTH_ANY );
- 
--#if LIBCURL_VERSION_VALUE >= 71901
-+#if LIBCURL_VERSION_VALUE >= 0x071901
-         curl_easy_setopt( m_curlHandle, CURLOPT_USERNAME, m_username.c_str() );
-         curl_easy_setopt( m_curlHandle, CURLOPT_PASSWORD, m_password.c_str() );
- #else
commit a62cfd41249386e32ec2b9aa0e20acffa5e0085f
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Mon Jul 2 14:27:38 2012 +0200

    UCP CMIS + fpicker: SharePoint binding URLs contain ?, encoded them
    
    Change-Id: I256220ab48b13ac28ff14d3b24d7a67332f871dc

diff --git a/fpicker/source/office/ServerDetailsControls.cxx b/fpicker/source/office/ServerDetailsControls.cxx
index dc31dc5..bcc9cd3 100644
--- a/fpicker/source/office/ServerDetailsControls.cxx
+++ b/fpicker/source/office/ServerDetailsControls.cxx
@@ -283,7 +283,7 @@ INetURLObject CmisDetailsContainer::getUrl( )
     {
         rtl::OUString sEncodedBinding = rtl::Uri::encode(
                 sBindingUrl + "#" + sRepo,
-                rtl_UriCharClassUricNoSlash,
+                rtl_UriCharClassRelSegment,
                 rtl_UriEncodeKeepEscapes,
                 RTL_TEXTENCODING_UTF8 );
         sUrl = "vnd.libreoffice.cmis+atom://" + sEncodedBinding;
diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx
index 92d859d..d7a8e7e 100644
--- a/ucb/source/ucp/cmis/cmis_url.cxx
+++ b/ucb/source/ucp/cmis/cmis_url.cxx
@@ -95,7 +95,7 @@ namespace cmis
         rtl::OUString sUrl;
         rtl::OUString sEncodedBinding = rtl::Uri::encode(
                 m_sBindingUrl + "#" + m_sRepositoryId,
-                rtl_UriCharClassUricNoSlash,
+                rtl_UriCharClassRelSegment,
                 rtl_UriEncodeKeepEscapes,
                 RTL_TEXTENCODING_UTF8 );
         sUrl = "vnd.libreoffice.cmis+atom://" + sEncodedBinding;
commit 717a8e0f3be2e90929eb6d4604feb053b27155d7
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Mon Jul 2 14:26:51 2012 +0200

    CMIS UCP: show some caught exceptions in ucpcmis.INFO
    
    Change-Id: I2ebbed596cc9c21759633154a46c15e5f0f66e72

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 43cb682..332d0c7 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -244,6 +244,7 @@ namespace cmis
         }
         catch ( const libcmis::Exception& e )
         {
+            SAL_INFO( "cmisucp", "Unexpected libcmis exception: " << e.what( ) );
             ucbhelper::cancelCommandExecution(
                                 ucb::IOErrorCode_GENERAL,
                                 uno::Sequence< uno::Any >( 0 ),
@@ -691,6 +692,7 @@ namespace cmis
         }
         catch ( const libcmis::Exception& e )
         {
+            SAL_INFO( "cmisucp", "Unexpected libcmis exception: " << e.what( ) );
             ucbhelper::cancelCommandExecution(
                                 ucb::IOErrorCode_GENERAL,
                                 uno::Sequence< uno::Any >( 0 ),
@@ -758,6 +760,7 @@ namespace cmis
         }
         catch ( const libcmis::Exception& e )
         {
+            SAL_INFO( "cmisucp", "Unexpected libcmis exception: " << e.what( ) );
             ucbhelper::cancelCommandExecution(
                                 ucb::IOErrorCode_GENERAL,
                                 uno::Sequence< uno::Any >( 0 ),
@@ -800,6 +803,7 @@ namespace cmis
         }
         catch ( const libcmis::Exception& e )
         {
+            SAL_INFO( "cmisucp", "Unexpected libcmis exception: " << e.what( ) );
             ucbhelper::cancelCommandExecution(
                                 ucb::IOErrorCode_GENERAL,
                                 uno::Sequence< uno::Any >( 0 ),
@@ -1059,6 +1063,7 @@ namespace cmis
             }
             catch ( const libcmis::Exception& e )
             {
+                SAL_INFO( "cmisucp", "Unexpected libcmis exception: " << e.what( ) );
                 ucbhelper::cancelCommandExecution(
                                     ucb::IOErrorCode_GENERAL,
                                     uno::Sequence< uno::Any >( 0 ),


More information about the Libreoffice-commits mailing list