diff --git a/sw/qa/extras/ww8import/data/bnc821208.doc b/sw/qa/extras/ww8import/data/bnc821208.doc new file mode 100755 index 000000000000..d89d711f38be Binary files /dev/null and b/sw/qa/extras/ww8import/data/bnc821208.doc differ diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index 0c3e1fcb26e9..cc107e041ead 100644 --- a/sw/qa/extras/ww8import/ww8import.cxx +++ b/sw/qa/extras/ww8import/ww8import.cxx @@ -234,6 +234,15 @@ DECLARE_WW8IMPORT_TEST(testListNolevel, "list-nolevel.doc") CPPUNIT_ASSERT_EQUAL(OUString("1."), aText); } +DECLARE_WW8IMPORT_TEST(testBnc821208, "bnc821208.doc") +{ + // WW8Num1z0 earned a Symbol font, turning numbers into rectangles. + uno::Reference xPropertyState(getStyles("CharacterStyles")->getByName("WW8Num1z0"), uno::UNO_QUERY); + beans::PropertyState ePropertyState = xPropertyState->getPropertyState("CharFontName"); + // This was beans::PropertyState_DIRECT_VALUE. + CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DEFAULT_VALUE, ePropertyState); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index c5ac5b875b9a..4d8964922995 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -3736,6 +3736,11 @@ bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisSty } bool bImport = !bStyExist || pIo->mbNewDoc; // import content ? + + // Do not override character styles the list import code created earlier. + if (bImport && bStyExist && rSI.GetOrgWWName().startsWith("WW8Num")) + bImport = false; + bool bOldNoImp = pIo->bNoAttrImport; rSI.bImportSkipped = !bImport;