sw/qa/extras/odfexport/odfexport2.cxx | 3 +++ sw/source/core/unocore/unosett.cxx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
New commits: commit c24fe44064c6624fefe642508086c8562c372fba Author: Justin Luth <jl...@mail.com> AuthorDate: Wed Sep 7 07:00:59 2022 -0400 Commit: Justin Luth <jl...@mail.com> CommitDate: Wed Sep 7 16:41:47 2022 +0200 tdf#149547 fix "tdf#75297 sw uno: override default num char style" The problem was that things like chapter numbering were creating this style on import. Interesting that it didn't do it for my use case. This fixes 7.5 commit 758945b077220fe151c1565c6d5b0bad02de6d58. Originally I left this clause "as is" because I had not yet removed the obsolete part of the condition. But now I can change anything in that .isEmpty() clause since commit 1a57418e2837e7fd07b0619804feed06e1acfe41 remove unused sw UNO_NAME_CHARACTER_FORMAT_NONE Change-Id: Ie52a0d1392d49ba6ae8a5620ab453ff7129bce7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139584 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx index 5d2f91b92d5d..018f7afd0cb6 100644 --- a/sw/qa/extras/odfexport/odfexport2.cxx +++ b/sw/qa/extras/odfexport/odfexport2.cxx @@ -36,6 +36,9 @@ DECLARE_ODFEXPORT_TEST(testTdf52065_centerTabs, "testTdf52065_centerTabs.odt") CPPUNIT_ASSERT(nTabStop < 4000); CPPUNIT_ASSERT(3000 < nTabStop); CPPUNIT_ASSERT_EQUAL(OUString(u"Pečiatka zamestnávateľa"), parseDump("//body/txt[4]/SwParaPortion/SwLineLayout/child::*[4]", "portion")); + + // tdf#149547: __XXX___invalid CharacterStyles should not be imported/exported + CPPUNIT_ASSERT(!getStyles("CharacterStyles")->hasByName("__XXX___invalid")); } DECLARE_ODFEXPORT_TEST(testTdf104254_noHeaderWrapping, "tdf104254_noHeaderWrapping.odt") diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 064f23b30a48..e92bade7875f 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1567,7 +1567,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat( SwDoc *const pLocalDoc = pDocShell ? pDocShell->GetDoc() : pDoc; if (sCharFormatName.isEmpty()) { - rCharStyleName = aInvalidStyle; + rCharStyleName.clear(); aFormat.SetCharFormat(nullptr); aFormat.SetCharFormatName(""); }