diff options
author | Michael Stahl <mst@openoffice.org> | 2009-10-09 11:16:17 +0200 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2009-10-09 11:16:17 +0200 |
commit | 8be417c210fdb1597079fe8eb8232c8c15c6531a (patch) | |
tree | 020175ac758111448ad3bfe8a370e576fb63aa17 /sfx2 | |
parent | 36a931bd7ffca530cd91c51326d9f021b5319bc6 (diff) |
#i105649#: SfxDocumentInfoItem::UpdateDocumentInfo():
do not remove non-removeable properties
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 484e953f1cf4..e0a57c2e5e9e 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -269,8 +269,12 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const String& rFile, for ( sal_Int32 i = 0; i < nCount; ++i ) { // "fix" property? => not a custom property => ignore it! - if ( !(pProps[i].Attributes & ::com::sun::star::beans::PropertyAttribute::REMOVABLE) ) + if (!(pProps[i].Attributes & + ::com::sun::star::beans::PropertyAttribute::REMOVABLE)) + { + DBG_ASSERT(false, "non-removable user-defined property?"); continue; + } uno::Any aValue = xSet->getPropertyValue(pProps[i].Name); CustomProperty* pProp = new CustomProperty( pProps[i].Name, aValue ); @@ -424,7 +428,13 @@ void SfxDocumentInfoItem::UpdateDocumentInfo( const beans::Property* pProps = lProps.getConstArray(); sal_Int32 nCount = lProps.getLength(); for ( sal_Int32 j = 0; j < nCount; ++j ) - xContainer->removeProperty( pProps[j].Name ); + { + if ((pProps[j].Attributes & + ::com::sun::star::beans::PropertyAttribute::REMOVABLE)) + { + xContainer->removeProperty( pProps[j].Name ); + } + } for ( sal_uInt32 k = 0; k < m_aCustomProperties.size(); ++k ) { |