sc/source/ui/view/tabview.cxx |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 69e881925f8fb876f334541abe0c17fbaf3f8f1f
Author:     Aron Budea <aron.bu...@collabora.com>
AuthorDate: Mon Nov 25 03:20:02 2024 +1030
Commit:     Aron Budea <aron.bu...@collabora.com>
CommitDate: Mon Nov 25 08:45:52 2024 +0100

    tdf#163486 PVS V581 The conditional expressions of the 'if' statements 
situated
    
    ...alongside each other are identical.
    
    Started when a call inbetween was removed in
    e50f6c023926269f76cd73e085b7a246cd0f88fa.
    
    and
    V1053 Calling the 'EnableRTL' virtual function in the constructor
    ...may lead to unexpected result at runtime.
    
    and
    V1051 Consider checking for misprints. It's possible that the
    ...'nTopPos' should be checked here.
    
    V1028 Possible overflow. Consider casting operands of the...
    'nStartCol + 1' operator to the 'sal_Int64' type, not the result.
    
    Change-Id: Ided25ab6dc9e9d4a1c72a1b809de586c7b890ce0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177218
    Tested-by: Jenkins
    Reviewed-by: Aron Budea <aron.bu...@collabora.com>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index abc5528ff926..0761018fd089 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -79,7 +79,7 @@ ScCornerButton::ScCornerButton( vcl::Window* pParent, 
ScViewData* pData ) :
     Window( pParent, WinBits( 0 ) ),
     pViewData( pData )
 {
-    EnableRTL( false );
+    ScCornerButton::EnableRTL( false );
 }
 
 ScCornerButton::~ScCornerButton()
@@ -393,10 +393,7 @@ void ScTabView::DoResize( const Point& rOffset, const 
Size& rSize, bool bInner )
                 nBarY += nScrollBarSize;
 
             nSizeY -= nBarY;
-        }
 
-        if (bHScroll) // Scrollbars horizontal
-        {
             tools::Long nSizeLt = 0;       // left scroll bar
             tools::Long nSizeRt = 0;       // right scroll bar
             tools::Long nSizeSp = 0;       // splitter
@@ -2213,8 +2210,7 @@ void ScTabView::FreezeSplitters( bool bFreeze, 
SplitMethod eSplitMethod, SCCOLRO
             if (eOldV != SC_SPLIT_NONE)
             {
                 nTopPos = aViewData.GetPosY(SC_SPLIT_TOP);
-                if (aViewData.GetPosY(SC_SPLIT_BOTTOM) > nBottomPos)
-                    nBottomPos = aViewData.GetPosY(SC_SPLIT_BOTTOM);
+                nBottomPos = std::max(aViewData.GetPosY(SC_SPLIT_BOTTOM), 
nBottomPos);
             }
             aSplit = aViewData.GetScrPos(nPosX, nPosY, ePos, true);
             if (aSplit.Y() > 0)
@@ -3062,7 +3058,7 @@ void ScTabView::getRowColumnHeaders(const 
tools::Rectangle& rRectangle, tools::J
         if (nStartCol != nEndCol)
         {
             auto node = rJsonWriter.startStruct();
-            rJsonWriter.put("text", static_cast<sal_Int64>(nStartCol + 1));
+            rJsonWriter.put("text", static_cast<sal_Int64>(nStartCol) + 1);
             rJsonWriter.put("size", nTotalPixels);
             rJsonWriter.put("groupLevels", 
static_cast<sal_Int64>(nColGroupDepth));
         }

Reply via email to