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

Jan Holesovsky kendy at collabora.com
Thu Mar 17 19:04:15 UTC 2016


 sc/source/ui/inc/tabview.hxx   |   10 ++++++----
 sc/source/ui/view/tabview3.cxx |   16 ++++++----------
 2 files changed, 12 insertions(+), 14 deletions(-)

New commits:
commit 161b58558a76af99c00b8fe96c188657c4b9ef56
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Mar 17 19:53:40 2016 +0100

    sc: Improve documentation, and a cosmetic change.
    
    Change-Id: Id99b963602816710a2c6767795343a9518833b43

diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 508af34..da55593 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -476,19 +476,21 @@ public:
     void            MarkRows();
 
     /**
-     * @brief Called to select a full column
+     * Called to select the specified full column.
      *
      * @param nCol: Column number to do operation on
-     * @param nModifier:
+     * @param nModifier: 0, KEY_SHIFT, KEY_MOD1, KEY_SHIFT | KEY_MOD1
      */
+
     void            MarkColumns(SCCOL nCol, sal_Int16 nModifier);
     /**
-     * @brief Called to select a full row
+     * Called to select the specified full row.
      *
      * @param nRow: Row number to do operation on
-     * @param nModifier:
+     * @param nModifier: 0, KEY_SHIFT, KEY_MOD1, KEY_SHIFT | KEY_MOD1
      */
     void            MarkRows(SCROW nRow, sal_Int16 nModifier);
+
     void            MarkDataArea( bool bIncludeCursor = true );
     void            MarkMatrixFormula();
     void            Unmark();
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 4b09b0e..c5991f1 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1416,12 +1416,10 @@ void ScTabView::MarkColumns(SCCOL nCol, sal_Int16 nModifier)
     SCTAB nTab = aViewData.GetTabNo();
     bool bTestNeg = true;
 
-    switch( nModifier )
+    if ((nModifier & KEY_SHIFT) == KEY_SHIFT)
     {
-        case KEY_SHIFT:
-        case KEY_MOD1 + KEY_SHIFT:
-            nStartCol = aViewData.GetCurX();
-            bTestNeg = false;
+        nStartCol = aViewData.GetCurX();
+        bTestNeg = false;
     }
 
     DoneBlockMode( nModifier != 0 );
@@ -1437,12 +1435,10 @@ void ScTabView::MarkRows(SCROW nRow, sal_Int16 nModifier)
     SCTAB nTab = aViewData.GetTabNo();
     bool bTestNeg = true;
 
-    switch ( nModifier )
+    if ((nModifier & KEY_SHIFT) == KEY_SHIFT)
     {
-        case KEY_SHIFT:
-        case KEY_MOD1 + KEY_SHIFT:
-            nStartRow = aViewData.GetCurY();
-            bTestNeg = false;
+        nStartRow = aViewData.GetCurY();
+        bTestNeg = false;
     }
 
     DoneBlockMode( nModifier != 0 );


More information about the Libreoffice-commits mailing list