diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf109316_dropCaps.docx | bin | 0 -> 13058 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf109316_dropCaps.docx b/sw/qa/extras/ooxmlimport/data/tdf109316_dropCaps.docx Binary files differnew file mode 100644 index 000000000000..207c789a2db7 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tdf109316_dropCaps.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 796f1234dd3e..b030043eed24 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -29,6 +29,7 @@ #include <com/sun/star/embed/Aspects.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/style/BreakType.hpp> +#include <com/sun/star/style/DropCapFormat.hpp> #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/RelOrientation.hpp> @@ -725,6 +726,21 @@ DECLARE_OOXMLIMPORT_TEST(testTdf75573_lostTable, "tdf75573_lostTable.docx") CPPUNIT_ASSERT_EQUAL_MESSAGE("# of pages", 3, getPages() ); } +DECLARE_OOXMLIMPORT_TEST(testTdf109316_dropCaps, "tdf109316_dropCaps.docx") +{ + uno::Reference<beans::XPropertySet> xSet(getParagraph(1), uno::UNO_QUERY); + css::style::DropCapFormat aDropCap = getProperty<css::style::DropCapFormat>(xSet,"DropCapFormat"); + CPPUNIT_ASSERT_EQUAL( sal_Int8(2), aDropCap.Lines ); + + xSet.set(getParagraph(2), uno::UNO_QUERY); + aDropCap = getProperty<css::style::DropCapFormat>(xSet,"DropCapFormat"); + CPPUNIT_ASSERT_EQUAL( sal_Int8(3), aDropCap.Lines ); + + xSet.set(getParagraph(3), uno::UNO_QUERY); + aDropCap = getProperty<css::style::DropCapFormat>(xSet,"DropCapFormat"); + CPPUNIT_ASSERT_EQUAL( sal_Int8(4), aDropCap.Lines ); +} + DECLARE_OOXMLIMPORT_TEST(lineWpsOnly, "line-wps-only.docx") { uno::Reference<drawing::XShape> xShape = getShape(1); |