Resolves tdf#160324 - Larger hit area for col/row resize actions

Tentative solution made optional depending on experimental settings

Change-Id: I6d527d2b0d0de3b48f123b626ebf0b6ce60299a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167041
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index 98ebabb..bf97dbb 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -35,6 +35,7 @@
#include <tabview.hxx>
#include <viewdata.hxx>
#include <columnspanset.hxx>
#include <officecfg/Office/Common.hxx>

#define SC_DRAG_MIN     2

@@ -627,6 +628,9 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const tools

SCCOLROW ScHeaderControl::GetMousePos(const Point& rPos, bool& rBorder) const
{
    // #define nHitArea 5
    const int nHitArea( officecfg::Office::Common::Misc::ExperimentalMode::get() ? 5 : 2 );

    bool        bFound = false;
    SCCOLROW    nPos = GetPos();
    SCCOLROW    nHitNo = nPos;
@@ -650,7 +654,7 @@ SCCOLROW ScHeaderControl::GetMousePos(const Point& rPos, bool& rBorder) const
            nScrPos += GetEntrySize( nEntryNo - 1 ) * nLayoutSign;      //! GetHiddenCount() ??

        nDif = nMousePos - nScrPos;
        if (nDif >= -2 && nDif <= 2)
        if (nDif >= -nHitArea && nDif <= +nHitArea)
        {
            bFound = true;
            nHitNo=nEntryNo-1;