diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-09-09 13:04:01 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-09-10 16:46:31 +0200 |
commit | 6c4e471bffff2087d2cb009c39430607d98038c0 (patch) | |
tree | f9842cb6683c6615fedfcd3a43f6440637a60e6b /embeddedobj/source/commonembedding/miscobj.cxx | |
parent | 1178a5d8a6ae65c9336c71f481e19505d901227a (diff) |
ODT export: order <style:font-face> elements inside <office:font-face-decls>
This builds on top of commit 92471550b8c43d8ff0cef8b414884d697edf9e63
(ODF export: sort <style:font-face> elements based on the style:name
attribute, 2021-03-11), the additional problem was that the style:name
attribute already has number suffixes to have unique names for fonts
where the style name would match.
This means that even if we sort the container right before writing the
elements, which font gets the number suffix depends on the insert order.
Fix this by additionally sorting the font items before insertion, given
that a single call-site does all the insertion, at least for Writer
documents. This is required as SfxItemPool::GetItemSurrogates() exposes
a container which is based on SfxPoolItemArray_Impl, which uses an
o3tl::sorted_vector<> of pointers, so effectively unsorted, the order
depends on the pointer address of the font items.
(cherry picked from commit 7a8bb65e1b8dc7fdd7f89c8c546e71e4208da574)
Change-Id: I46569b40796243f7f95b92870504c2023b2ce943
Diffstat (limited to 'embeddedobj/source/commonembedding/miscobj.cxx')
0 files changed, 0 insertions, 0 deletions