diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-11-23 20:07:20 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-11-24 00:16:17 +0100 |
commit | 651658d37bcb3f493942dd5d0b9a0d65c96f105c (patch) | |
tree | 9cbed9832f4ae41237437b9c708654964e4b7a67 /vcl | |
parent | 164d717530aff8d2581d0a2ff249f83aabb27502 (diff) |
ofz#53673 Integer-overflow LogicWidthToDeviceCoordinate takes Long anyway
Change-Id: I840ad3242ce434e841cd4159c2e7f0b146168138
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143193
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/outdev/text.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 3e86ab61d19f..7b9dde2a94a8 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1793,8 +1793,8 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Recta { std::unique_ptr<sal_Int32[]> const pCaretXArray(new sal_Int32[2 * aStr.getLength()]); /*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray.get(), 0, aStr.getLength() ); - sal_Int32 lc_x1 = pCaretXArray[2*nMnemonicPos]; - sal_Int32 lc_x2 = pCaretXArray[2*nMnemonicPos+1]; + tools::Long lc_x1 = pCaretXArray[2*nMnemonicPos]; + tools::Long lc_x2 = pCaretXArray[2*nMnemonicPos+1]; nMnemonicWidth = rTargetDevice.LogicWidthToDeviceCoordinate( std::abs(lc_x1 - lc_x2) ); Point aTempPos = rTargetDevice.LogicToPixel( aPos ); |