diff options
-rw-r--r-- | include/tools/multisel.hxx | 2 | ||||
-rw-r--r-- | tools/source/memtools/multisel.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/tools/multisel.hxx b/include/tools/multisel.hxx index 323ab4b355ee..3e06a3dce239 100644 --- a/include/tools/multisel.hxx +++ b/include/tools/multisel.hxx @@ -26,7 +26,7 @@ #include <vector> #include <set> -#define SFX_ENDOFSELECTION SAL_MIN_INT32 +#define SFX_ENDOFSELECTION (-1) class SAL_WARN_UNUSED TOOLS_DLLPUBLIC MultiSelection { diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx index 1928a6913e5a..b63cabd01cdb 100644 --- a/tools/source/memtools/multisel.cxx +++ b/tools/source/memtools/multisel.cxx @@ -238,7 +238,7 @@ void MultiSelection::Select( const Range& rIndexRange, bool bSelect ) DBG_ASSERT(aTotRange.IsInside(nTmpMin), "selected index out of range" ); // replace whole selection? - if( nTmpMin <= nCurMin && nTmpMax >= nCurMax ) + if( aSels.empty() || (nTmpMin <= nCurMin && nTmpMax >= nCurMax ) ) { ImplClear(); if ( bSelect ) |