diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2016-01-02 03:52:09 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2016-01-15 21:42:41 +0100 |
commit | a2648b003babfb3121ad358465423885ded368c1 (patch) | |
tree | 339f92ebd9c1e65ca43ac635dde5fd290549d1de | |
parent | 4208bf7e4a4a64162c4e019de6de4359470290d1 (diff) |
refactor out to limit scope: FN_UNO_STYLE_INTEROP_GRAB_BAG
Change-Id: I0d85021ded0b33d9c2c8d2454ad737842323a099
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index c5348656dd02..d94b319d5e8c 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1425,6 +1425,13 @@ void SwXStyle::SetPropertyValue<FN_UNO_HIDDEN>(const SfxItemPropertySimpleEntry& } lcl_SetDefaultWay(rEntry, rPropSet, rValue, o_rStyleBase); } +template<> +void SwXStyle::SetPropertyValue<FN_UNO_STYLE_INTEROP_GRAB_BAG>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase) +{ + o_rStyleBase.getNewBase()->GetItemSet(); + o_rStyleBase.getNewBase()->SetGrabBagItem(rValue); + lcl_SetDefaultWay(rEntry, rPropSet, rValue, o_rStyleBase); +} static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, @@ -1478,15 +1485,9 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, switch(rEntry.nWID) { case FN_UNO_HIDDEN: + case FN_UNO_STYLE_INTEROP_GRAB_BAG: assert(false); break; - case FN_UNO_STYLE_INTEROP_GRAB_BAG: - { - rBase.getNewBase()->GetItemSet(); - rBase.getNewBase()->SetGrabBagItem(rValue); - } - break; - case XATTR_FILLGRADIENT: case XATTR_FILLHATCH: case XATTR_FILLBITMAP: @@ -2033,6 +2034,8 @@ void SAL_CALL SwXStyle::SetPropertyValues_Impl( { case FN_UNO_HIDDEN: SetPropertyValue<FN_UNO_HIDDEN>(*pEntry, *pPropSet, pValues[nProp], aBaseImpl); + case FN_UNO_STYLE_INTEROP_GRAB_BAG: + SetPropertyValue<FN_UNO_STYLE_INTEROP_GRAB_BAG>(*pEntry, *pPropSet, pValues[nProp], aBaseImpl); default: lcl_SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl, m_pBasePool, m_pDoc, m_rEntry.m_eFamily); } |