include/sfx2/dinfdlg.hxx | 2 ++ sfx2/source/dialog/dinfdlg.cxx | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-)
New commits: commit 0d7869b0a73f5df4a81ac6e01a06b0f951387ee9 Author: Cao Cuong Ngo <cao.cuong....@gmail.com> Date: Sun Jul 14 15:33:27 2013 +0200 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 diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index 43b20ad..dde187e 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 a508577..99c103d 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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits