summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-07-20 13:45:52 +0100
committerEike Rathke <erack@redhat.com>2015-07-21 15:04:07 +0000
commitffc3876a95f896388fcb65ff7b37b5214d24eb52 (patch)
treea1119cc28491ac1d6d3a08cff59ee243fc05ce39 /sw
parentf838b4f5495f1e70d005bbb1e991b63409ada5a8 (diff)
test should check that all levels are equal
regression from commit bf586debd4d8274cff2737f02beac465525328e8 Author: Matteo Casalin <matteo.casalin@yahoo.com> Date: Sat Feb 21 12:38:54 2015 +0100 Simplify Change-Id: I09f83b2bab053fcd48fe1a1a4184cc11a4f9d663 (cherry picked from commit 8a01693c79a24006cbe7d8642b97408eb23a1bd9) Reviewed-on: https://gerrit.libreoffice.org/17233 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docnum.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index f23053b3d070..5340b6e7f318 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -654,13 +654,17 @@ static SwTextNode* lcl_FindOutlineNum( const SwOutlineNodes& rOutlNds, OUString&
const SwNodeNum & rNdNum = *(pNd->GetNum());
SwNumberTree::tNumberVector aLevelVal = rNdNum.GetNumberVector();
// now compare with the one searched for
+ bool bEqual = true;
for( int n = 0; n < nLevel; ++n )
{
- if ( aLevelVal[n] == nLevelVal[n] )
+ if ( aLevelVal[n] != nLevelVal[n] )
{
- return pNd;
+ bEqual = false;
+ break;
}
}
+ if (bEqual)
+ return pNd;
}
else
{