[Libreoffice-commits] core.git: sc/source

Andrea Gelmini (via logerrit) logerrit at kemper.freedesktop.org
Sun Aug 23 12:53:38 UTC 2020


 sc/source/ui/inc/preview.hxx  |    2 +-
 sc/source/ui/view/preview.cxx |   24 ++++++++++++------------
 2 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 594790152320757723a5e622a041316d27360b09
Author:     Andrea Gelmini <andrea.gelmini at gelma.net>
AuthorDate: Sat Aug 22 18:52:05 2020 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sun Aug 23 14:53:02 2020 +0200

    Fix typo in code
    
    Change-Id: I71d4c3c0d89841e5c7eecc2126ac4f79a9d9632c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101203
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
index 69133b9e9c1b..5459718f02b7 100644
--- a/sc/source/ui/inc/preview.hxx
+++ b/sc/source/ui/inc/preview.hxx
@@ -83,7 +83,7 @@ private:
     std::vector<long> mvRight;
     long            nLeftPosition;
     long            mnScale;
-    SCCOL           nColNumberButttonDown;
+    SCCOL           nColNumberButtonDown;
     Point           aButtonDownChangePoint;
     Point           aButtonDownPt;
     Point           aButtonUpPt;
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 09f3da645d41..207d098ca8c5 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -119,7 +119,7 @@ ScPreview::ScPreview( vcl::Window* pParent, ScDocShell* pDocSh, ScPreviewShell*
     mbHasEmptyRangeTable(false),
     nLeftPosition( 0 ),
     mnScale( 0 ),
-    nColNumberButttonDown( 0 ),
+    nColNumberButtonDown( 0 ),
     nHeaderHeight ( 0 ),
     nFooterHeight ( 0 )
 {
@@ -1016,7 +1016,7 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
     {
         if( aNowPt.X() < mvRight[i] + 2 && aNowPt.X() > mvRight[i] - 2 )
         {
-            nColNumberButttonDown = i;
+            nColNumberButtonDown = i;
             break;
         }
     }
@@ -1024,10 +1024,10 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
         return;
 
     SetMapMode( aMMMode );
-    if( nColNumberButttonDown == aPageArea.aStart.Col() )
+    if( nColNumberButtonDown == aPageArea.aStart.Col() )
         DrawInvert( PixelToLogic( Point( nLeftPosition, 0 ),aMMMode ).X() ,PointerStyle::HSplit );
     else
-        DrawInvert( PixelToLogic( Point( mvRight[ nColNumberButttonDown-1 ], 0 ),aMMMode ).X() ,PointerStyle::HSplit );
+        DrawInvert( PixelToLogic( Point( mvRight[ nColNumberButtonDown-1 ], 0 ),aMMMode ).X() ,PointerStyle::HSplit );
 
     DrawInvert( aButtonDownChangePoint.X(), PointerStyle::HSplit );
     bColRulerMove = true;
@@ -1241,27 +1241,27 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
             if( aButtonDownPt.X() == aButtonUpPt.X() )
             {
                 bMoveRulerAction = false;
-                if( nColNumberButttonDown == aPageArea.aStart.Col() )
+                if( nColNumberButtonDown == aPageArea.aStart.Col() )
                     DrawInvert( PixelToLogic( Point( nLeftPosition, 0 ),aMMMode ).X() ,PointerStyle::HSplit );
                 else
-                    DrawInvert( PixelToLogic( Point( mvRight[ nColNumberButttonDown-1 ], 0 ),aMMMode ).X() ,PointerStyle::HSplit );
+                    DrawInvert( PixelToLogic( Point( mvRight[ nColNumberButtonDown-1 ], 0 ),aMMMode ).X() ,PointerStyle::HSplit );
                 DrawInvert( aButtonUpPt.X(), PointerStyle::HSplit );
             }
             if( bMoveRulerAction )
             {
                 long  nNewColWidth = 0;
-                std::vector<sc::ColRowSpan> aCols(1, sc::ColRowSpan(nColNumberButttonDown,nColNumberButttonDown));
+                std::vector<sc::ColRowSpan> aCols(1, sc::ColRowSpan(nColNumberButtonDown,nColNumberButtonDown));
 
                 if( !bLayoutRTL )
                 {
-                    nNewColWidth = static_cast<long>( PixelToLogic( Point( rMEvt.GetPosPixel().X() - mvRight[ nColNumberButttonDown ], 0), aMMMode ).X() / HMM_PER_TWIPS ) * 100 / mnScale;
-                    nNewColWidth += pDocShell->GetDocument().GetColWidth( nColNumberButttonDown, nTab );
+                    nNewColWidth = static_cast<long>( PixelToLogic( Point( rMEvt.GetPosPixel().X() - mvRight[ nColNumberButtonDown ], 0), aMMMode ).X() / HMM_PER_TWIPS ) * 100 / mnScale;
+                    nNewColWidth += pDocShell->GetDocument().GetColWidth( nColNumberButtonDown, nTab );
                 }
                 else
                 {
 
-                    nNewColWidth = static_cast<long>( PixelToLogic( Point( mvRight[ nColNumberButttonDown ] - rMEvt.GetPosPixel().X(), 0), aMMMode ).X() / HMM_PER_TWIPS ) * 100 / mnScale;
-                    nNewColWidth += pDocShell->GetDocument().GetColWidth( nColNumberButttonDown, nTab );
+                    nNewColWidth = static_cast<long>( PixelToLogic( Point( mvRight[ nColNumberButtonDown ] - rMEvt.GetPosPixel().X(), 0), aMMMode ).X() / HMM_PER_TWIPS ) * 100 / mnScale;
+                    nNewColWidth += pDocShell->GetDocument().GetColWidth( nColNumberButtonDown, nTab );
                 }
 
                 if( nNewColWidth >= 0 )
@@ -1349,7 +1349,7 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
         {
             bOnColRulerChange = true;
             if( !rMEvt.GetButtons() && GetPointer() == PointerStyle::HSplit )
-                nColNumberButttonDown = i;
+                nColNumberButtonDown = i;
             break;
         }
     }


More information about the Libreoffice-commits mailing list