diff options
Diffstat (limited to 'sw/qa/extras/odfimport/odfimport.cxx')
-rw-r--r-- | sw/qa/extras/odfimport/odfimport.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index 05584bfc23f0..78531b439c91 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -25,6 +25,7 @@ * instead of those above. */ +#include <com/sun/star/style/PageStyleLayout.hpp> #include <com/sun/star/table/XCell.hpp> #include <com/sun/star/table/BorderLine.hpp> #include <com/sun/star/text/XTextTable.hpp> @@ -39,6 +40,7 @@ public: void testEmptySvgFamilyName(); void testHideAllSections(); void testOdtBorders(); + void testPageStyleLayoutRight(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -56,6 +58,7 @@ void Test::run() {"empty-svg-family-name.odt", &Test::testEmptySvgFamilyName}, {"fdo53210.odt", &Test::testHideAllSections}, {"borders_ooo33.odt", &Test::testOdtBorders}, + {"hello.odt", &Test::testPageStyleLayoutRight}, }; for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) { @@ -270,6 +273,13 @@ void Test::testOdtBorders() } while(xParaEnum->hasMoreElements()); } +void Test::testPageStyleLayoutRight() +{ + uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Style"), uno::UNO_QUERY); + // This caused a crash. + xPropertySet->setPropertyValue("PageStyleLayout", uno::makeAny(style::PageStyleLayout_RIGHT)); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |