diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-09-18 15:04:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-09-18 20:26:29 +0200 |
commit | b59177e5ced9dcbbc20bacee17a3f0f2b19a44c8 (patch) | |
tree | 4db3e888d66252facf05431b0a6d05fb5799e347 /sw | |
parent | abe551fbc98ece2c2616f1b3e802ea8aedd02933 (diff) |
cid#1515457 Unintended sign extension
Change-Id: I187001b55aef6e0751cb846fe927e4af07e1a018
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140119
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/porrst.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index a5a02a42e057..69d4725c23b8 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -793,13 +793,13 @@ void SwBookmarkPortion::Paint( const SwTextPaintInfo &rInf ) const // some |text| here // [[ ]] if (m_nStart > 1) - aNewPos.AdjustX(mnHalfCharWidth * -2 * (m_oColors.size() - 1)); + aNewPos.AdjustX(static_cast<tools::Long>(mnHalfCharWidth) * -2 * (m_oColors.size() - 1)); } else if ( m_nStart != 0 && m_nEnd != 0 ) // both end and start boundary marks: adjust them around the bookmark position // |te|xt| // ]] [[ - aNewPos.AdjustX(mnHalfCharWidth * -(2 * m_nEnd - 1 + m_nPoint) ); + aNewPos.AdjustX(static_cast<tools::Long>(mnHalfCharWidth) * -(2 * m_nEnd - 1 + m_nPoint) ); const_cast< SwTextPaintInfo& >( rInf ).SetPos( aNewPos ); |