summaryrefslogtreecommitdiff
path: root/svx/source/sidebar
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-19 13:18:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-05 09:39:11 +0200
commit14cfff500e93f0d6cbf8412065feea85c01ea81d (patch)
tree76e3fb8fbf2b0d8a12c8406d8cf994ea6a37aaff /svx/source/sidebar
parentd924ce30e0ca260682bd2aed192b8b1b2ca3e7c0 (diff)
Pass context and resource string down to boost::locale separately
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/sidebar')
-rw-r--r--svx/source/sidebar/nbdtmg.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index fbbc3b3da03a..f53ebb677a0a 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -263,7 +263,8 @@ void BulletsTypeMgr::Init()
pActualBullets[i] = new BulletsSettings;
pActualBullets[i]->cBulletChar = aDefaultBulletTypes[i];
pActualBullets[i]->aFont = rActBulletFont;
- pActualBullets[i]->sDescription = SvxResId( RID_SVXSTR_BULLET_DESCRIPTION_0 + i );
+ OString id = OString::Concat(RID_SVXSTR_BULLET_DESCRIPTION_0.mpId) + OString::number(i);
+ pActualBullets[i]->sDescription = SvxResId( TranslateId(RID_SVXSTR_BULLET_DESCRIPTION_0.mpContext, id.getStr()) );
}
}
sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex)
@@ -380,7 +381,7 @@ NumberingTypeMgr::~NumberingTypeMgr()
{
}
-static const char* RID_SVXSTR_SINGLENUM_DESCRIPTIONS[] =
+const TranslateId RID_SVXSTR_SINGLENUM_DESCRIPTIONS[] =
{
RID_SVXSTR_SINGLENUM_DESCRIPTION_0,
RID_SVXSTR_SINGLENUM_DESCRIPTION_1,
@@ -588,7 +589,8 @@ void OutlineTypeMgr::Init()
{
pOutlineSettingsArrs[ nItem ] = new OutlineSettings_Impl;
OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[ nItem ];
- pItemArr->sDescription = SvxResId( RID_SVXSTR_OUTLINENUM_DESCRIPTION_0 + nItem );
+ OString id = OString::Concat(RID_SVXSTR_OUTLINENUM_DESCRIPTION_0.mpId) + OString::number(nItem);
+ pItemArr->sDescription = SvxResId( TranslateId(RID_SVXSTR_OUTLINENUM_DESCRIPTION_0.mpContext, id.getStr()) );
pItemArr->pNumSettingsArr = new NumSettingsArr_Impl;
Reference<XIndexAccess> xLevel = aOutlineAccess.getConstArray()[nItem];
for(sal_Int32 nLevel = 0; nLevel < xLevel->getCount() && nLevel < 5; nLevel++)