Kaydet (Commit) d632f641 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

refactor out to limit scope: FN_UNO_FOLLOW_STYLE

Change-Id: I2f5f36fe9b9c7d1ee4289f2af268c25ebf8963d9
üst d9df090e
...@@ -1606,6 +1606,16 @@ void SwXStyle::SetPropertyValue<RES_PARATR_OUTLINELEVEL>(const SfxItemPropertySi ...@@ -1606,6 +1606,16 @@ void SwXStyle::SetPropertyValue<RES_PARATR_OUTLINELEVEL>(const SfxItemPropertySi
if(0 <= nLevel && nLevel <= MAXLEVEL) if(0 <= nLevel && nLevel <= MAXLEVEL)
o_rStyleBase.getNewBase()->GetCollection()->SetAttrOutlineLevel(nLevel); o_rStyleBase.getNewBase()->GetCollection()->SetAttrOutlineLevel(nLevel);
} }
template<>
void SwXStyle::SetPropertyValue<FN_UNO_FOLLOW_STYLE>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(!rValue.has<OUString>())
return;
const auto sValue(rValue.get<OUString>());
OUString aString;
SwStyleNameMapper::FillUIName(sValue, aString, m_rEntry.m_aPoolId, true);
o_rStyleBase.getNewBase()->SetFollow(aString);
}
void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& rBase) throw(beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception) void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& rBase) throw(beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
...@@ -1653,23 +1663,13 @@ void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const ...@@ -1653,23 +1663,13 @@ void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const
bDone = true; bDone = true;
break; break;
case RES_PARATR_OUTLINELEVEL: case RES_PARATR_OUTLINELEVEL:
{
SetPropertyValue<RES_PARATR_OUTLINELEVEL>(rEntry, rPropSet, rValue, rBase); SetPropertyValue<RES_PARATR_OUTLINELEVEL>(rEntry, rPropSet, rValue, rBase);
bDone = true; bDone = true;
break; break;
}
case FN_UNO_FOLLOW_STYLE: case FN_UNO_FOLLOW_STYLE:
{ SetPropertyValue<FN_UNO_FOLLOW_STYLE>(rEntry, rPropSet, rValue, rBase);
OUString sTmp;
aValue >>= sTmp;
OUString aString;
SwStyleNameMapper::FillUIName(sTmp, aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true ) ;
rBase.getNewBase()->SetFollow( aString );
bDone = true; bDone = true;
break; break;
}
case RES_PAGEDESC : case RES_PAGEDESC :
{ {
if (MID_PAGEDESC_PAGEDESCNAME != nMemberId) if (MID_PAGEDESC_PAGEDESCNAME != nMemberId)
......
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