Kaydet (Commit) a7b86c0e authored tarafından Mihai Varga's avatar Mihai Varga Kaydeden (comit) Miklos Vajna

Updated CMIS patches and the makefile for the OneDrive binding

To fix build, also squashed in:

Author: Miklos Vajna <vmiklos@collabora.co.uk>
Date:   Sun Dec 14 15:18:58 2014 +0100

    upload libcmis 0.5.0

Author: Mihai Varga <mihai.mv13@gmail.com>
Date:   Mon Aug 11 13:23:53 2014 +0300

    SharePoint binding settings, part 1

    Conflicts:
        officecfg/registry/data/org/openoffice/Office/Common.xcu

Change-Id: I45eb81a0139c42864f93ad89c4a31185f3ac5bd6
üst 52a242e5
...@@ -21,7 +21,7 @@ export CAIRO_TARBALL := f101a9e88b783337b20b2e26dfd26d5f-cairo-1.10.2.tar.gz ...@@ -21,7 +21,7 @@ export CAIRO_TARBALL := f101a9e88b783337b20b2e26dfd26d5f-cairo-1.10.2.tar.gz
export CDR_MD5SUM := b33fd0be3befdd1b37777e08ce058bd9 export CDR_MD5SUM := b33fd0be3befdd1b37777e08ce058bd9
export CDR_TARBALL := libcdr-0.1.1.tar.bz2 export CDR_TARBALL := libcdr-0.1.1.tar.bz2
export CLUCENE_TARBALL := 48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz export CLUCENE_TARBALL := 48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz
export CMIS_TARBALL := 22f8a85daf4a012180322e1f52a7563b-libcmis-0.4.1.tar.gz export CMIS_TARBALL := 5821b806a98e6c38370970e682ce76e8-libcmis-0.5.0.tar.gz
export COINMP_MD5SUM := 1cce53bf4b40ae29790d2c5c9f8b1129 export COINMP_MD5SUM := 1cce53bf4b40ae29790d2c5c9f8b1129
export COINMP_TARBALL := CoinMP-1.7.6.tgz export COINMP_TARBALL := CoinMP-1.7.6.tgz
export COLLADA2GLTF_TARBALL := 4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2 export COLLADA2GLTF_TARBALL := 4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2
......
...@@ -46,17 +46,34 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,cmislib,\ ...@@ -46,17 +46,34 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,cmislib,\
UnpackedTarball/cmis/src/libcmis/gdrive-repository \ UnpackedTarball/cmis/src/libcmis/gdrive-repository \
UnpackedTarball/cmis/src/libcmis/gdrive-session \ UnpackedTarball/cmis/src/libcmis/gdrive-session \
UnpackedTarball/cmis/src/libcmis/gdrive-utils \ UnpackedTarball/cmis/src/libcmis/gdrive-utils \
UnpackedTarball/cmis/src/libcmis/http-session \
UnpackedTarball/cmis/src/libcmis/json-utils \ UnpackedTarball/cmis/src/libcmis/json-utils \
UnpackedTarball/cmis/src/libcmis/oauth2-data \ UnpackedTarball/cmis/src/libcmis/oauth2-data \
UnpackedTarball/cmis/src/libcmis/oauth2-handler \ UnpackedTarball/cmis/src/libcmis/oauth2-handler \
UnpackedTarball/cmis/src/libcmis/oauth2-providers \ UnpackedTarball/cmis/src/libcmis/oauth2-providers \
UnpackedTarball/cmis/src/libcmis/object \ UnpackedTarball/cmis/src/libcmis/object \
UnpackedTarball/cmis/src/libcmis/object-type \ UnpackedTarball/cmis/src/libcmis/object-type \
UnpackedTarball/cmis/src/libcmis/property-type \ UnpackedTarball/cmis/src/libcmis/onedrive-document \
UnpackedTarball/cmis/src/libcmis/onedrive-folder \
UnpackedTarball/cmis/src/libcmis/onedrive-object \
UnpackedTarball/cmis/src/libcmis/onedrive-object-type \
UnpackedTarball/cmis/src/libcmis/onedrive-property \
UnpackedTarball/cmis/src/libcmis/onedrive-repository \
UnpackedTarball/cmis/src/libcmis/onedrive-session \
UnpackedTarball/cmis/src/libcmis/onedrive-utils \
UnpackedTarball/cmis/src/libcmis/property \ UnpackedTarball/cmis/src/libcmis/property \
UnpackedTarball/cmis/src/libcmis/property-type \
UnpackedTarball/cmis/src/libcmis/rendition \ UnpackedTarball/cmis/src/libcmis/rendition \
UnpackedTarball/cmis/src/libcmis/repository \ UnpackedTarball/cmis/src/libcmis/repository \
UnpackedTarball/cmis/src/libcmis/session-factory \ UnpackedTarball/cmis/src/libcmis/session-factory \
UnpackedTarball/cmis/src/libcmis/sharepoint-document \
UnpackedTarball/cmis/src/libcmis/sharepoint-folder \
UnpackedTarball/cmis/src/libcmis/sharepoint-object \
UnpackedTarball/cmis/src/libcmis/sharepoint-object-type \
UnpackedTarball/cmis/src/libcmis/sharepoint-property \
UnpackedTarball/cmis/src/libcmis/sharepoint-repository \
UnpackedTarball/cmis/src/libcmis/sharepoint-session \
UnpackedTarball/cmis/src/libcmis/sharepoint-utils \
UnpackedTarball/cmis/src/libcmis/ws-document \ UnpackedTarball/cmis/src/libcmis/ws-document \
UnpackedTarball/cmis/src/libcmis/ws-folder \ UnpackedTarball/cmis/src/libcmis/ws-folder \
UnpackedTarball/cmis/src/libcmis/ws-navigationservice \ UnpackedTarball/cmis/src/libcmis/ws-navigationservice \
......
...@@ -14,11 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,cmis,$(CMIS_TARBALL))) ...@@ -14,11 +14,7 @@ $(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, \ $(eval $(call gb_UnpackedTarball_add_patches,cmis, \
external/libcmis/libcmis-0.4.1.patch \
external/libcmis/libcmis-0.4.1-empty-path.patch \
external/libcmis/libcmis-0.4.1-properties-fix.patch \
external/libcmis/libcmis-libxml2_compatibility.patch \ external/libcmis/libcmis-libxml2_compatibility.patch \
external/libcmis/libcmis-0.4.1-unreferenced-local-variable.patch \
)) ))
ifeq ($(OS)$(COM),WNTMSC) ifeq ($(OS)$(COM),WNTMSC)
......
diff --git src/libcmis/document.cxx src/libcmis/document.cxx
index 1af0d63..7ecfd24 100644
--- src/libcmis/document.cxx
+++ src/libcmis/document.cxx
@@ -44,6 +44,8 @@ namespace libcmis
it != parents.end(); ++it )
{
string path = ( *it )->getPath( );
+ if ( path.empty() )
+ continue;
if ( path[path.size() - 1] != '/' )
path += "/";
path += getName( );
--- src/libcmis/base-session.cxx
+++ src/libcmis/base-session.cxx
@@ -281,7 +281,7 @@
httpRunRequest( url );
response->getData( )->finish( );
}
- catch ( const CurlException& e )
+ catch ( const CurlException& )
{
// If the access token is expired, we get 401 error,
// Need to use the refresh token to get a new one.
@@ -351,7 +351,7 @@
httpRunRequest( url, headers );
response->getData( )->finish();
}
- catch ( const CurlException& e )
+ catch ( const CurlException& )
{
long status = getHttpStatus( );
/** If we had a HTTP 417 response, this is likely to be due to some
@@ -438,7 +438,7 @@
httpRunRequest( url, headers, redirect );
response->getData( )->finish();
}
- catch ( const CurlException& e )
+ catch ( const CurlException& )
{
long status = getHttpStatus( );
@@ -495,7 +495,7 @@
{
httpRunRequest( url );
}
- catch ( const CurlException& e )
+ catch ( const CurlException& )
{
// If the access token is expired, we get 401 error,
// Need to use the refresh token to get a new one.
--- src/libcmis/oauth2-handler.cxx
+++ src/libcmis/oauth2-handler.cxx
@@ -104,7 +104,7 @@
resp = m_session->httpPostRequest ( m_data->getTokenUrl(), is,
"application/x-www-form-urlencoded" );
}
- catch ( const CurlException& e )
+ catch ( const CurlException& )
{
throw libcmis::Exception(
"Couldn't get tokens from the authorization code ");
@@ -131,7 +131,7 @@
resp = m_session->httpPostRequest( m_data->getTokenUrl( ), is,
"application/x-www-form-urlencoded" );
}
- catch (const CurlException& e )
+ catch (const CurlException& )
{
throw libcmis::Exception( "Couldn't refresh token ");
}
--- src/libcmis/oauth2-providers.cxx
+++ src/libcmis/oauth2-providers.cxx
@@ -44,7 +44,7 @@
{
res = session->httpGetRequest( authUrl )->getStream( )->str( );
}
- catch ( const CurlException& e )
+ catch ( const CurlException& )
{
return string( );
}
@@ -65,7 +65,7 @@
loginRes = session->httpPostRequest ( loginLink, loginIs, CONTENT_TYPE )
->getStream( )->str( );
}
- catch ( const CurlException& e )
+ catch ( const CurlException& )
{
return string( );
}
@@ -105,7 +105,7 @@
{
res = session->httpGetRequest( authUrl )->getStream( )->str( );
}
- catch ( const CurlException& e )
+ catch ( const CurlException& )
{
return string( );
}
@@ -131,7 +131,7 @@
// Alfresco code is in the redirect link
resp = session->httpPostRequest( loginLink, loginIs, CONTENT_TYPE, false );
}
- catch ( const CurlException& e )
+ catch ( const CurlException& )
{
return string( );
}
diff --git src/libcmis/json-utils.cxx src/libcmis/json-utils.cxx
index b537a09..b4e037d 100644
--- src/libcmis/json-utils.cxx
+++ src/libcmis/json-utils.cxx
@@ -213,48 +213,54 @@ Json::Type Json::parseType( )
{
Type type = json_string;
string str = toString( );
- boost::posix_time::ptime time = libcmis::parseDateTime( str );
- if ( !time.is_not_a_date_time( ) )
- type = json_datetime;
- else
+ if ( str.empty( ) )
+ return type;
+ try
{
- Type backupType = type;
- type = json_bool;
- try
- {
- parseBool( str );
- }
- catch (...)
+ boost::posix_time::ptime time = libcmis::parseDateTime( str );
+ if ( !time.is_not_a_date_time( ) )
+ return json_datetime;
+ }
+ catch (...)
+ {
+ // Try other types
+ }
+ Type backupType = type;
+ type = json_bool;
+ try
+ {
+ parseBool( str );
+ }
+ catch (...)
+ {
+ type = backupType;
+ }
+ if ( type != json_bool )
+ {
+ if ( str.find('.') == string::npos )
{
- type = backupType;
+ backupType = type;
+ type = json_int;
+ try
+ {
+ parseInteger( str );
+ }
+ catch(...)
+ {
+ type = backupType;
+ }
}
- if ( type != json_bool )
+ else
{
- if ( str.find('.') == string::npos )
+ backupType = type;
+ type = json_double;
+ try
{
- backupType = type;
- type = json_int;
- try
- {
- parseInteger( str );
- }
- catch(...)
- {
- type = backupType;
- }
+ parseDouble( str );
}
- else
- {
- backupType = type;
- type = json_double;
- try
- {
- parseDouble( str );
- }
- catch(...)
- {
- type = backupType;
- }
+ catch(...)
+ {
+ type = backupType;
}
}
}
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
+#define HTML_PARSE_RECOVER 0 +#define HTML_PARSE_RECOVER 0
+#endif +#endif
+ +
string OAuth2Providers::OAuth2Gdrive( BaseSession* session, const string& authUrl, string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUrl,
const string& username, const string& password ) const string& username, const string& password )
{ {
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