diff options
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/rtfimport/data/fdo82078.rtf | 13 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo82078.rtf b/sw/qa/extras/rtfimport/data/fdo82078.rtf new file mode 100644 index 000000000000..5899b7e1c0f6 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/fdo82078.rtf @@ -0,0 +1,13 @@ +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0 +\noqfpromote +{\stylesheet +{\ql \li0\ri0\sl240\slmult0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f40\fs18\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 +\snext0 \sqformat \spriority14 \styrsid11343869 Normal;} +{\*\cs73\b Strong;} +} +\pard +{before } +{\cs73 +after} +\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index b2ed3d98e845..ec58d4ca6c03 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -9,6 +9,7 @@ #include <swmodeltestbase.hxx> #include <com/sun/star/awt/FontDescriptor.hpp> +#include <com/sun/star/awt/FontWeight.hpp> #include <com/sun/star/document/XFilter.hpp> #include <com/sun/star/document/XImporter.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp> @@ -1919,6 +1920,12 @@ DECLARE_RTFIMPORT_TEST(testFdo79959, "fdo79959.rtf") CPPUNIT_ASSERT_EQUAL(true, static_cast<bool>(getStyles("ParagraphStyles")->hasByName("Test"))); } +DECLARE_RTFIMPORT_TEST(testFdo82078, "fdo82078.rtf") +{ + // This was awt::FontWeight::BOLD, i.e. the second run was bold, when it should be normal. + CPPUNIT_ASSERT_EQUAL(awt::FontWeight::NORMAL, getProperty<float>(getRun(getParagraph(1), 2), "CharWeight")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |