Kaydet (Commit) 27264b1e authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat

updated libcmis to 0.3.0

Change-Id: Ied3f21fa021ad0dbe044ae05941389810462d821
üst 24c66413
...@@ -6704,11 +6704,11 @@ AC_MSG_CHECKING([which libcmis to use]) ...@@ -6704,11 +6704,11 @@ AC_MSG_CHECKING([which libcmis to use])
if test "$with_system_libcmis" = "yes"; then if test "$with_system_libcmis" = "yes"; then
AC_MSG_RESULT([external]) AC_MSG_RESULT([external])
SYSTEM_LIBCMIS=YES SYSTEM_LIBCMIS=YES
PKG_CHECK_MODULES( CMIS, libcmis-0.2 >= 0.2.1 ) PKG_CHECK_MODULES( CMIS, libcmis-0.3 >= 0.3.0 )
else else
AC_MSG_RESULT([internal]) AC_MSG_RESULT([internal])
SYSTEM_LIBCMIS=NO SYSTEM_LIBCMIS=NO
CMIS_TARBALL=0d2dcdfbf28d6208751b33057f5361f0-libcmis-0.2.3.tar.gz CMIS_TARBALL=b2371dc7cf4811c9d32146eec913d296-libcmis-0.3.0.tar.gz
fi fi
AC_SUBST(SYSTEM_LIBCMIS) AC_SUBST(SYSTEM_LIBCMIS)
AC_SUBST(CMIS_CFLAGS) AC_SUBST(CMIS_CFLAGS)
......
...@@ -13,13 +13,6 @@ $(eval $(call gb_Package_use_unpacked,libcmis_inc,cmis)) ...@@ -13,13 +13,6 @@ $(eval $(call gb_Package_use_unpacked,libcmis_inc,cmis))
$(eval $(call gb_Package_add_files,libcmis_inc,inc/external/libcmis,\ $(eval $(call gb_Package_add_files,libcmis_inc,inc/external/libcmis,\
allowable-actions.hxx \ allowable-actions.hxx \
atom-document.hxx \
atom-folder.hxx \
atom-object-type.hxx \
atom-object.hxx \
atom-session.hxx \
atom-utils.hxx \
atom-workspace.hxx \
document.hxx \ document.hxx \
exception.hxx \ exception.hxx \
folder.hxx \ folder.hxx \
...@@ -30,7 +23,6 @@ $(eval $(call gb_Package_add_files,libcmis_inc,inc/external/libcmis,\ ...@@ -30,7 +23,6 @@ $(eval $(call gb_Package_add_files,libcmis_inc,inc/external/libcmis,\
repository.hxx \ repository.hxx \
session-factory.hxx \ session-factory.hxx \
session.hxx \ session.hxx \
test-helpers.hxx \
xml-utils.hxx \ xml-utils.hxx \
xmlserializable.hxx \ xmlserializable.hxx \
)) ))
......
...@@ -27,11 +27,28 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,cmislib,\ ...@@ -27,11 +27,28 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,cmislib,\
UnpackedTarball/cmis/src/libcmis/atom-object-type \ UnpackedTarball/cmis/src/libcmis/atom-object-type \
UnpackedTarball/cmis/src/libcmis/atom-object \ UnpackedTarball/cmis/src/libcmis/atom-object \
UnpackedTarball/cmis/src/libcmis/atom-session \ UnpackedTarball/cmis/src/libcmis/atom-session \
UnpackedTarball/cmis/src/libcmis/atom-utils \
UnpackedTarball/cmis/src/libcmis/atom-workspace \ UnpackedTarball/cmis/src/libcmis/atom-workspace \
UnpackedTarball/cmis/src/libcmis/base-session \
UnpackedTarball/cmis/src/libcmis/document \
UnpackedTarball/cmis/src/libcmis/folder \
UnpackedTarball/cmis/src/libcmis/object \
UnpackedTarball/cmis/src/libcmis/object-type \
UnpackedTarball/cmis/src/libcmis/property-type \ UnpackedTarball/cmis/src/libcmis/property-type \
UnpackedTarball/cmis/src/libcmis/property \ UnpackedTarball/cmis/src/libcmis/property \
UnpackedTarball/cmis/src/libcmis/repository \
UnpackedTarball/cmis/src/libcmis/session-factory \ UnpackedTarball/cmis/src/libcmis/session-factory \
UnpackedTarball/cmis/src/libcmis/ws-document \
UnpackedTarball/cmis/src/libcmis/ws-folder \
UnpackedTarball/cmis/src/libcmis/ws-navigationservice \
UnpackedTarball/cmis/src/libcmis/ws-object \
UnpackedTarball/cmis/src/libcmis/ws-object-type \
UnpackedTarball/cmis/src/libcmis/ws-objectservice \
UnpackedTarball/cmis/src/libcmis/ws-relatedmultipart \
UnpackedTarball/cmis/src/libcmis/ws-repositoryservice \
UnpackedTarball/cmis/src/libcmis/ws-requests \
UnpackedTarball/cmis/src/libcmis/ws-session \
UnpackedTarball/cmis/src/libcmis/ws-soap \
UnpackedTarball/cmis/src/libcmis/ws-versioningservice \
UnpackedTarball/cmis/src/libcmis/xml-utils \ UnpackedTarball/cmis/src/libcmis/xml-utils \
)) ))
......
...@@ -13,11 +13,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,cmis,$(CMIS_TARBALL))) ...@@ -13,11 +13,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,cmis,$(CMIS_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,cmis,0)) $(eval $(call gb_UnpackedTarball_set_patchlevel,cmis,0))
$(eval $(call gb_UnpackedTarball_add_patches,cmis,\
libcmis/libcmis-0.2.3.patch \
libcmis/libcmis-0.2.3-backports.patch \
))
ifeq ($(OS)$(COM),WNTMSC) ifeq ($(OS)$(COM),WNTMSC)
$(eval $(call gb_UnpackedTarball_add_patches,cmis,libcmis/boost-win.patch)) $(eval $(call gb_UnpackedTarball_add_patches,cmis,libcmis/boost-win.patch))
endif endif
......
--- src/libcmis/atom-object.cxx 2012-06-01 07:44:26.000000000 -0600 diff --git src/libcmis/atom-object.cxx src/libcmis/atom-object.cxx
+++ src/libcmis/atom-object.cxx 2012-06-04 07:52:24.131190200 -0600 index ce21384..eef8102 100644
@@ -29,6 +29,9 @@ --- src/libcmis/atom-object.cxx
#include <algorithm> +++ src/libcmis/atom-object.cxx
@@ -30,6 +30,9 @@
#include <locale>
#include <sstream> #include <sstream>
+#ifndef BOOST_DATE_TIME_NO_LIB +#ifndef BOOST_DATE_TIME_NO_LIB
...@@ -9,21 +11,25 @@ ...@@ -9,21 +11,25 @@
+#endif +#endif
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include "atom-object.hxx" #include "atom-document.hxx"
--- src/libcmis/object.hxx 2012-06-01 07:38:36.000000000 -0600 diff --git src/libcmis/object.hxx src/libcmis/object.hxx
+++ src/libcmis/object.hxx 2012-06-04 07:52:21.900386200 -0600 index 449bb22..c320f06 100644
@@ -32,6 +32,9 @@ --- src/libcmis/object.hxx
#include <map> +++ src/libcmis/object.hxx
#include <string> @@ -36,6 +36,9 @@
#include <stdbool.h>
#endif
+#ifndef BOOST_DATE_TIME_NO_LIB +#ifndef BOOST_DATE_TIME_NO_LIB
+#define BOOST_DATE_TIME_NO_LIB +#define BOOST_DATE_TIME_NO_LIB
+#endif +#endif
#include <boost/date_time.hpp> #include <boost/date_time.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <libxml/tree.h>
--- src/libcmis/property-type.hxx 2012-02-17 08:00:50.000000000 -0700 diff --git src/libcmis/property-type.hxx src/libcmis/property-type.hxx
+++ src/libcmis/property-type.hxx 2012-06-04 07:52:17.157977900 -0600 index 1a8bee9..6ac946c 100644
--- src/libcmis/property-type.hxx
+++ src/libcmis/property-type.hxx
@@ -28,6 +28,9 @@ @@ -28,6 +28,9 @@
#ifndef _PROPERTY_TYPE_HXX_ #ifndef _PROPERTY_TYPE_HXX_
#define _PROPERTY_TYPE_HXX_ #define _PROPERTY_TYPE_HXX_
...@@ -34,8 +40,10 @@ ...@@ -34,8 +40,10 @@
#include <boost/date_time.hpp> #include <boost/date_time.hpp>
#include <libxml/tree.h> #include <libxml/tree.h>
--- src/libcmis/property.hxx 2012-02-17 06:38:33.000000000 -0700 diff --git src/libcmis/property.hxx src/libcmis/property.hxx
+++ src/libcmis/property.hxx 2012-06-04 07:52:19.388781800 -0600 index f9be04a..2977fb3 100644
--- src/libcmis/property.hxx
+++ src/libcmis/property.hxx
@@ -31,6 +31,9 @@ @@ -31,6 +31,9 @@
#include <libxml/tree.h> #include <libxml/tree.h>
#include <libxml/xmlwriter.h> #include <libxml/xmlwriter.h>
...@@ -46,10 +54,26 @@ ...@@ -46,10 +54,26 @@
#include <boost/date_time.hpp> #include <boost/date_time.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
--- src/libcmis/xml-utils.hxx 2012-05-30 06:17:12.000000000 -0600 diff --git src/libcmis/ws-session.cxx src/libcmis/ws-session.cxx
+++ src/libcmis/xml-utils.hxx 2012-06-04 07:52:10.621566400 -0600 index b906a5a..bf50644 100644
@@ -30,6 +30,9 @@ --- src/libcmis/ws-session.cxx
+++ src/libcmis/ws-session.cxx
@@ -28,6 +28,9 @@
#include <sstream>
+#ifndef BOOST_DATE_TIME_NO_LIB
+#define BOOST_DATE_TIME_NO_LIB
+#endif
#include <boost/date_time.hpp>
#include <libxml/parser.h>
#include <libxml/tree.h>
diff --git src/libcmis/xml-utils.hxx src/libcmis/xml-utils.hxx
index 52853e2..2f80b91 100644
--- src/libcmis/xml-utils.hxx
+++ src/libcmis/xml-utils.hxx
@@ -33,6 +33,9 @@
#include <sstream>
#include <string> #include <string>
+#ifndef BOOST_DATE_TIME_NO_LIB +#ifndef BOOST_DATE_TIME_NO_LIB
...@@ -57,3 +81,4 @@ ...@@ -57,3 +81,4 @@
+#endif +#endif
#include <boost/date_time.hpp> #include <boost/date_time.hpp>
#include <libxml/tree.h> #include <libxml/tree.h>
#include <libxml/xpathInternals.h>
This diff is collapsed.
--- src/libcmis/atom-document.cxx 2012-07-02 14:39:04.815222889 +0200
+++ 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;
}
...@@ -76,15 +76,17 @@ private: ...@@ -76,15 +76,17 @@ private:
rtl::OUString m_sObjectPath; rtl::OUString m_sObjectPath;
rtl::OUString m_sObjectId; rtl::OUString m_sObjectId;
rtl::OUString m_sURL; rtl::OUString m_sURL;
rtl::OUString m_sBindingUrl; cmis::URL m_aURL;
// Members to be set for non-persistent content // Members to be set for non-persistent content
bool m_bTransient; bool m_bTransient;
bool m_bIsFolder;
libcmis::ObjectTypePtr m_pObjectType; libcmis::ObjectTypePtr m_pObjectType;
std::map< std::string, libcmis::PropertyPtr > m_pObjectProps; std::map< std::string, libcmis::PropertyPtr > m_pObjectProps;
bool isFolder(const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv); bool isFolder( const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv );
void setCmisProperty( std::string sName, std::string sValue ); void setCmisProperty( std::string sName, std::string sValue,
const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv );
com::sun::star::uno::Any getBadArgExcept(); com::sun::star::uno::Any getBadArgExcept();
...@@ -93,7 +95,10 @@ private: ...@@ -93,7 +95,10 @@ private:
const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& rProperties, const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& rProperties,
const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv ); const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv );
bool exists( ); libcmis::Session* getSession( const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv );
libcmis::ObjectTypePtr getObjectType( const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv );
bool exists( const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv );
private: private:
typedef rtl::Reference< Content > ContentRef; typedef rtl::Reference< Content > ContentRef;
...@@ -125,8 +130,6 @@ private: ...@@ -125,8 +130,6 @@ private:
sal_Bool feedSink( com::sun::star::uno::Reference< com::sun::star::uno::XInterface> aSink, sal_Bool feedSink( com::sun::star::uno::Reference< com::sun::star::uno::XInterface> aSink,
const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv ); const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv );
void resetAuthProvider( const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv );
public: public:
Content( const com::sun::star::uno::Reference< Content( const com::sun::star::uno::Reference<
com::sun::star::lang::XMultiServiceFactory >& rxSMgr, ContentProvider *pProvider, com::sun::star::lang::XMultiServiceFactory >& rxSMgr, ContentProvider *pProvider,
...@@ -191,7 +194,7 @@ public: ...@@ -191,7 +194,7 @@ public:
virtual std::list< com::sun::star::uno::Reference< com::sun::star::ucb::XContent > > getChildren( ); virtual std::list< com::sun::star::uno::Reference< com::sun::star::ucb::XContent > > getChildren( );
libcmis::ObjectPtr getObject( ) throw ( libcmis::Exception ); libcmis::ObjectPtr getObject( const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv ) throw ( libcmis::Exception );
}; };
} }
......
...@@ -147,13 +147,10 @@ namespace cmis ...@@ -147,13 +147,10 @@ namespace cmis
string rPassword = OUSTR_TO_STDSTR( m_aURL.getPassword( ) ); string rPassword = OUSTR_TO_STDSTR( m_aURL.getPassword( ) );
if ( authProvider.authenticationQuery( rUsername, rPassword ) ) if ( authProvider.authenticationQuery( rUsername, rPassword ) )
{ {
map< int, string > params = m_aURL.getSessionParams( );
params[USERNAME] = rUsername;
params[PASSWORD] = rPassword;
try try
{ {
m_aRepositories = libcmis::SessionFactory::getRepositories( params ); m_aRepositories = libcmis::SessionFactory::getRepositories(
OUSTR_TO_STDSTR( m_aURL.getBindingUrl( ) ), rUsername, rPassword );
} }
catch (const libcmis::Exception&) catch (const libcmis::Exception&)
{ {
......
...@@ -63,17 +63,6 @@ namespace cmis ...@@ -63,17 +63,6 @@ namespace cmis
m_sPath = rtl::OUString( ); m_sPath = rtl::OUString( );
} }
map< int, string > URL::getSessionParams( )
{
map< int, string > params;
params[ATOMPUB_URL] = OUSTR_TO_STDSTR( m_sBindingUrl );
params[REPOSITORY_ID] = OUSTR_TO_STDSTR( m_sRepositoryId );
params[USERNAME] = OUSTR_TO_STDSTR( m_sUser );
params[PASSWORD] = OUSTR_TO_STDSTR( m_sPass );
return params;
}
rtl::OUString& URL::getObjectPath( ) rtl::OUString& URL::getObjectPath( )
{ {
return m_sPath; return m_sPath;
......
...@@ -49,7 +49,6 @@ namespace cmis ...@@ -49,7 +49,6 @@ namespace cmis
public: public:
URL( rtl::OUString const & urlStr ); URL( rtl::OUString const & urlStr );
std::map< int, std::string > getSessionParams( );
rtl::OUString& getObjectPath( ); rtl::OUString& getObjectPath( );
rtl::OUString& getObjectId( ); rtl::OUString& getObjectId( );
rtl::OUString& getBindingUrl( ); rtl::OUString& getBindingUrl( );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment