summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-03-15 12:49:21 +0100
committerMichael Stahl <mstahl@redhat.com>2013-03-15 22:54:06 +0100
commit859e94294bdfd8595c88dd7f14da09ead8b32a45 (patch)
tree0e29f4b844f2ad1d82de15a72d3e285c28c16a81
parent4b4bcb1af57ee376a1185d3559202857d9777b69 (diff)
fdo#34800 sw: small cleanup
Change-Id: I4ed8ed485a36e02755614bd59f91539fa1fb9579
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx10
1 files changed, 6 insertions, 4 deletions
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;
}