diff options
author | Cao Cuong Ngo <cao.cuong.ngo@gmail.com> | 2013-08-04 12:17:06 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2013-09-02 13:51:55 +0200 |
commit | 0e241ca0a8dd14bcc895b25dd5480b5ae90915a6 (patch) | |
tree | 87850c6a97ef72e8059ee46ddbb8818e92e387af /ucb | |
parent | 8513fe4dbc98398f9b3b9a63a9a3d219801ad3d6 (diff) |
CMIS: use FolderPtr instead of Folder pointer
Change-Id: Iac68f67e94ddcc6b0bb2877763176b2efcc9b7d8
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index ba81c01458f7..155a9aea5626 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -1139,10 +1139,10 @@ namespace cmis OUString sNewPath; // Try to get the object from the server if there is any - libcmis::Folder* pFolder = NULL; + libcmis::FolderPtr pFolder; try { - pFolder = dynamic_cast< libcmis::Folder* >( getObject( xEnv ).get( ) ); + pFolder = boost::dynamic_pointer_cast< libcmis::Folder >( getObject( xEnv ) ); } catch ( const libcmis::Exception& ) { @@ -1260,12 +1260,13 @@ namespace cmis } } - if ( !sNewPath.isEmpty( ) ) + if ( !sNewPath.isEmpty( ) || !m_sObjectId.isEmpty( ) ) { // Update the current content: it's no longer transient m_sObjectPath = sNewPath; URL aUrl( m_sURL ); aUrl.setObjectPath( m_sObjectPath ); + aUrl.setObjectId( m_sObjectId ); m_sURL = aUrl.asString( ); m_pObject.reset( ); m_pObjectType.reset( ); @@ -1876,7 +1877,7 @@ namespace cmis list< uno::Reference< ucb::XContent > > results; SAL_INFO( "cmisucp", "Content::getChildren() " << m_sURL ); - libcmis::Folder* pFolder = dynamic_cast< libcmis::Folder* >( getObject( uno::Reference< ucb::XCommandEnvironment >() ).get( ) ); + libcmis::FolderPtr pFolder = boost::dynamic_pointer_cast< libcmis::Folder >( getObject( uno::Reference< ucb::XCommandEnvironment >() ) ); if ( NULL != pFolder ) { // Get the children from pObject |