[Libreoffice-commits] core.git: sw/qa

Scott Clarke (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 12 13:28:57 UTC 2019


 sw/qa/extras/odfexport/data/resolved-comment.odt |binary
 sw/qa/extras/odfexport/odfexport.cxx             |   14 ++++++++++++++
 2 files changed, 14 insertions(+)

New commits:
commit 0fbd3fcebf877ba25343443806e0d75f67c2d7b7
Author:     Scott Clarke <scott.clarke at codethink.co.uk>
AuthorDate: Thu Aug 8 13:40:18 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Aug 12 15:27:29 2019 +0200

    Add test for resolved comments in odfexport
    
    Change-Id: I069d84b1e6b80731c5d13a1f8b06f4ed9df0844a
    Reviewed-on: https://gerrit.libreoffice.org/77153
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sw/qa/extras/odfexport/data/resolved-comment.odt b/sw/qa/extras/odfexport/data/resolved-comment.odt
new file mode 100644
index 000000000000..e136cac3d825
Binary files /dev/null and b/sw/qa/extras/odfexport/data/resolved-comment.odt differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 99d6d8059c59..7d1f2debc760 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -491,6 +491,20 @@ DECLARE_ODFEXPORT_TEST(testSenderInitials, "sender-initials.fodt")
     }
 }
 
+#ifndef WNT
+DECLARE_ODFEXPORT_TEST(testResolvedComment, "resolved-comment.odt")
+{
+    // TODO find out why does this break testFdo58949 on Windows.
+    uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+    uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+    uno::Reference<beans::XPropertySet> xPropertySet(xFields->nextElement(), uno::UNO_QUERY);
+    CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPropertySet, "Resolved"));
+    xPropertySet.set(xFields->nextElement(), uno::UNO_QUERY);
+    CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xPropertySet, "Resolved"));
+}
+#endif
+
 DECLARE_ODFEXPORT_TEST(testTdf92379, "tdf92379.fodt")
 {
     // frame style fo:background-color was not imported


More information about the Libreoffice-commits mailing list