summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/tools/multisel.hxx1
-rw-r--r--svtools/source/brwbox/brwbox1.cxx2
-rw-r--r--tools/source/memtools/multisel.cxx8
3 files changed, 10 insertions, 1 deletions
diff --git a/include/tools/multisel.hxx b/include/tools/multisel.hxx
index 42ae85d73d20..7e54c4db97fd 100644
--- a/include/tools/multisel.hxx
+++ b/include/tools/multisel.hxx
@@ -66,6 +66,7 @@ public:
void SetTotalRange( const Range& rTotRange );
void Insert( long nIndex, long nCount = 1 );
void Remove( long nIndex );
+ void Reset();
const Range& GetTotalRange() const { return aTotRange; }
long FirstSelected();
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index e78e654684ae..915e0e4fa644 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -1069,7 +1069,7 @@ void BrowseBox::Clear()
if(bMultiSelection)
{
assert(uRow.pSel);
- *uRow.pSel = MultiSelection();
+ uRow.pSel->Reset();
}
else
uRow.nSel = BROWSER_ENDOFSELECTION;
diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx
index bcb23368cb4a..903b1ff7a901 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -72,6 +72,14 @@ MultiSelection::MultiSelection():
{
}
+void MultiSelection::Reset()
+{
+ aTotRange = Range(0, -1);
+ bCurValid = false;
+ // clear the old sub selections
+ ImplClear();
+}
+
MultiSelection::MultiSelection( const MultiSelection& rOrig ) :
aTotRange(rOrig.aTotRange),
nSelCount(rOrig.nSelCount),