diff options
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/qa/extras/ww8import/data/bnc821208.doc | bin | 0 -> 30208 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8import/ww8import.cxx | 11 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8import/data/bnc821208.doc b/sw/qa/extras/ww8import/data/bnc821208.doc Binary files differnew file mode 100755 index 000000000000..d89d711f38be --- /dev/null +++ b/sw/qa/extras/ww8import/data/bnc821208.doc diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index 3311563a5ec3..4fd9d215a711 100644 --- a/sw/qa/extras/ww8import/ww8import.cxx +++ b/sw/qa/extras/ww8import/ww8import.cxx @@ -35,6 +35,7 @@ public: void testN816593(); void testPageBorder(); void testN823651(); + void testBnc821208(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -61,6 +62,7 @@ void Test::run() {"n816593.doc", &Test::testN816593}, {"page-border.doc", &Test::testPageBorder}, {"n823651.doc", &Test::testN823651}, + {"bnc821208.doc", &Test::testBnc821208}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -265,6 +267,15 @@ void Test::testN823651() CPPUNIT_ASSERT_EQUAL(7.5f, getProperty<float>(getParagraphOfText(1, xText), "CharHeight")); } +void Test::testBnc821208() +{ + // WW8Num1z0 earned a Symbol font, turning numbers into rectangles. + uno::Reference<beans::XPropertyState> 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); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 81841d556083..01baf330889e 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -3763,6 +3763,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().SearchAscii("WW8Num") == 0) + bImport = false; + bool bOldNoImp = pIo->bNoAttrImport; rSI.bImportSkipped = !bImport; |