mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Merge pull request #363 from pmir/fix-relationship-ordering
Fix relationship sorting
This commit is contained in:
commit
938d99ddc5
|
@ -1617,9 +1617,9 @@ struct rel_id_sorter
|
||||||
bool operator()(const xlnt::relationship &lhs, const xlnt::relationship &rhs)
|
bool operator()(const xlnt::relationship &lhs, const xlnt::relationship &rhs)
|
||||||
{
|
{
|
||||||
// format is rTd<decimal number 1..n>
|
// format is rTd<decimal number 1..n>
|
||||||
if (lhs.id().size() < rhs.id().size()) // a number with more digits will be larger
|
if (lhs.id().size() != rhs.id().size()) // a number with more digits will be larger
|
||||||
{
|
{
|
||||||
return true;
|
return lhs.id().size() < rhs.id().size();
|
||||||
}
|
}
|
||||||
return lhs.id() < rhs.id();
|
return lhs.id() < rhs.id();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user