summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2016-03-11 23:47:13 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2016-03-17 23:54:43 +0100
commit150c1dcab007dd8acc1551791f42eef692f9e531 (patch)
treedf5802569828c18d9486ef979bb5dfb50e949a29
parent6abe9cfa924236b9915888470723fec612e1a16d (diff)
refactor out to limit scope: FN_UNO_FOLLOW_STYLE
Change-Id: I01ad0a3e88303f3286bc1bd7db5eaba1db3af813
-rw-r--r--sw/source/core/unocore/unostyle.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 95184246dd38..ce6573820e96 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2027,6 +2027,14 @@ uno::Any SwXStyle::GetStyleProperty<RES_PARATR_OUTLINELEVEL>(const SfxItemProper
return uno::makeAny<sal_Int16>(rBase.getNewBase()->GetCollection()->GetAttrOutlineLevel());
}
+template<>
+uno::Any SwXStyle::GetStyleProperty<FN_UNO_FOLLOW_STYLE>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
+ throw(uno::RuntimeException, std::exception)
+{
+ OUString aString;
+ SwStyleNameMapper::FillProgName(rBase.getNewBase()->GetFollow(), aString, lcl_GetSwEnumFromSfxEnum(GetFamily()), true);
+ return uno::makeAny(aString);
+}
uno::Any SwXStyle::lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
throw(uno::RuntimeException, std::exception)
{
@@ -2075,10 +2083,7 @@ uno::Any SwXStyle::lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry
}
case FN_UNO_FOLLOW_STYLE:
{
- OUString aString;
- SwStyleNameMapper::FillProgName(rBase.getNewBase()->GetFollow(), aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true);
- aRet <<= aString;
- break;
+ return GetStyleProperty<FN_UNO_FOLLOW_STYLE>(rEntry, rPropSet, rBase);
}
case RES_PAGEDESC :
{