diff options
author | Michael Stahl <mstahl@redhat.com> | 2011-10-25 13:52:04 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-10-28 17:33:42 +0200 |
commit | c9e2f8ff5d19d746a2f2403465c7f9d7e480e166 (patch) | |
tree | bc0de62b856979eba275508cb3d34a95d537266c /sfx2 | |
parent | dfab4794d7cb98bb993ada22165da84168f89d00 (diff) |
SfxBaseModel impl_setDocumentProperties to impl class
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/sfx2/sfxbasemodel.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 17 |
2 files changed, 11 insertions, 8 deletions
diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx index 7855708e8e81..e3c773a5829c 100644 --- a/sfx2/inc/sfx2/sfxbasemodel.hxx +++ b/sfx2/inc/sfx2/sfxbasemodel.hxx @@ -1503,8 +1503,6 @@ public: /** returns true if someone added a XEventListener to this XEventBroadcaster */ sal_Bool hasEventListeners() const; - void impl_setDocumentProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentProperties >& ); - protected: /* returns a unique id for the model that is valid as long as the document diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index cbd04f2f9eec..36f6184f4dc7 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -273,6 +273,9 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument m_pObjectShell->SetModified( sal_True ); } + void impl_setDocumentProperties( + const uno::Reference< document::XDocumentProperties >& ); + uno::Reference<rdf::XDocumentMetadataAccess> GetDMA() { if (!m_xDocumentMetadata.is()) @@ -898,11 +901,13 @@ uno::Reference< document::XDocumentInfo > SAL_CALL SfxBaseModel::getDocumentInfo } void -SfxBaseModel::impl_setDocumentProperties( const uno::Reference< document::XDocumentProperties >& rxNewDocProps ) +IMPL_SfxBaseModel_DataContainer::impl_setDocumentProperties( + const uno::Reference< document::XDocumentProperties >& rxNewDocProps) { - m_pData->m_xDocumentProperties.set(rxNewDocProps, uno::UNO_QUERY_THROW); - uno::Reference<util::XModifyBroadcaster> xMB(m_pData->m_xDocumentProperties, uno::UNO_QUERY_THROW); - xMB->addModifyListener(new SfxDocInfoListener_Impl(*m_pData->m_pObjectShell)); + m_xDocumentProperties.set(rxNewDocProps, uno::UNO_QUERY_THROW); + uno::Reference<util::XModifyBroadcaster> const xMB(m_xDocumentProperties, + uno::UNO_QUERY_THROW); + xMB->addModifyListener(new SfxDocInfoListener_Impl(*m_pObjectShell)); } void @@ -912,7 +917,7 @@ SfxBaseModel::setDocumentProperties( const uno::Reference< document::XDocumentPr ::SolarMutexGuard aGuard; if ( impl_isDisposed() ) throw lang::DisposedException(); - impl_setDocumentProperties(rxNewDocProps); + m_pData->impl_setDocumentProperties(rxNewDocProps); } // document::XDocumentPropertiesSupplier: @@ -927,7 +932,7 @@ SfxBaseModel::getDocumentProperties() ::comphelper::getProcessServiceFactory()->createInstance( DEFINE_CONST_UNICODE("com.sun.star.document.DocumentProperties") ), uno::UNO_QUERY_THROW); - impl_setDocumentProperties(xDocProps); + m_pData->impl_setDocumentProperties(xDocProps); } return m_pData->m_xDocumentProperties; |