summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-12-04 00:39:43 +0100
committerMichael Stahl <mstahl@redhat.com>2012-12-04 00:57:46 +0100
commitaf80ccd5b6206cfce63cf3f98781f09ed6d79f7f (patch)
treec237f6e5075dcca89fdab4e9b36926f36e534475 /sw
parent3d9bb8e82548b8cf35771d044c0175f6a7e8ccdb (diff)
SwXStyle::getPropertySetInfo: split world's stupidest static
... variable into 2. Change-Id: Ib0e2cdeb4ee6124b4ead532a168bb472dfdc6f7a
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unostyle.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 6153eebb14ad..e6f5abf2d1d6 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1522,13 +1522,16 @@ static uno::Reference< beans::XPropertySetInfo > lcl_getPropertySetInfo( SfxStyl
break;
case SFX_STYLE_FAMILY_PARA:
{
+ static uno::Reference< beans::XPropertySetInfo > xCondParaRef;
static uno::Reference< beans::XPropertySetInfo > xParaRef;
if(!xParaRef.is())
{
- sal_uInt16 nMapId = bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : PROPERTY_MAP_PARA_STYLE;
- xParaRef = aSwMapProvider.GetPropertySet(nMapId)->getPropertySetInfo();
+ xCondParaRef = aSwMapProvider.GetPropertySet(
+ PROPERTY_MAP_CONDITIONAL_PARA_STYLE)->getPropertySetInfo();
+ xParaRef = aSwMapProvider.GetPropertySet(
+ PROPERTY_MAP_PARA_STYLE)->getPropertySetInfo();
}
- xRet = xParaRef;
+ xRet = bIsConditional ? xCondParaRef : xParaRef;
}
break;
case SFX_STYLE_FAMILY_PAGE :