summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2020-06-23 08:45:54 +0300
committerMichael Meeks <michael.meeks@collabora.com>2020-07-04 09:12:32 +0100
commit0b15630ecc6719c03f6ec019fe4b506efd7f40fc (patch)
tree4028706fb82e9af1a92214182efb4d9321f29f14 /sw
parent41a99caa45705c11e4c792a5ee678c3c2338290d (diff)
tdf#83309: sw: do not create bullet with no char
On some machines (depending on fonts installed) creation of SwBulletPortion with bullet = \0 leads to drawing a bullet as a empty rectangle. Change-Id: I2826944f2278e8c9a6c740b11b69d2e4e5108158 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96711 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 5ed96c798679a1613b058a11b30cce4ba0ffd920) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96886 Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de> (cherry picked from commit 0453702ea9cf48fc5764bb7d2d6685e0234e09cb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97494 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/txtfld.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 1930bfa99b30..42d852a1e41e 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -654,11 +654,14 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con
lcl_setRedlineAttr( rInf, *pTextNd, pNumFnt );
// --> OD 2008-01-23 #newlistelevelattrs#
- pRet = new SwBulletPortion( rNumFormat.GetBulletChar(),
- pTextNd->GetLabelFollowedBy(),
- std::move(pNumFnt),
- bLeft, bCenter, nMinDist,
- bLabelAlignmentPosAndSpaceModeActive );
+ if (rNumFormat.GetBulletChar())
+ {
+ pRet = new SwBulletPortion(rNumFormat.GetBulletChar(),
+ pTextNd->GetLabelFollowedBy(),
+ std::move(pNumFnt),
+ bLeft, bCenter, nMinDist,
+ bLabelAlignmentPosAndSpaceModeActive);
+ }
}
else
{