diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-05-30 18:59:51 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-06-04 13:28:13 +0200 |
commit | 6ad3debb05f7c6f0afdf3c9ae08210cd6b17ce0d (patch) | |
tree | fcd6c97b7f7c8f4d16c32b7ef9801f914653bbe6 /ucb | |
parent | 705cab9a81b81153778c09c56340c20118c00471 (diff) |
CMIS UCP: if the URL has no object id, assume we want the root folder
Change-Id: I6cc330f20222d4448d2267151d49f354068f54f3
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.cxx | 7 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_url.cxx | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index ba025bed58c9..abbdb73e380d 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -195,7 +195,12 @@ namespace cmis try { if ( !m_pObject.get() ) - m_pObject = m_pSession->getObject( OUSTR_TO_STDSTR( m_sObjectId ) ); + { + if ( !m_sObjectId.isEmpty( ) ) + m_pObject = m_pSession->getObject( OUSTR_TO_STDSTR( m_sObjectId ) ); + else + m_pObject = m_pSession->getRootFolder( ); + } } catch ( const libcmis::Exception& e ) { diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx index 655518d58365..df225018d3a9 100644 --- a/ucb/source/ucp/cmis/cmis_url.cxx +++ b/ucb/source/ucp/cmis/cmis_url.cxx @@ -88,7 +88,11 @@ namespace cmis rtl::OUString URL::getObjectId( ) { - return m_aQuery["id"]; + rtl::OUString sResult; + map< rtl::OUString, rtl::OUString >::iterator it = m_aQuery.find( "id" ); + if ( it != m_aQuery.end( ) ) + sResult = it->second; + return sResult; } rtl::OUString URL::getBindingUrl( ) |