Kaydet (Commit) 159fc90e authored tarafından Miklos Vajna's avatar Miklos Vajna

fdo#58376 testcase

üst 1f5401e6
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment