[Libreoffice-commits] core.git: include/test qadevOOo/objdsc sc/qa test/Library_subsequenttest.mk test/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Nov 27 03:13:16 UTC 2018


 include/test/document/xlinktargetsupplier.hxx              |   34 +++++++++++++
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv |    1 
 sc/qa/extras/scmodelobj.cxx                                |    7 ++
 test/Library_subsequenttest.mk                             |    1 
 test/source/document/xlinktargetsupplier.cxx               |   30 +++++++++++
 5 files changed, 71 insertions(+), 2 deletions(-)

New commits:
commit 851c80fdf6fb3509b53c6301dd0721be58c18719
Author:     Rahul Gurung <gurungrahul2 at gmail.com>
AuthorDate: Sat Nov 24 21:59:46 2018 +0530
Commit:     Markus Mohrhard <markus.mohrhard at googlemail.com>
CommitDate: Tue Nov 27 04:12:53 2018 +0100

    tdf#45904 Move _XLinkTargetSupplier Java Tests to C++
    
    Change-Id: Idd62a6458d7aa0d1d8a479f5ebf78637e0360548
    Reviewed-on: https://gerrit.libreoffice.org/63950
    Tested-by: Jenkins
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/include/test/document/xlinktargetsupplier.hxx b/include/test/document/xlinktargetsupplier.hxx
new file mode 100644
index 000000000000..de273f89b80f
--- /dev/null
+++ b/include/test/document/xlinktargetsupplier.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+* This file is part of the LibreOffice project.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*/
+
+#ifndef INCLUDED_TEST_DOCUMENT_XLINKTARGETSUPPLIER_HXX
+#define INCLUDED_TEST_DOCUMENT_XLINKTARGETSUPPLIER_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <test/testdllapi.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XLinkTargetSupplier
+{
+public:
+    virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+    void testGetLinks();
+
+protected:
+    ~XLinkTargetSupplier() {}
+};
+}
+
+#endif // INCLUDED_TEST_DOCUMENT_XLINKTARGETSUPPLIER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv
index 6c6fe08e39c7..dcdad19ec09d 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv
@@ -1,7 +1,6 @@
 "ScModelObj";"com::sun::star::drawing::XDrawPagesSupplier";"getDrawPages()"
 "ScModelObj";"com::sun::star::document::XEventBroadcaster#optional";"addEventListener()"
 "ScModelObj";"com::sun::star::document::XEventBroadcaster#optional";"removeEventListener()"
-"ScModelObj";"com::sun::star::document::XLinkTargetSupplier";"getLinks()"
 "ScModelObj";"com::sun::star::style::XStyleFamiliesSupplier";"getStyleFamilies()"
 "ScModelObj";"com::sun::star::document::XActionLockable";"isActionLocked()"
 "ScModelObj";"com::sun::star::document::XActionLockable";"addActionLock()"
diff --git a/sc/qa/extras/scmodelobj.cxx b/sc/qa/extras/scmodelobj.cxx
index 78bc8f7b34d5..6a7e0833054f 100644
--- a/sc/qa/extras/scmodelobj.cxx
+++ b/sc/qa/extras/scmodelobj.cxx
@@ -8,6 +8,7 @@
  */
 
 #include <test/unoapi_test.hxx>
+#include <test/document/xlinktargetsupplier.hxx>
 #include <test/sheet/spreadsheetdocumentsettings.hxx>
 #include <test/sheet/xcalculatable.hxx>
 #include <test/sheet/xconsolidatable.hxx>
@@ -35,7 +36,8 @@ class ScModelObj : public UnoApiTest,
                    public apitest::XCalculatable,
                    public apitest::XConsolidatable,
                    public apitest::XDocumentAuditing,
-                   public apitest::XGoalSeek
+                   public apitest::XGoalSeek,
+                   public apitest::XLinkTargetSupplier
 {
 public:
     virtual void setUp() override;
@@ -67,6 +69,9 @@ public:
     // XGoalSeek
     CPPUNIT_TEST(testSeekGoal);
 
+    // XLinkTargetSupplier
+    CPPUNIT_TEST(testGetLinks);
+
     CPPUNIT_TEST_SUITE_END();
 
 private:
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index c8a125c38f51..b6ca7bfa4085 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -50,6 +50,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
 	test/source/container/xnamed \
 	test/source/container/xnamereplace \
 	test/source/drawing/captionshape \
+	test/source/document/xlinktargetsupplier \
 	test/source/sheet/cellarealink \
 	test/source/sheet/cellproperties \
 	test/source/sheet/databaseimportdescriptor \
diff --git a/test/source/document/xlinktargetsupplier.cxx b/test/source/document/xlinktargetsupplier.cxx
new file mode 100644
index 000000000000..67ff19f723a2
--- /dev/null
+++ b/test/source/document/xlinktargetsupplier.cxx
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+* This file is part of the LibreOffice project.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*/
+
+#include <test/document/xlinktargetsupplier.hxx>
+
+#include <com/sun/star/document/XLinkTargetSupplier.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <cppunit/extensions/HelperMacros.h>
+
+using namespace com::sun::star;
+using namespace com::sun::star::uno;
+
+namespace apitest
+{
+void XLinkTargetSupplier::testGetLinks()
+{
+    uno::Reference<document::XLinkTargetSupplier> xLinkTargetSupplier(init(), UNO_QUERY_THROW);
+    CPPUNIT_ASSERT(xLinkTargetSupplier->getLinks());
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */


More information about the Libreoffice-commits mailing list