summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-03 09:08:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-03 10:38:42 +0100
commit1b666235f6b0b0f0b13f473bf3b639f4f5f0b12f (patch)
tree27d954769f796bc5fcac78c51447b9d2336f5a5e /tools
parent15d9087ff1e495e234b2cf073329c3358abb4dc0 (diff)
loplugin:singlevalfields improve copy constructor check
Change-Id: Id1e7fbecd9e9f816553d2e678c3f1b7890fc4db8 Reviewed-on: https://gerrit.libreoffice.org/47293 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, 8 insertions, 21 deletions
diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx
index ae26b2e3cf38..d53ce8004e9c 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -66,7 +66,6 @@ MultiSelection::MultiSelection():
nCurSubSel(0),
nCurIndex(0),
nSelCount(0),
- bInverseCur(false),
bCurValid(false)
{
}
@@ -88,13 +87,11 @@ MultiSelection::MultiSelection( const MultiSelection& rOrig ) :
{
nCurSubSel = rOrig.nCurSubSel;
nCurIndex = rOrig.nCurIndex;
- bInverseCur = rOrig.bInverseCur;
}
else
{
nCurSubSel = 0;
nCurIndex = 0;
- bInverseCur = false;
}
// copy the sub selections
@@ -107,7 +104,6 @@ MultiSelection::MultiSelection( const Range& rRange ):
nCurSubSel(0),
nCurIndex(0),
nSelCount(0),
- bInverseCur(false),
bCurValid(false)
{
}
@@ -421,7 +417,6 @@ sal_Int32 MultiSelection::ImplFwdUnselected()
sal_Int32 MultiSelection::FirstSelected()
{
- bInverseCur = false;
nCurSubSel = 0;
bCurValid = !aSels.empty();
@@ -447,24 +442,16 @@ sal_Int32 MultiSelection::NextSelected()
if ( !bCurValid )
return SFX_ENDOFSELECTION;
- if ( bInverseCur )
- {
- ++nCurIndex;
- return ImplFwdUnselected();
- }
- else
- {
- // is the next index in the current sub selection too?
- if ( nCurIndex < aSels[ nCurSubSel ]->Max() )
- return ++nCurIndex;
+ // is the next index in the current sub selection too?
+ if ( nCurIndex < aSels[ nCurSubSel ]->Max() )
+ return ++nCurIndex;
- // are there further sub selections?
- if ( ++nCurSubSel < sal_Int32(aSels.size()) )
- return nCurIndex = aSels[ nCurSubSel ]->Min();
+ // are there further sub selections?
+ if ( ++nCurSubSel < sal_Int32(aSels.size()) )
+ return nCurIndex = aSels[ nCurSubSel ]->Min();
- // we are at the end!
- return SFX_ENDOFSELECTION;
- }
+ // we are at the end!
+ return SFX_ENDOFSELECTION;
}
void MultiSelection::SetTotalRange( const Range& rTotRange )