summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/dinfdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/dialog/dinfdlg.cxx')
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index d59d36855c..b448392766 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 )
{