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 <jluth@mail.com>
diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx
index 5d2f91b..018f7af 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 064f23b..e92bade 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("");
            }