tdf#131321 writerfilter: ApplyNumberingStyleNameToParaStyles()
commit35fc5ef0a759884b24ed8b83cd05702a0fab64cc
authorJustin Luth <justin.luth@collabora.com>
Sat, 11 Apr 2020 09:05:03 +0000 (11 12:05 +0300)
committerMiklos Vajna <vmiklos@collabora.com>
Tue, 14 Apr 2020 07:46:52 +0000 (14 09:46 +0200)
tree97a633beffc9a276720cc69d9d3ab364971efbf4
parent952cc68929f863784c6b01c9dc071494892877d1
tdf#131321 writerfilter: ApplyNumberingStyleNameToParaStyles()

Prior to this commit, numbering on paragraph styles
was lost on import. This didn't affect layout at all,
but it did affect user editing.

DOCX: export already was fine, just import was missing.
RTF:  export is explicitly ignored for non-paragraphs,
      (ParaNumRule_Impl), so I am ignoring RTF, since
      this fix is meaningless unless both import and
      export are working.

This is a bit tricky because styles.xml is loaded before
numbering.xml, so the names are not known until after
numbering.xml has finished. So this helper function runs
at the end of the numbering.xml import process.

Several existing unit tests nicely confirmed a few things.
-tdf95377.docx: numId 0 overrides an inherited numbering
-chtoutline.docx proves that outlineLevel styles are exempt.
-fdo61343.docx actually has nothing in numbering.xml,
 so it is possible to have a numbering with no name.
 Of course, it is a really messed up document, too...

Change-Id: I270a581f08704c2595d861ce5c5b546f9d6ba6b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92058
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
writerfilter/source/dmapper/DomainMapper.cxx
writerfilter/source/dmapper/DomainMapper.hxx
writerfilter/source/dmapper/DomainMapper_Impl.cxx
writerfilter/source/dmapper/DomainMapper_Impl.hxx
writerfilter/source/dmapper/NumberingManager.cxx
writerfilter/source/dmapper/StyleSheetTable.cxx
writerfilter/source/dmapper/StyleSheetTable.hxx