summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahul Gurung <gurungrahul2@gmail.com>2018-11-24 21:59:46 +0530
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-11-27 04:12:53 +0100
commit851c80fdf6fb3509b53c6301dd0721be58c18719 (patch)
treebe6ee2e89c6efc7461221520b59ccc712b086973
parent3f2b8db38c8823d9980d43dd6eec9d3150cc5405 (diff)
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@googlemail.com>
-rw-r--r--include/test/document/xlinktargetsupplier.hxx34
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv1
-rw-r--r--sc/qa/extras/scmodelobj.cxx7
-rw-r--r--test/Library_subsequenttest.mk1
-rw-r--r--test/source/document/xlinktargetsupplier.cxx30
5 files changed, 71 insertions, 2 deletions
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: */