[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sw/source
Caolán McNamara
caolanm at redhat.com
Tue Jul 21 08:04:37 PDT 2015
sw/source/core/doc/docnum.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit ffc3876a95f896388fcb65ff7b37b5214d24eb52
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jul 20 13:45:52 2015 +0100
test should check that all levels are equal
regression from
commit bf586debd4d8274cff2737f02beac465525328e8
Author: Matteo Casalin <matteo.casalin at 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 at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index f23053b..5340b6e 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
{
More information about the Libreoffice-commits
mailing list