Kaydet (Commit) bd97d959 authored tarafından Cao Cuong Ngo's avatar Cao Cuong Ngo Kaydeden (comit) Cédric Bosdonnat

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
üst aada05f1
......@@ -101,6 +101,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; }
......@@ -697,6 +698,7 @@ class SfxCmisPropertiesPage : public SfxTabPage
private:
CmisPropertiesControl* m_pPropertiesCtrl;
using TabPage::DeactivatePage;
DECL_LINK(UpdateHdl, void *);
protected:
SfxCmisPropertiesPage( Window* pParent, const SfxItemSet& );
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment