Kaydet (Commit) 94906437 authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat

Fix for a236f831

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
üst 21cb8210
......@@ -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() {}
......
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment