summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfimport/rtfimport.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-09-06 18:26:02 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-09-06 18:55:15 +0200
commit321d7ec2071472b3765a00806715e7ad9f8a306f (patch)
tree716df73e4f71ea6f0b7107855d15f331456e7bea /sw/qa/extras/rtfimport/rtfimport.cxx
parent9e6221f114ba4422caa79f38ee0a20fb8a8931cd (diff)
fdo#82078 RTF import: fix bold text spilling over to non-bold text
Regression from commit 41890bf714803969515578b47e63fa9730ea7090 (fdo#54473 fdo#57133 fix RTF import of character styles, 2012-12-04), the problem was that the style undoing magic introduced in 1be0a3fa9ebb22b607c54b47739d4467acfed259 (n#825305: writerfilter RTF import: override style properties like Word, 2014-06-17) was not used for character styles. Change-Id: Id31cfd5574a83bcf2895f0c2fd496fa60791cbb3
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx7
1 files changed, 7 insertions, 0 deletions
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: */