sw/inc/ftnidx.hxx | 2 +- sw/source/core/doc/ftnidx.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
New commits: commit 9490643712a040a6f4433d145bc5d35d9d4335f5 Author: Cédric Bosdonnat <cedric.bosdon...@free.fr> Date: Wed Aug 1 14:36:54 2012 +0200 Fix for a236f8318a0e05caeec53ccbee8b134f44a98008 To get footnotes sorted properly one need to: * actually use the comparator class * compare on the offsets value (and not there pointers) Change-Id: Ie86802c7a92602bfbb4d2a603afe06f621e392a3 diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx index 0cc2efa..e2801c4 100644 --- a/sw/inc/ftnidx.hxx +++ b/sw/inc/ftnidx.hxx @@ -47,7 +47,7 @@ struct CompareSwFtnIdxs bool operator()(SwTxtFtn* const& lhs, SwTxtFtn* const& rhs) const; }; -class SwFtnIdxs : public o3tl::sorted_vector<SwTxtFtn*> +class SwFtnIdxs : public o3tl::sorted_vector<SwTxtFtn*, CompareSwFtnIdxs> { public: SwFtnIdxs() {} diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx index c47a4f9..50e7bde 100644 --- a/sw/source/core/doc/ftnidx.cxx +++ b/sw/source/core/doc/ftnidx.cxx @@ -43,7 +43,7 @@ bool CompareSwFtnIdxs::operator()(SwTxtFtn* const& lhs, SwTxtFtn* const& rhs) co { sal_uLong nIdxLHS = _SwTxtFtn_GetIndex( lhs ); sal_uLong nIdxRHS = _SwTxtFtn_GetIndex( rhs ); - return ( nIdxLHS == nIdxRHS && lhs->GetStart() < rhs->GetStart() ) || nIdxLHS < nIdxRHS; + return ( nIdxLHS == nIdxRHS && *lhs->GetStart() < *rhs->GetStart() ) || nIdxLHS < nIdxRHS; } void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt )
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits