Kaydet (Commit) 41b57721 authored tarafından Serge Krot's avatar Serge Krot Kaydeden (comit) Thorsten Behrens

tdf#81782 new unit test: title/subject check in sub docs

Change-Id: I9ff154191feeeed54d3f0549ab16f24ee60015a5
Reviewed-on: https://gerrit.libreoffice.org/65718
Tested-by: Jenkins
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 092ebcc9
...@@ -1088,5 +1088,27 @@ DECLARE_SHELL_MAILMERGE_TEST(testTdf121168, "section_ps.odt", "4_v01.ods", "Tabe ...@@ -1088,5 +1088,27 @@ DECLARE_SHELL_MAILMERGE_TEST(testTdf121168, "section_ps.odt", "4_v01.ods", "Tabe
} }
} }
DECLARE_FILE_MAILMERGE_TEST(testTdf81782_file, "tdf78611.odt", "10-testing-addresses.ods", "testing-addresses")
{
executeMailMerge(true);
for (int doc = 0; doc < 10; ++doc)
{
loadMailMergeDocument( doc );
// get document properties
uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<document::XDocumentProperties> xDocumentProperties(xDocumentPropertiesSupplier->getDocumentProperties());
// check if properties were set
uno::Sequence<OUString> aKeywords(xDocumentProperties->getKeywords());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aKeywords.getLength());
CPPUNIT_ASSERT_EQUAL(OUString("one two"), aKeywords[0]);
// check title and subject
CPPUNIT_ASSERT_EQUAL(OUString("my title"), xDocumentProperties->getTitle());
CPPUNIT_ASSERT_EQUAL(OUString("my subject"), xDocumentProperties->getSubject());
}
}
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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