diff options
author | Cao Cuong Ngo <cao.cuong.ngo@gmail.com> | 2013-07-14 15:33:27 +0200 |
---|---|---|
committer | Cao Cuong Ngo <cao.cuong.ngo@gmail.com> | 2013-07-14 15:33:27 +0200 |
commit | 0d7869b0a73f5df4a81ac6e01a06b0f951387ee9 (patch) | |
tree | 17713ee2c1bcab992442f2f8a6fd0147f809779b | |
parent | 4844a020da357eacb15831bf3cd7e095b06bb960 (diff) |
CMIS properties dialog
When it's a CMIS document, don't update custom properties,
which also prevents cmis properties aren't updated.
Change-Id: Ia26d9ae5debae9c5de347ed309a3f07cfda4a475
-rw-r--r-- | include/sfx2/dinfdlg.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index 43b20ad5cd55..dde187e13509 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -99,6 +99,7 @@ public: ::com::sun::star::document::XDocumentProperties> & i_xDocProps, bool i_bDoNotUpdateUserDefined = false) const; + sal_Bool isCmisDocument() const { return m_aCmisProperties.size() > 0;} sal_Bool isAutoloadEnabled() const { return m_isAutoloadEnabled; } void setAutoloadEnabled(sal_Bool i_val) { m_isAutoloadEnabled = i_val; } @@ -691,6 +692,7 @@ class SfxCmisPropertiesPage : public SfxTabPage private: CmisPropertiesControl* m_pPropertiesCtrl; using TabPage::DeactivatePage; + DECL_LINK(UpdateHdl, void *); protected: SfxCmisPropertiesPage( Window* pParent, const SfxItemSet& ); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index a50857748540..99c103d416a4 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -576,10 +576,8 @@ std::vector< CmisProperty* > SfxDocumentInfoItem::GetCmisProperties() const uno::Sequence< document::CmisProperty > SfxDocumentInfoItem::GetCmisPropertiesSeq() const { - - sal_Int32 i = 0; std::vector< CmisProperty* >::const_iterator pIter; - sal_Int32 updatableCount = 0, nCount = 0; + sal_Int32 i=0, updatableCount = 0, nCount = 0; for ( pIter = m_aCmisProperties.begin(); pIter != m_aCmisProperties.end(); ++pIter, ++i ) @@ -2187,6 +2185,14 @@ sal_Bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet ) if ( pInfo ) { + // If it's a CMIS document, we can't save custom properties + if ( pInfo->isCmisDocument( ) ) + { + if ( bMustDelete ) + delete pInfo; + return sal_False; + } + pInfo->ClearCustomProperties(); Sequence< beans::PropertyValue > aPropertySeq = m_pPropertiesCtrl->GetCustomProperties(); sal_Int32 i = 0, nCount = aPropertySeq.getLength(); |