diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-20 13:45:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-07-20 14:26:55 +0100 |
commit | 8a01693c79a24006cbe7d8642b97408eb23a1bd9 (patch) | |
tree | d6df795742ac6f0368cb0af5f7fb3b1c738f5511 /sw | |
parent | 75938aff3848edb9fc705a70d79e9221b2c05c3a (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
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docnum.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 54822e80022b..fdf39db434f0 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 { |