diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-06-05 11:44:10 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-06-05 12:00:08 +0200 |
commit | a9e0ec2b87a99c93b77a210a916b4df44ece454a (patch) | |
tree | 374c9dac89aa9862d1ecb0f7e455484d86c97276 /sw/qa | |
parent | 58197c3692df0d0fccb5bc7abddaf6d9667565f6 (diff) |
bnc#820509 testcase
Change-Id: Iee9909e9c42014ab10ceaa2f8f8e554c25e89157
Diffstat (limited to 'sw/qa')
-rwxr-xr-x | sw/qa/extras/ooxmlimport/data/n820509.docx | bin | 0 -> 10414 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n820509.docx b/sw/qa/extras/ooxmlimport/data/n820509.docx Binary files differnew file mode 100755 index 000000000000..a6da1e16842c --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/n820509.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 601f154d455d..b30ebd6f465e 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -32,6 +32,7 @@ #include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/table/ShadowFormat.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> +#include <com/sun/star/view/XFormLayerAccess.hpp> #include <com/sun/star/table/BorderLine2.hpp> #include <com/sun/star/table/TableBorder2.hpp> #include <com/sun/star/text/SizeType.hpp> @@ -116,6 +117,7 @@ public: void testWatermark(); void testPageBorderShadow(); void testN816593(); + void testN820509(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -200,6 +202,7 @@ void Test::run() {"watermark.docx", &Test::testWatermark}, {"page-border-shadow.docx", &Test::testPageBorderShadow}, {"n816593.docx", &Test::testN816593}, + {"n820509.docx", &Test::testN820509}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1432,6 +1435,22 @@ void Test::testN816593() CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables->getCount()); } +void Test::testN820509() +{ + // Design mode was enabled. + uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); + uno::Reference<view::XFormLayerAccess> xFormLayerAccess(xModel->getCurrentController(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(false, bool(xFormLayerAccess->isFormDesignMode())); + + // M.d.yyyy date format was unhandled. + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + uno::Reference<drawing::XControlShape> xControlShape(xDraws->getByIndex(0), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY); + uno::Reference<lang::XServiceInfo> xServiceInfo(xPropertySet, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int16(8), getProperty<sal_Int16>(xPropertySet, "DateFormat")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |