summaryrefslogtreecommitdiff
path: root/sw/source/core/text/porlin.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-06-09 09:09:16 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-06-09 10:07:45 +0200
commit6fdd0a3f8b3448a9a246496191908c92156cc38b (patch)
tree9b0790b22c79d290f7b1f7aebb9bb8b81cb7d404 /sw/source/core/text/porlin.cxx
parent214e6b15de5f0704b063310ca667d8798b272a79 (diff)
sw: allow the width of a line portion to be larger than 65536 twips
The line portion width can be quite large if the line contains an as-char image. Found by asking -fsanitize=implicit-unsigned-integer-truncation -fsanitize=implicit-signed-integer-truncation to flag the problematic conversions. Change-Id: I303b9c71dcd979d79b9c9aee5283b268cc4e3b8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116835 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/text/porlin.cxx')
-rw-r--r--sw/source/core/text/porlin.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index e0a157d9d579..c5dc41ff3db5 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -290,7 +290,7 @@ void SwLinePortion::Move( SwTextPaintInfo &rInf )
rInf.IncKanaIdx();
}
if( rInf.IsRotated() )
- rInf.Y( rInf.Y() + ( bB2T ? -PrtWidth() : PrtWidth() ) );
+ rInf.Y( rInf.Y() + ( bB2T ? -o3tl::narrowing<SwTwips>(PrtWidth()) : o3tl::narrowing<SwTwips>(PrtWidth()) ) );
else if ( bCounterDir )
rInf.X( rInf.X() - PrtWidth() );
else