summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-22 10:34:21 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-22 18:38:44 +0200
commit8898955456ce6a6dc0ce9401ee05ce9d04e13668 (patch)
tree64abb308b5d33f2c536106fff8d021141879502a /svx
parent4e4de8935f38b781374ca34408bd3c57c3cdb69f (diff)
Related: tdf#132970 handle more places with potentially utf16 bullets
Change-Id: Iac6b319700d610b5a1debff0a633172b2411c40e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103161 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/nbdtmg.cxx26
1 files changed, 16 insertions, 10 deletions
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 3d995028bb99..b36e58b6fad1 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -282,7 +282,7 @@ sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLe
return sal_uInt16(0xFFFF);
const SvxNumberFormat& aFmt(aNum.GetLevel(nActLv));
- sal_Unicode cChar = aFmt.GetBulletChar();
+ sal_UCS4 cChar = aFmt.GetBulletChar();
for(sal_uInt16 i = nFromIndex; i < DEFAULT_BULLET_TYPES; i++)
{
if ( (cChar == pActualBullets[i]->cBulletChar) ||
@@ -310,7 +310,7 @@ void BulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI
return;
SvxNumberFormat aFmt(aNum.GetLevel(nActLv));
- sal_Unicode cChar = aFmt.GetBulletChar();
+ sal_UCS4 cChar = aFmt.GetBulletChar();
const vcl::Font* pFont = aFmt.GetBulletFont();
if ( nIndex >= DEFAULT_BULLET_TYPES )
return;
@@ -325,7 +325,7 @@ void BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
{
if ( nIndex >= DEFAULT_BULLET_TYPES )
return;
- sal_Unicode cChar = pActualBullets[nIndex]->cBulletChar;
+ sal_UCS4 cChar = pActualBullets[nIndex]->cBulletChar;
const vcl::Font& rActBulletFont = pActualBullets[nIndex]->aFont;
sal_uInt16 nMask = 1;
@@ -337,7 +337,7 @@ void BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
SvxNumberFormat aFmt(aNum.GetLevel(i));
aFmt.SetNumberingType( SVX_NUM_CHAR_SPECIAL );
aFmt.SetBulletFont(&rActBulletFont);
- aFmt.SetBulletChar(cChar );
+ aFmt.SetBulletChar(cChar);
aFmt.SetCharFormatName(sBulletCharFormatName);
aFmt.SetPrefix( "" );
aFmt.SetSuffix( "" );
@@ -648,8 +648,11 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m
sal_Int16 eNumType = aFmt.GetNumberingType();
if( eNumType == SVX_NUM_CHAR_SPECIAL)
{
- sal_Unicode cChar = aFmt.GetBulletChar();
- sal_Unicode ccChar = _pSet->sBulletChar[0];
+ sal_UCS4 cChar = aFmt.GetBulletChar();
+
+ sal_Int32 nIndexUtf16 = 0;
+ sal_UCS4 ccChar = _pSet->sBulletChar.iterateCodePoints(&nIndexUtf16);
+
if ( !((cChar == ccChar) &&
_pSet->eLabelFollowedBy == aFmt.GetLabelFollowedBy() &&
_pSet->nTabValue == aFmt.GetListtabPos() &&
@@ -726,8 +729,8 @@ void OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI
if( eNumType == SVX_NUM_CHAR_SPECIAL)
{
- sal_Unicode cChar = aFmt.GetBulletChar();
- OUString sChar(cChar);
+ sal_UCS4 cChar = aFmt.GetBulletChar();
+ OUString sChar(&cChar, 1);
_pSet->sBulletChar = sChar;
if ( aFmt.GetBulletFont() )
_pSet->sBulletFont = aFmt.GetBulletFont()->GetFamilyName();
@@ -822,9 +825,12 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
}else
aFmt.SetBulletFont( &rActBulletFont );
- sal_Unicode cChar = 0;
+ sal_UCS4 cChar = 0;
if( !pLevelSettings->sBulletChar.isEmpty() )
- cChar = pLevelSettings->sBulletChar[0];
+ {
+ sal_Int32 nIndexUtf16 = 0;
+ cChar = pLevelSettings->sBulletChar.iterateCodePoints(&nIndexUtf16);
+ }
if( AllSettings::GetLayoutRTL() )
{
if( 0 == i && cChar == BulletsTypeMgr::aDynamicBulletTypes[5] )