summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/sfxbasemodel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/sfxbasemodel.cxx')
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 9c3786f532a1..cc2abe9ec95d 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2577,6 +2577,32 @@ void SAL_CALL SfxBaseModel::checkOut( ) throw ( uno::RuntimeException )
}
}
+sal_Bool SAL_CALL SfxBaseModel::isVersionable( ) throw ( uno::RuntimeException )
+{
+ sal_Bool bVersionable = sal_False;
+ SfxMedium* pMedium = m_pData->m_pObjectShell->GetMedium();
+ if ( pMedium )
+ {
+ try
+ {
+ ::ucbhelper::Content aContent( pMedium->GetName( ),
+ uno::Reference<ucb::XCommandEnvironment>(),
+ comphelper::getProcessComponentContext() );
+ com::sun::star::uno::Reference < beans::XPropertySetInfo > xProps = aContent.getProperties();
+ ::rtl::OUString aIsVersionableProp( "IsVersionable" );
+ if ( xProps->hasPropertyByName( aIsVersionableProp ) )
+ {
+ aContent.getPropertyValue( aIsVersionableProp ) >>= bVersionable;
+ }
+ }
+ catch ( const uno::Exception & e )
+ {
+ throw uno::RuntimeException( e.Message, e.Context );
+ }
+ }
+ return bVersionable;
+}
+
void SfxBaseModel::loadCmisProperties( )
{
SfxMedium* pMedium = m_pData->m_pObjectShell->GetMedium();