summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
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 /sw/source/filter/ww8
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 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx5
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx5
2 files changed, 7 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 292de278ff14..d689ab36acb6 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -669,7 +669,10 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, WW8_ANLV const &rAV,
// take only the very first character
if (rAV.cbTextBefore || rAV.cbTextAfter)
- rNum.SetBulletChar( sText[ 0 ] );
+ {
+ sal_Int32 nIndexUtf16 = 0;
+ rNum.SetBulletChar(sText.toString().iterateCodePoints(&nIndexUtf16));
+ }
else
rNum.SetBulletChar( 0x2190 );
}
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 3fbe650cb51f..6ce373838e23 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -622,7 +622,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, std::unique_ptr<SfxItemSet
sal_uInt8 aBits1(0);
SvxNumType nType(SVX_NUM_ARABIC);
SvxAdjust eAdj; // Alignment (Left/right/centered)
- sal_Unicode cBullet(0x2190); // default safe bullet
+ sal_UCS4 cBullet(0x2190); // default safe bullet
sal_Unicode cGrfBulletCP(USHRT_MAX);
@@ -832,7 +832,8 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, std::unique_ptr<SfxItemSet
if (style::NumberingType::CHAR_SPECIAL == nType)
{
- cBullet = !sNumString.isEmpty() ? sNumString[0] : 0x2190;
+ sal_Int32 nIndexUtf16 = 0;
+ cBullet = !sNumString.isEmpty() ? sNumString.iterateCodePoints(&nIndexUtf16) : 0x2190;
if (!cBullet) // unsave control code?
cBullet = 0x2190;