tdf#73483: make sure to not reset style names
commit70b2ff8e4dfc337cf429ce19b327f28c6c284d68
authorMike Kaganski <mike.kaganski@collabora.com>
Tue, 30 May 2023 13:10:03 +0000 (30 16:10 +0300)
committerAndras Timar <andras.timar@collabora.com>
Sun, 4 Jun 2023 14:34:09 +0000 (4 16:34 +0200)
tree2f481bc4878ebb6fb7016fae1719fae2e7ef47d7
parent9961a6f93ff5a1507c0bc5e372242f18c8d5b23e
tdf#73483: make sure to not reset style names

The problem was, that resetting direct formatting also used to reset
RES_FRMATR_STYLE_NAME and RES_FRMATR_CONDITIONAL_STYLE_NAME. These
are important at autostyles export: in XMLTextParagraphExport::Add,
SwXAutoStyle is queried for ParaStyleName/ParaConditionalStyleName
properties, and empty values of these were used to add the autostyle
to pool. Looking for the autostyle while exporting the paragraph,
SwXParagraph reports the correct "Standard" as the style name, but
no matching children were found for the "Standard" parent style, and
so the paragraph got "Standard" style name, instead of the autostyle.

Change-Id: Iadf24ebd2b85e494267b73336a54b24f85ea0a0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152393
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 05bc773b0e88b408a997ffa5851cc9207d3303e5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152430
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
sw/qa/extras/uiwriter/data/pageBreakWithPageStyle.fodt [new file with mode: 0644]
sw/qa/extras/uiwriter/uiwriter8.cxx
sw/source/core/doc/docfmt.cxx