From 554ff8ef0f734cbc33644a075c83cc840fb770ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 12 Dec 2016 10:02:23 +0000 Subject: [PATCH] coverity#1371265 Missing move assignment operator Change-Id: I5b7c6992e92e4d096b8230774ed8f4bfaaad5831 --- include/tools/multisel.hxx | 1 + svtools/source/brwbox/brwbox1.cxx | 2 +- tools/source/memtools/multisel.cxx | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) 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),