Kaydet (Commit) 4f5c523b authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat

CMIS UCP: fixed Save As into a CMIS repo

Change-Id: I8ab65f917e9442f8871a39d7d25a63336065bee6
üst e5fdaa25
...@@ -271,20 +271,26 @@ namespace cmis ...@@ -271,20 +271,26 @@ namespace cmis
if ( rProp.Name == "IsDocument" ) if ( rProp.Name == "IsDocument" )
{ {
if ( getObject()->getBaseType( ) == "cmis:document" ) if ( getObject( ).get( ) )
xRow->appendBoolean( rProp, true ); xRow->appendBoolean( rProp, getObject()->getBaseType( ) == "cmis:document" );
else if ( m_pObjectType.get( ) )
xRow->appendBoolean( rProp, m_pObjectType->getBaseType()->getId( ) == "cmis:document" );
else else
xRow->appendVoid( rProp ); xRow->appendVoid( rProp );
} }
else if ( rProp.Name == "IsFolder" ) else if ( rProp.Name == "IsFolder" )
{ {
sal_Bool bFolder = getObject()->getBaseType( ) == "cmis:folder"; if ( getObject( ).get( ) )
xRow->appendBoolean( rProp, bFolder ); xRow->appendBoolean( rProp, getObject()->getBaseType( ) == "cmis:folder" );
else if ( m_pObjectType.get( ) )
xRow->appendBoolean( rProp, m_pObjectType->getBaseType()->getId( ) == "cmis:folder" );
else
xRow->appendVoid( rProp );
} }
else if ( rProp.Name == "Title" ) else if ( rProp.Name == "Title" )
{ {
rtl::OUString sTitle; rtl::OUString sTitle;
if ( getObject() ) if ( getObject().get() )
sTitle = rtl::OUString::createFromAscii( getObject()->getName().c_str( ) ); sTitle = rtl::OUString::createFromAscii( getObject()->getName().c_str( ) );
else if ( m_pObjectProps.size() > 0 ) else if ( m_pObjectProps.size() > 0 )
{ {
...@@ -308,7 +314,7 @@ namespace cmis ...@@ -308,7 +314,7 @@ namespace cmis
// Get the last segment // Get the last segment
sal_Int32 nPos = sPath.lastIndexOf( '/' ); sal_Int32 nPos = sPath.lastIndexOf( '/' );
if ( nPos > 0 ) if ( nPos >= 0 )
sTitle = sPath.copy( nPos + 1 ); sTitle = sPath.copy( nPos + 1 );
} }
...@@ -320,6 +326,8 @@ namespace cmis ...@@ -320,6 +326,8 @@ namespace cmis
else if ( rProp.Name == "TitleOnServer" ) else if ( rProp.Name == "TitleOnServer" )
{ {
string path; string path;
if ( getObject().get( ) )
{
vector< string > paths = getObject( )->getPaths( ); vector< string > paths = getObject( )->getPaths( );
if ( paths.size( ) > 0 ) if ( paths.size( ) > 0 )
path = paths.front( ); path = paths.front( );
...@@ -328,6 +336,9 @@ namespace cmis ...@@ -328,6 +336,9 @@ namespace cmis
xRow->appendString( rProp, rtl::OUString::createFromAscii( path.c_str() ) ); xRow->appendString( rProp, rtl::OUString::createFromAscii( path.c_str() ) );
} }
else
xRow->appendVoid( rProp );
}
else if ( rProp.Name == "IsReadOnly" ) else if ( rProp.Name == "IsReadOnly" )
{ {
boost::shared_ptr< libcmis::AllowableActions > allowableActions = getObject()->getAllowableActions( ); boost::shared_ptr< libcmis::AllowableActions > allowableActions = getObject()->getAllowableActions( );
......
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