From bd97d9597cd9e3e7b077df9890d515328e3ee855 Mon Sep 17 00:00:00 2001 From: Cao Cuong Ngo Date: Sun, 14 Jul 2013 15:33:27 +0200 Subject: 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 --- sfx2/source/dialog/dinfdlg.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 545775a3d1c3..032db6102d89 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -578,10 +578,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 ) @@ -2225,6 +2223,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(); -- cgit