diff options
author | Cao Cuong Ngo <cao.cuong.ngo@gmail.com> | 2013-06-17 15:17:00 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2013-09-02 13:51:48 +0200 |
commit | beff419a6e9e5ae16e84366d628ca478ab1afdb8 (patch) | |
tree | 2bf59c933ab7cecf3c82f631070dde5989a057b0 /sfx2/source/doc/sfxbasemodel.cxx | |
parent | 5118e421e4d3eef3a1ff7c653d4bf5dd200b440e (diff) |
CMIS properties
Create a CmisPropertyValue with additional DisplayName,
Updatable and Required properties.
Change-Id: Ia20d76a739ac5c51d7c89ef6f1a40a299697cb0e
Diffstat (limited to 'sfx2/source/doc/sfxbasemodel.cxx')
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 92276acc42da..f7d556b496f6 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -120,6 +120,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using ::com::sun::star::beans::PropertyValue; +using ::com::sun::star::document::CmisPropertyValue; using ::com::sun::star::frame::XFrame; using ::com::sun::star::frame::XController; using ::com::sun::star::frame::XController2; @@ -211,9 +212,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument Reference< frame::XUntitledNumbers > m_xNumberedControllers; Reference< rdf::XDocumentMetadataAccess> m_xDocumentMetadata; ::rtl::Reference< ::sfx2::DocumentUndoManager > m_pDocumentUndoManager; - Sequence< beans::PropertyValue> m_cmisPropertiesValues; - Sequence< beans::PropertyValue> m_cmisPropertiesDisplayNames; - + Sequence< document::CmisPropertyValue> m_cmisPropertiesValues; IMPL_SfxBaseModel_DataContainer( ::osl::Mutex& rMutex, SfxObjectShell* pObjectShell ) : m_pObjectShell ( pObjectShell ) @@ -232,7 +231,6 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument , m_xDocumentMetadata () // lazy , m_pDocumentUndoManager () , m_cmisPropertiesValues () - , m_cmisPropertiesDisplayNames () { // increase global instance counter. ++g_nInstanceCounter; @@ -2464,30 +2462,18 @@ void SAL_CALL SfxBaseModel::notifyDocumentEvent( const OUString&, const Referenc throw lang::NoSupportException("SfxBaseModel controlls all the sent notifications itself!", Reference< XInterface >() ); } -Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getCmisPropertiesValues() +Sequence< document::CmisPropertyValue > SAL_CALL SfxBaseModel::getCmisPropertiesValues() throw ( RuntimeException ) { return m_pData->m_cmisPropertiesValues; } -void SAL_CALL SfxBaseModel::setCmisPropertiesValues( const Sequence< beans::PropertyValue >& _cmispropertiesvalues ) +void SAL_CALL SfxBaseModel::setCmisPropertiesValues( const Sequence< document::CmisPropertyValue >& _cmispropertiesvalues ) throw ( RuntimeException ) { m_pData->m_cmisPropertiesValues = _cmispropertiesvalues; } -Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getCmisPropertiesDisplayNames() - throw ( RuntimeException ) -{ - return m_pData->m_cmisPropertiesDisplayNames; -} - -void SAL_CALL SfxBaseModel::setCmisPropertiesDisplayNames( const Sequence< beans::PropertyValue >& _cmispropertiesdisplaynames ) - throw ( RuntimeException ) -{ - m_pData->m_cmisPropertiesDisplayNames = _cmispropertiesdisplaynames; -} - void SAL_CALL SfxBaseModel::checkOut( ) throw ( RuntimeException ) { SfxMedium* pMedium = m_pData->m_pObjectShell->GetMedium(); @@ -2652,19 +2638,12 @@ void SfxBaseModel::loadCmisProperties( ) comphelper::getProcessComponentContext() ); Reference < beans::XPropertySetInfo > xProps = aContent.getProperties(); OUString aCmisPropsValues( "CmisPropertiesValues" ); - OUString aCmisPropsNames( "CmisPropertiesDisplayNames" ); if ( xProps->hasPropertyByName( aCmisPropsValues ) ) { - beans::PropertyValues aCmisValues; + Sequence< document::CmisPropertyValue> aCmisValues; aContent.getPropertyValue( aCmisPropsValues ) >>= aCmisValues; setCmisPropertiesValues( aCmisValues ); } - if ( xProps->hasPropertyByName( aCmisPropsNames ) ) - { - beans::PropertyValues aPropNames; - aContent.getPropertyValue( aCmisPropsNames ) >>= aPropNames; - setCmisPropertiesDisplayNames( aPropNames ); - } } catch (const ucb::ContentCreationException &) { |