[Libreoffice-commits] .: sw/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 18 04:04:36 PST 2012


 sw/qa/extras/odfimport/data/hello.odt |binary
 sw/qa/extras/odfimport/odfimport.cxx  |   10 ++++++++++
 2 files changed, 10 insertions(+)

New commits:
commit 159fc90e1692f3cc17261c0db9fec48eb6bef28b
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Tue Dec 18 12:58:06 2012 +0100

    fdo#58376 testcase

diff --git a/sw/qa/extras/odfimport/data/hello.odt b/sw/qa/extras/odfimport/data/hello.odt
new file mode 100644
index 0000000..23ce6a4
Binary files /dev/null and b/sw/qa/extras/odfimport/data/hello.odt differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 05584bf..78531b4 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();


More information about the Libreoffice-commits mailing list