diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-02-24 16:43:19 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-02-24 17:37:59 +0100 |
commit | 1127c63470096f62394f133c61cee2e6fb7fd0c7 (patch) | |
tree | d0de50b9af774f6d3876b4b015429c6dcead9cbe /xmloff/inc | |
parent | 3469f6976c9435d1235315439e95beb9494bd8eb (diff) |
ODT import: fix MSO-style <text:list text:continue-numbering="true">
The ODF spec says that text:continue-numbering="true" should only
continue the numbering in case the styles of the previous and the
current list match.
In contrast, Word continues the numbering even in case there is e.g.
numbering, then bullets, then numbering again, in case the list styles of
the two numberings are the same.
Work this around at import time when the generator confirms that the
document is coming from Word. At least Office 2019 and the latest
renderer at office.com is affected.
(I've mailed dochelp@microsoft, no answer yet.)
Change-Id: Ib63e14322e5501a6220f798abd9365d7913dab4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130503
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'xmloff/inc')
-rw-r--r-- | xmloff/inc/txtlists.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xmloff/inc/txtlists.hxx b/xmloff/inc/txtlists.hxx index 30529a141fb9..dda522c441f9 100644 --- a/xmloff/inc/txtlists.hxx +++ b/xmloff/inc/txtlists.hxx @@ -121,6 +121,9 @@ class XMLTextListsHelper bool* o_pRestartNumbering = nullptr, bool* io_pSetDefaults = nullptr); + /// Looks up the last list id of a given list style, by name. + OUString GetLastIdOfStyleName(const OUString& sListStyleName) const; + private: /** list context: list, list-item, numbered-paragraph @@ -152,6 +155,8 @@ class XMLTextListsHelper typedef ::std::map< OUString, OUString > tMapForContinuingLists; std::unique_ptr<tMapForContinuingLists> mpContinuingLists; + std::unique_ptr<std::map<OUString, OUString>> mpStyleNameLastListIds; + // stack type for opened list elements and its list style: // vector with pair( <ListId>, <ListStyleName> ) as value typedef ::std::vector< ::std::pair< OUString, OUString > > |