summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-10-14 16:55:50 +0200
committerMichael Stahl <michael.stahl@cib.de>2019-10-23 13:02:52 +0200
commit19a559b0ec9b806519c405651d6d2b2e14712b4a (patch)
tree7fcbcc282c71bf2e896ad6f797991a988338b93c
parentd426964c0d3e42058f93f764eab1257cf9d21d4c (diff)
sw: SwSubFont::GetTextSize_() assert on presumably dead code
Change-Id: Iced0776a719dbc7e9d19db7bd547c408caa6a04f Reviewed-on: https://gerrit.libreoffice.org/80913 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
-rw-r--r--sw/source/core/txtnode/swfont.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 4de9b2b2ee90..9816212aa690 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -1118,6 +1118,7 @@ Size SwSubFont::GetTextSize_( SwDrawTextInfo& rInf )
if (TextFrameIndex(1) == rInf.GetLen()
&& CH_TXT_ATR_FIELDSTART == rInf.GetText()[sal_Int32(rInf.GetIdx())])
{
+ assert(!"this is presumably dead code");
TextFrameIndex const nOldIdx(rInf.GetIdx());
TextFrameIndex const nOldLen(rInf.GetLen());
const OUString aNewText(CH_TXT_ATR_SUBST_FIELDSTART);
@@ -1131,6 +1132,7 @@ Size SwSubFont::GetTextSize_( SwDrawTextInfo& rInf )
else if (TextFrameIndex(1) == rInf.GetLen()
&& CH_TXT_ATR_FIELDEND == rInf.GetText()[sal_Int32(rInf.GetIdx())])
{
+ assert(!"this is presumably dead code");
TextFrameIndex const nOldIdx(rInf.GetIdx());
TextFrameIndex const nOldLen(rInf.GetLen());
const OUString aNewText(CH_TXT_ATR_SUBST_FIELDEND);