diff options
author | Cao Cuong Ngo <cao.cuong.ngo@gmail.com> | 2013-07-09 18:54:35 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2013-09-02 13:51:49 +0200 |
commit | d259e07e851cafa4e0ca68f7ab18535e82c7aed5 (patch) | |
tree | 3d1ea1858ffc9cd3b57d24d7a5cbcc131eff0e18 /ucb | |
parent | b56a9a22dadc2f78be1c898505a884774fc19e25 (diff) |
CMIS properties dialog: update properties
Change-Id: Ia506713b61dc6c1343eac3640863c86a2fc3f18f
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.cxx | 25 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.hxx | 5 |
2 files changed, 30 insertions, 0 deletions
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index 7c1355dce462..3b0093ff2022 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -413,6 +413,25 @@ namespace cmis static_cast< cppu::OWeakObject * >( this ), -1) ); } + libcmis::ObjectPtr Content::updateProperties( + const uno::Any& /*iCmisProps*/, + const uno::Reference< ucb::XCommandEnvironment >& xEnv ) + { + // TODO convert iCmisProps to aProperties; + map< string, libcmis::PropertyPtr > aProperties; + libcmis::ObjectPtr updateObj; + try + { + updateObj = getObject( xEnv )->updateProperties( aProperties ); + } + catch ( const libcmis::Exception& e ) + { + SAL_INFO( "cmisucp", "Unexpected libcmis exception: "<< e.what( ) ); + } + + return updateObj; + } + uno::Reference< sdbc::XRow > Content::getPropertyValues( const uno::Sequence< beans::Property >& rProperties, const uno::Reference< ucb::XCommandEnvironment >& xEnv ) @@ -1328,6 +1347,8 @@ namespace cmis ucb::CommandInfo ( OUString( "cancelCheckout" ), -1, getCppuVoidType() ), ucb::CommandInfo ( OUString( "checkIn" ), -1, getCppuType( static_cast<ucb::TransferInfo * >( 0 ) ) ), + ucb::CommandInfo ( OUString( "updateProperties" ), -1, getCppuVoidType() ), + // Folder Only, omitted if not a folder ucb::CommandInfo @@ -1535,6 +1556,10 @@ namespace cmis } aRet <<= checkIn( aArg, xEnv ); } + else if ( aCommand.Name == "updateProperties" ) + { + updateProperties( aCommand.Argument, xEnv ); + } else { SAL_INFO( "cmisucp", "Unknown command to execute" ); diff --git a/ucb/source/ucp/cmis/cmis_content.hxx b/ucb/source/ucp/cmis/cmis_content.hxx index 76d523efb70e..669360f92747 100644 --- a/ucb/source/ucp/cmis/cmis_content.hxx +++ b/ucb/source/ucp/cmis/cmis_content.hxx @@ -140,6 +140,11 @@ public: getProperties( const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > & xEnv ); + virtual libcmis::ObjectPtr updateProperties( + const com::sun::star::uno::Any& iCmisProps, + const com::sun::star::uno::Reference< + com::sun::star::ucb::XCommandEnvironment > & xEnv); + virtual com::sun::star::uno::Sequence< com::sun::star::ucb::CommandInfo > getCommands( const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > & xEnv ); |