summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-20 12:29:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-20 15:09:55 +0200
commit4f75a9310156de50e0c9ffd8d5bed9ee34651e50 (patch)
tree5d65cd3798fb6b70ed13a7a8ab44ac20d184e682 /tools
parent85f08e3e34bea01456eaf8989ac4f77d3900d5c5 (diff)
loplugin:unusedfields in tools
Change-Id: I4e26c4750f6ff6c246a25507cfed1a0b4e3c6b81 Reviewed-on: https://gerrit.libreoffice.org/40225 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/memtools/multisel.cxx29
1 files changed, 4 insertions, 25 deletions
diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx
index 903b1ff7a901..e6f6c0af4e84 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -67,8 +67,7 @@ MultiSelection::MultiSelection():
nCurIndex(0),
nSelCount(0),
bInverseCur(false),
- bCurValid(false),
- bSelectNew(false)
+ bCurValid(false)
{
}
@@ -83,8 +82,7 @@ void MultiSelection::Reset()
MultiSelection::MultiSelection( const MultiSelection& rOrig ) :
aTotRange(rOrig.aTotRange),
nSelCount(rOrig.nSelCount),
- bCurValid(rOrig.bCurValid),
- bSelectNew(false)
+ bCurValid(rOrig.bCurValid)
{
if ( bCurValid )
{
@@ -110,8 +108,7 @@ MultiSelection::MultiSelection( const Range& rRange ):
nCurIndex(0),
nSelCount(0),
bInverseCur(false),
- bCurValid(false),
- bSelectNew(false)
+ bCurValid(false)
{
}
@@ -344,8 +341,7 @@ void MultiSelection::Insert( long nIndex, long nCount )
// did we need to shift the sub selections?
if ( nSubSelPos < aSels.size() )
{ // did we insert an unselected into an existing sub selection?
- if ( !bSelectNew
- && aSels[ nSubSelPos ]->Min() != nIndex
+ if ( aSels[ nSubSelPos ]->Min() != nIndex
&& aSels[ nSubSelPos ]->IsInside(nIndex)
) { // split the sub selection
if ( nSubSelPos < aSels.size() ) {
@@ -359,21 +355,6 @@ void MultiSelection::Insert( long nIndex, long nCount )
aSels[ nSubSelPos ]->Min() = nIndex;
}
- // did we append an selected to an existing sub selection?
- else if ( bSelectNew
- && nSubSelPos > 0
- && aSels[ nSubSelPos ]->Max() == nIndex-1
- ) // expand the previous sub selection
- aSels[ nSubSelPos-1 ]->Max() += nCount;
-
- // did we insert an selected into an existing sub selection?
- else if ( bSelectNew
- && aSels[ nSubSelPos ]->Min() == nIndex
- ) { // expand the sub selection
- aSels[ nSubSelPos ]->Max() += nCount;
- ++nSubSelPos;
- }
-
// shift the sub selections behind the inserting position
for ( size_t nPos = nSubSelPos; nPos < aSels.size(); ++nPos )
{
@@ -384,8 +365,6 @@ void MultiSelection::Insert( long nIndex, long nCount )
bCurValid = false;
aTotRange.Max() += nCount;
- if ( bSelectNew )
- nSelCount += nCount;
}
void MultiSelection::Remove( long nIndex )