summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-04-17 22:31:13 +0200
committerMichael Stahl <mstahl@redhat.com>2014-04-17 22:36:50 +0200
commitde9954f2a528867f80fda3a8596a87d478eeaaf0 (patch)
tree606867275ab4cb699bf588f953a66d1292568ef5 /sw/source
parentb2a32d9b86b65ac89b00a200b2c8d22a5962494a (diff)
fdo#77340: SwXStyle::setPropertyValue PageNumberOffset, PageDescName
... throw exceptions instead of setting values. (regression from 6e61ecd09679a66060f932835622821d39e92f01) Change-Id: Ibe704ebd294724035a87473f51b76421063f25d3
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unostyle.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 57ec2ba3d945..d5ac4302367b 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1929,6 +1929,8 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
}
case RES_PAGEDESC :
{
+ if (MID_PAGEDESC_PAGEDESCNAME != nMemberId)
+ break;
// Sonderbehandlung RES_PAGEDESC
if(aValue.getValueType() != ::getCppuType((const OUString*)0))
throw lang::IllegalArgumentException();
@@ -1970,10 +1972,9 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
else
rStyleSet.Put(*pNewDesc);
- delete pNewDesc;
- bDone = true;
}
-
+ delete pNewDesc;
+ bDone = true;
break;
}
case FN_UNO_IS_AUTO_UPDATE:
@@ -2388,7 +2389,8 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{
// Sonderbehandlung RES_PAGEDESC
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rBase.GetItemSet().GetItemState( RES_PAGEDESC, true, &pItem ) )
+ if (MID_PAGEDESC_PAGEDESCNAME == nMemberId &&
+ SFX_ITEM_SET == rBase.GetItemSet().GetItemState(RES_PAGEDESC, true, &pItem))
{
const SwPageDesc* pDesc = ((const SwFmtPageDesc*)pItem)->GetPageDesc();
if(pDesc)