diff options
author | Rosemary Sebastian <rosemaryseb8@gmail.com> | 2017-03-18 08:46:27 +0000 |
---|---|---|
committer | Rosemary Sebastian <rosemaryseb8@gmail.com> | 2017-03-18 11:54:54 +0000 |
commit | 109210e5b71a4e0b6fcaae72be7ef8d7667f3708 (patch) | |
tree | 50fe7d607d490cc4065821d94f40f8f0db259c33 /sd/qa | |
parent | 198b6c16e78b3462217c9d8a0429459abe885392 (diff) |
Revert "Revert "Implement export and import of author field in fixed format""
This reverts commit cae16645e17df6a1f87443c00b6abfd26dabd27f.
Change-Id: If5b85beb53a0925909d537023879a7d86fa011cf
Reviewed-on: https://gerrit.libreoffice.org/35391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Rosemary Sebastian <rosemaryseb8@gmail.com>
Tested-by: Rosemary Sebastian <rosemaryseb8@gmail.com>
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/data/odp/author_fixed.odp | bin | 0 -> 10680 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/author_fixed.odp b/sd/qa/unit/data/odp/author_fixed.odp Binary files differnew file mode 100644 index 000000000000..2e666ad17fee --- /dev/null +++ b/sd/qa/unit/data/odp/author_fixed.odp diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 797bf36d6192..dd57ec01bf3d 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -92,6 +92,7 @@ public: void testTdf62176(); void testTransparentBackground(); void testEmbeddedPdf(); + void testAuthorField(); CPPUNIT_TEST_SUITE(SdExportTest); @@ -106,6 +107,7 @@ public: CPPUNIT_TEST(testTdf62176); CPPUNIT_TEST(testTransparentBackground); CPPUNIT_TEST(testEmbeddedPdf); + CPPUNIT_TEST(testAuthorField); CPPUNIT_TEST_SUITE_END(); @@ -552,6 +554,23 @@ void SdExportTest::testEmbeddedPdf() #endif } +void SdExportTest::testAuthorField() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/author_fixed.odp"), ODP); + + xDocShRef = saveAndReload( xDocShRef.get(), ODP ); + + uno::Reference< text::XTextField > xField = getTextFieldFromPage(0, 0, 0, 0, xDocShRef); + CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is() ); + + uno::Reference< beans::XPropertySet > xPropSet( xField, uno::UNO_QUERY_THROW ); + bool bFixed = false; + xPropSet->getPropertyValue("IsFixed") >>= bFixed; + CPPUNIT_ASSERT_MESSAGE("Author field is not fixed", bFixed); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |