diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-05-14 16:52:09 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-05-16 09:05:00 +0200 |
commit | 86039563de87149a01ffb980b5ec99074b98fd5e (patch) | |
tree | fe0de316998d7afdb69721e1912303e5b36c9f17 /svl | |
parent | ca8614fc44e66308b846d01b8c0ab6a63cc93eb9 (diff) |
std::stable_sort() where libc++ debug mode breaks a unittest
Libc++ debug has a feature that randomizes equal elements during
sort, which normally wouldn't make a difference, but some tests
rely on specific order of tested data. The ones failing without
this include:
CppunitTest_sw_ooxmlexport testMsoPosition
CppunitTest_sw_xhtmlexport testTdf66305
CppunitTest_sw_ww8export testCommentExport
Change-Id: Id49846939a264150cc82091718ffe6b904d7130e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134337
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/stylepool.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx index b74d0cb94729..dc992a6ede72 100644 --- a/svl/source/items/stylepool.cxx +++ b/svl/source/items/stylepool.cxx @@ -261,7 +261,7 @@ namespace { // Sort the parents using their name, if they have one. if (!rParentNames.empty()) { - std::sort(maParents.begin(), maParents.end(), + std::stable_sort(maParents.begin(), maParents.end(), [&rParentNames](const SfxItemSet* pA, const SfxItemSet* pB) { OUString aA; OUString aB; |