summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-12-18 12:58:06 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-12-18 13:04:21 +0100
commit159fc90e1692f3cc17261c0db9fec48eb6bef28b (patch)
tree5125a8e3a9b0542b4b064d887fa48e2fe68fd087
parent1f5401e6c9c260354022aeab6a02512bdbfa7a4b (diff)
fdo#58376 testcase
-rw-r--r--sw/qa/extras/odfimport/data/hello.odtbin0 -> 8159 bytes
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/odfimport/data/hello.odt b/sw/qa/extras/odfimport/data/hello.odt
new file mode 100644
index 000000000000..23ce6a4db9af
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/hello.odt
Binary files differ
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();