sw/source/core/unocore/unostyle.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit de9954f2a528867f80fda3a8596a87d478eeaaf0 Author: Michael Stahl <mst...@redhat.com> Date: Thu Apr 17 22:31:13 2014 +0200 fdo#77340: SwXStyle::setPropertyValue PageNumberOffset, PageDescName ... throw exceptions instead of setting values. (regression from 6e61ecd09679a66060f932835622821d39e92f01) Change-Id: Ibe704ebd294724035a87473f51b76421063f25d3 diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 57ec2ba..d5ac430 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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits