summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/sfxbasemodel.cxx
diff options
context:
space:
mode:
authorCao Cuong Ngo <cao.cuong.ngo@gmail.com>2013-09-12 15:27:37 +0200
committerBosdonnat Cedric <cedric.bosdonnat@free.fr>2013-09-23 12:56:09 +0000
commitb61970cfbe12722efd6218db6489980381b8783d (patch)
treefec47f16c02a2b3732561466c783a7e96b7c4a4e /sfx2/source/doc/sfxbasemodel.cxx
parent0618b35ebda29b911058254cd34620e8b24ab8f7 (diff)
Cmis Versions dialog
Change-Id: Ie863282062a6932a55543143e841917c54223ac9 Reviewed-on: https://gerrit.libreoffice.org/5925 Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr> Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
Diffstat (limited to 'sfx2/source/doc/sfxbasemodel.cxx')
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 4224e3ee3ce5..5eae505cec4b 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2604,6 +2604,29 @@ void SAL_CALL SfxBaseModel::checkIn( sal_Bool bIsMajor, const OUString& rMessage
}
}
+uno::Sequence< document::CmisVersion > SAL_CALL SfxBaseModel::getAllVersions( ) throw ( RuntimeException )
+{
+ uno::Sequence< document::CmisVersion > aVersions;
+ SfxMedium* pMedium = m_pData->m_pObjectShell->GetMedium();
+ if ( pMedium )
+ {
+ try
+ {
+ ::ucbhelper::Content aContent( pMedium->GetName(),
+ Reference<ucb::XCommandEnvironment>(),
+ comphelper::getProcessComponentContext() );
+
+ Any aResult = aContent.executeCommand( "getAllVersions", Any( ) );
+ aResult >>= aVersions;
+ }
+ catch ( const Exception & e )
+ {
+ throw RuntimeException( e.Message, e.Context );
+ }
+ }
+ return aVersions;
+}
+
sal_Bool SfxBaseModel::getBoolPropertyValue( const OUString& rName ) throw ( RuntimeException )
{
sal_Bool bValue = sal_False;