diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-08-01 14:36:54 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-08-01 14:39:11 +0200 |
commit | 9490643712a040a6f4433d145bc5d35d9d4335f5 (patch) | |
tree | db0d069a1c1cd090f52dddfad840b5cf7ee5d170 /sw | |
parent | 21cb8210c74e52896ce7fb063f1578b13672f4bd (diff) |
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
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/ftnidx.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/ftnidx.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx index 0cc2efa53979..e2801c42b334 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 c47a4f9028c2..50e7bdec8bd8 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 ) |