sw/source/core/text/porrst.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b59177e5ced9dcbbc20bacee17a3f0f2b19a44c8
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun Sep 18 15:04:07 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Sep 18 20:26:29 2022 +0200

    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 <caol...@redhat.com>

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 );
 

Reply via email to