summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-12-03 23:18:55 +0100
committerMichael Stahl <mstahl@redhat.com>2012-12-04 00:57:46 +0100
commit3d9bb8e82548b8cf35771d044c0175f6a7e8ccdb (patch)
tree267cdbf8e81a351ce924cfc2114eea0af17ae1c1 /sw
parentfa4d109a77f5fdbae6be51138402a35b5e551dc1 (diff)
SwXStyle::getPropertyDefaults: handle non-itemset based properties:
These do not occur in ItemSets and thus cause fxItemPropertySet::getPropertyValue to throw. This caused sw_unoapi test to fail in sw.CharacterStyle on the property "Hidden" that was added in d9ef61fb546af443736057557552e3a95c569c11. Change-Id: I5b7b5b366120470a0f7d64b9b109b5c84c52b515
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unostyle.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index c8e7fa347031..6153eebb14ad 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2883,6 +2883,12 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::getPropertyDefaults( const uno::Seq
if ( !pEntry )
throw beans::UnknownPropertyException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pNames[i], static_cast < cppu::OWeakObject * > ( this ) );
+ if (pEntry->nWID >= RES_UNKNOWNATR_END)
+ {
+ // these cannot be in an item set, especially not the
+ // parent set, so the default value is void
+ continue;
+ }
if( pParentSet )
aSwMapProvider.GetPropertySet(nPropSetId)->getPropertyValue(pNames[i], *pParentSet, pRet[i]);
else if( pEntry->nWID != rSet.GetPool()->GetSlotId(pEntry->nWID) )