sw/source/core/text/itrform2.cxx |   24 +++---------------------
 1 file changed, 3 insertions(+), 21 deletions(-)

New commits:
commit 0499fc5619bf540afd1caea8ebf40cecff0b0014
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Thu Feb 1 09:37:57 2018 +0100

    Remove obsolete overflow check
    
    ...which had originally been added with 
766d2b65e3799fb66099c94837280cb9102219a6
    "INTEGRATION: CWS geordi2q10: #111934#: join CWS os21" as
    
    -    rInf.Left( KSHORT(Left()) );
    -    rInf.Right( KSHORT(Right()) );
    -    rInf.First( short(FirstLeft()) );
    +
    +    // Handle overflows:
    +    SwTwips nTmpLeft = Left();
    +    SwTwips nTmpRight = Right();
    +    SwTwips nTmpFirst = FirstLeft();
    +
    +    if ( nTmpLeft > USHRT_MAX ||
    +         nTmpRight > USHRT_MAX ||
    +         nTmpFirst > USHRT_MAX )
    +    {
    +        SWRECTFN( rInf.GetTxtFrm() )
    +        nTmpLeft = (rInf.GetTxtFrm()->Frm().*fnRect->fnGetLeft)();
    +        nTmpRight = (rInf.GetTxtFrm()->Frm().*fnRect->fnGetRight)();
    +        nTmpFirst = nTmpLeft;
    +    }
    +
    +    rInf.Left(  KSHORT( nTmpLeft  ) );
    +    rInf.Right( KSHORT( nTmpRight ) );
    +    rInf.First( KSHORT( nTmpFirst ) );
    
    But later 2a2f9a30dc67bb64860333b83b0489bc610da48f "INTEGRATION: CWS
    swqbugfixes10: #i34348# Underflow with negative numbering indent values" had
    changed the SwTxtFormatInfo members from KSHORT to SwTwips, presumably 
obviating
    the need for such an overflow check.
    
    Change-Id: Id622d2bbc280e3d825981356e19c7fe9ed23fc5b
    Reviewed-on: https://gerrit.libreoffice.org/49077
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index d29110519974..3a7813790673 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1836,27 +1836,9 @@ void SwTextFormatter::FeedInf( SwTextFormatInfo &rInf ) 
const
     rInf.SetRoot( m_pCurr );
     rInf.SetLineStart( m_nStart );
     rInf.SetIdx( m_nStart );
-
-    // Handle overflows:
-    // i#34348 Changed type from sal_uInt16 to SwTwips to enable
-    // the text formatting to cope with certain numbering indent values
-    SwTwips nTmpLeft = Left();
-    SwTwips nTmpRight = Right();
-    SwTwips nTmpFirst = FirstLeft();
-
-    if ( nTmpLeft > USHRT_MAX ||
-         nTmpRight > USHRT_MAX ||
-         nTmpFirst > USHRT_MAX )
-    {
-        SwRectFnSet aRectFnSet(rInf.GetTextFrame());
-        nTmpLeft = aRectFnSet.GetLeft(rInf.GetTextFrame()->getFrameArea());
-        nTmpRight = aRectFnSet.GetRight(rInf.GetTextFrame()->getFrameArea());
-        nTmpFirst = nTmpLeft;
-    }
-
-    rInf.Left(  nTmpLeft  );
-    rInf.Right( nTmpRight );
-    rInf.First( nTmpFirst );
+    rInf.Left( Left() );
+    rInf.Right( Right() );
+    rInf.First( FirstLeft() );
 
     rInf.RealWidth( sal_uInt16(rInf.Right() - GetLeftMargin()) );
     rInf.Width( rInf.RealWidth() );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to