[Libreoffice-commits] core.git: include/svx svx/source

Henry Castro hcastro at collabora.com
Thu Jul 21 13:30:27 UTC 2016


 include/svx/svdotable.hxx      |    2 +-
 svx/source/svdraw/svdview.cxx  |    2 +-
 svx/source/table/svdotable.cxx |    8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 29c892dfbe608312b0c07aaf10af4bcf9cdedc55
Author: Henry Castro <hcastro at collabora.com>
Date:   Wed Jul 20 20:26:52 2016 -0400

    sd lok: fix hard to select a full table
    
    It requires a precise mouse down button in the rectangle border bounds
    to select a full table, so it has added a tolerance value.
    
    Change-Id: Ia8213ae452f93cd2faa957a50246638d1eb2198e
    Reviewed-on: https://gerrit.libreoffice.org/27356
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx
index b39a9c6..c627546 100644
--- a/include/svx/svdotable.hxx
+++ b/include/svx/svdotable.hxx
@@ -127,7 +127,7 @@ public:
     const sdr::table::TableStyleSettings& getTableStyleSettings() const;
     void setTableStyleSettings( const sdr::table::TableStyleSettings& rStyle );
 
-    TableHitKind CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_Int32& rnY ) const;
+    TableHitKind CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_Int32& rnY, const sal_uInt16 aTol = 0 ) const;
 
     void uno_lock();
     void uno_unlock();
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 41497aa..2196ab7 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -382,7 +382,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
         if( pTableObj )
         {
             sal_Int32 nX = 0, nY = 0;
-            switch( pTableObj->CheckTableHit( aLocalLogicPosition, nX, nY ) )
+            switch( pTableObj->CheckTableHit( aLocalLogicPosition, nX, nY, mnHitTolLog ) )
             {
                 case sdr::table::SDRTABLEHIT_CELL:
                     eHit = SDRHIT_CELL;
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 8657a59..a113dd3 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1051,7 +1051,7 @@ void SdrTableObj::setTableStyleSettings( const TableStyleSettings& rStyle )
 }
 
 
-TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_Int32& rnY ) const
+TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_Int32& rnY, const sal_uInt16 aTol ) const
 {
     if( !mpImpl.is() || !mpImpl->mxTable.is() )
         return SDRTABLEHIT_NONE;
@@ -1077,7 +1077,7 @@ TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_
         {
             while( rnX <= nColCount )
             {
-                if( nX <= 0 )
+                if( nX - aTol <= 0 )
                 {
                     bVrtHit = true;
                     break;
@@ -1097,7 +1097,7 @@ TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_
             rnX = nColCount;
             while( rnX >= 0 )
             {
-                if( nX <= 0 )
+                if( nX - aTol <= 0 )
                 {
                     bVrtHit = true;
                     break;
@@ -1122,7 +1122,7 @@ TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_
     {
         while( rnY <= nRowCount )
         {
-            if( nY <= 0 )
+            if( nY - aTol <= 0 )
             {
                 bHrzHit = true;
                 break;


More information about the Libreoffice-commits mailing list