Kaydet (Commit) de9954f2 authored tarafından Michael Stahl's avatar Michael Stahl

fdo#77340: SwXStyle::setPropertyValue PageNumberOffset, PageDescName

... throw exceptions instead of setting values.

(regression from 6e61ecd0)

Change-Id: Ibe704ebd294724035a87473f51b76421063f25d3
üst b2a32d9b
...@@ -1929,6 +1929,8 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, ...@@ -1929,6 +1929,8 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
} }
case RES_PAGEDESC : case RES_PAGEDESC :
{ {
if (MID_PAGEDESC_PAGEDESCNAME != nMemberId)
break;
// Sonderbehandlung RES_PAGEDESC // Sonderbehandlung RES_PAGEDESC
if(aValue.getValueType() != ::getCppuType((const OUString*)0)) if(aValue.getValueType() != ::getCppuType((const OUString*)0))
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();
...@@ -1970,10 +1972,9 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, ...@@ -1970,10 +1972,9 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
else else
rStyleSet.Put(*pNewDesc); rStyleSet.Put(*pNewDesc);
}
delete pNewDesc; delete pNewDesc;
bDone = true; bDone = true;
}
break; break;
} }
case FN_UNO_IS_AUTO_UPDATE: case FN_UNO_IS_AUTO_UPDATE:
...@@ -2388,7 +2389,8 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, ...@@ -2388,7 +2389,8 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{ {
// Sonderbehandlung RES_PAGEDESC // Sonderbehandlung RES_PAGEDESC
const SfxPoolItem* pItem; 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(); const SwPageDesc* pDesc = ((const SwFmtPageDesc*)pItem)->GetPageDesc();
if(pDesc) if(pDesc)
......
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