summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-21 20:44:04 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-22 12:52:28 +0200
commitbe8a33c0f03b83357d2ae37dda6bf65313267cea (patch)
tree83aa385e23e1f4deda8858c68d59d61c2a6342cc /sw/source/core/unocore
parent17ca11125f1639d87d31237af822767dd38d31e7 (diff)
tdf#132970 SMP bullets mangled
working: a) bullet preview b) writer rendering c) save to odt a) load from odt Change-Id: I2f85576389fe4f0437f81799c14dfd98c8c40b2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103129 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/unocore')
-rw-r--r--sw/source/core/unocore/unosett.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 9664ff2ad735..26905258e56b 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1411,14 +1411,16 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat
{
if(SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType())
{
+ sal_UCS4 cBullet = rFormat.GetBulletChar();
+
//BulletId
- nINT16 = rFormat.GetBulletChar();
+ nINT16 = cBullet;
aPropertyValues.push_back(comphelper::makePropertyValue("BulletId", nINT16));
const vcl::Font* pFont = rFormat.GetBulletFont();
//BulletChar
- aUString = OUString(rFormat.GetBulletChar());
+ aUString = OUString(&cBullet, 1);
aPropertyValues.push_back(comphelper::makePropertyValue("BulletChar", aUString));
//BulletFontName
@@ -1790,18 +1792,19 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
{
OUString aChar;
rProp.Value >>= aChar;
- if(aChar.getLength() == 1)
- {
- aFormat.SetBulletChar(aChar.toChar());
- }
- else if(aChar.isEmpty())
+ if (aChar.isEmpty())
{
// If w:lvlText's value is null - set bullet char to zero
aFormat.SetBulletChar(u'\0');
}
else
{
- bWrongArg = true;
+ sal_Int32 nIndexUtf16 = 0;
+ sal_UCS4 cBullet = aChar.iterateCodePoints(&nIndexUtf16);
+ if (aChar.getLength() == nIndexUtf16)
+ aFormat.SetBulletChar(cBullet);
+ else
+ bWrongArg = true;
}
}
else if (rProp.Name == UNO_NAME_GRAPHIC)