summaryrefslogtreecommitdiff
path: root/cui/source
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 /cui/source
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 'cui/source')
-rw-r--r--cui/source/dialogs/cuicharmap.cxx3
-rw-r--r--cui/source/tabpages/numpages.cxx7
2 files changed, 6 insertions, 4 deletions
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 13d3c8e7658b..5042a2079210 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -209,7 +209,8 @@ void SvxCharacterMap::SetChar( sal_UCS4 c )
sal_UCS4 SvxCharacterMap::GetChar() const
{
- return m_aShowChar.GetText().toChar();
+ sal_Int32 nIndexUtf16 = 0;
+ return m_aShowChar.GetText().iterateCodePoints(&nIndexUtf16);
}
void SvxCharacterMap::DisableFontSelection()
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 6086cb0d0679..141021652ac4 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1928,7 +1928,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, BulletHdl_Impl, weld::Button&, void)
sal_uInt16 nMask = 1;
const vcl::Font* pFmtFont = nullptr;
bool bSameBullet = true;
- sal_Unicode cBullet = 0;
+ sal_UCS4 cBullet = 0;
bool bFirst = true;
for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
@@ -1971,7 +1971,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, BulletHdl_Impl, weld::Button&, void)
{
SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
aNumFmt.SetBulletFont(&aActBulletFont);
- aNumFmt.SetBulletChar( static_cast<sal_Unicode>(aMap.GetChar()) );
+ aNumFmt.SetBulletChar(aMap.GetChar());
pActNum->SetLevel(i, aNumFmt);
}
_nMask <<= 1;
@@ -2164,7 +2164,8 @@ static long lcl_DrawBullet(VirtualDevice* pVDev,
aBulletColor.Invert();
aFont.SetColor(aBulletColor);
pVDev->SetFont( aFont );
- OUString aText(rFmt.GetBulletChar());
+ sal_UCS4 cChar = rFmt.GetBulletChar();
+ OUString aText(&cChar, 1);
long nY = nYStart;
nY -= ((aTmpSize.Height() - rSize.Height())/ 2);
pVDev->DrawText( Point(nXStart, nY), aText );