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>
diff --git a/include/test/document/xlinktargetsupplier.hxx b/include/test/document/xlinktargetsupplier.hxx
new file mode 100644
index 0000000..de273f8
--- /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 6c6fe08..dcdad19 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 78bc8f7..6a7e083 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 @@
                   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 @@
    // 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 c8a125c..b6ca7bf 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -50,6 +50,7 @@
	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 0000000..67ff19f
--- /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: */