From 859e94294bdfd8595c88dd7f14da09ead8b32a45 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 15 Mar 2013 12:49:21 +0100 Subject: fdo#34800 sw: small cleanup Change-Id: I4ed8ed485a36e02755614bd59f91539fa1fb9579 --- sw/source/ui/docvw/PostItMgr.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 1a7c06365986..a4218d3612ac 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -106,13 +106,15 @@ bool comp_pos(const SwSidebarItem* a, const SwSidebarItem* b) // if AnchorA is in footnote, and AnchorB isn't // we do not want to change over the position if( aAnchorAInFooter && !aAnchorBInFooter ) - return 0; + return false; // if aAnchorA is not placed in a footnote, and aAnchorB is // force a change over else if( !aAnchorAInFooter && aAnchorBInFooter ) - return 1; - // if none of both, or both are in the footer - // arrange them depending on the position + return true; + // If neither or both are in the footer, compare the positions. + // Since footnotes are in Inserts section of nodes array and footers + // in Autotext section, all footnotes precede any footers so no need + // to check that. else return aPosAnchorA < aPosAnchorB; } -- cgit