[Libreoffice-commits] core.git: Branch 'feature/cmis' - 2 commits - ucb/source
Cao Cuong Ngo
cao.cuong.ngo at gmail.com
Sun Aug 4 14:22:18 PDT 2013
ucb/source/ucp/cmis/cmis_content.cxx | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
New commits:
commit 59d0e516d90b2cee5d95b68997316f3b647ac33d
Author: Cao Cuong Ngo <cao.cuong.ngo at gmail.com>
Date: Sun Aug 4 12:17:06 2013 +0200
CMIS: use FolderPtr instead of Folder pointer
Change-Id: Iac68f67e94ddcc6b0bb2877763176b2efcc9b7d8
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 507c8f6..c2266fb 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -1142,10 +1142,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& )
{
@@ -1263,12 +1263,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( );
@@ -1879,7 +1880,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
commit 5ba11744b10d2ff61f85396c1e6b2de71247bc31
Author: Cao Cuong Ngo <cao.cuong.ngo at gmail.com>
Date: Sun Aug 4 11:52:44 2013 +0200
CMIS: add BaseURI property to remove warning
Change-Id: I936e497d88781b9e8fd43532fda23379ff56e25f
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 7fedb84..507c8f6 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -730,7 +730,10 @@ namespace cmis
{
xRow->appendString( rProp, "" );
}
-
+ else if ( rProp.Name == "BaseURI" )
+ {
+ xRow->appendString( rProp, m_aURL.getBindingUrl( ) );
+ }
else if ( rProp.Name == "CmisProperties" )
{
try
More information about the Libreoffice-commits
mailing list