summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2019-01-17 22:54:19 +0000
committerJens Carl <j.carl43@gmx.de>2019-01-18 00:51:58 +0100
commita3fee0ee2633d6c1bbae4305c47fc66f3ed789d8 (patch)
tree9d9aff8ee31b939e9bc0e90671392779c340d457
parent6e07cec370fe73d3bf1ca7432eab442f3de38bf9 (diff)
tdf#45904 Move XElementAccess Java tests to C++
Move XElementAccess Java tests to C++ for ScDDELinksObj. Change-Id: I627a9f54257b9283aadcf7b6b0fbb403b69b4354 Reviewed-on: https://gerrit.libreoffice.org/66558 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDDELinksObj.csv2
-rw-r--r--sc/qa/extras/scddelinksobj.cxx9
2 files changed, 9 insertions, 2 deletions
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDDELinksObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDDELinksObj.csv
index 9c8e18f4bc68..ce5281f4c2ea 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDDELinksObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDDELinksObj.csv
@@ -1,3 +1 @@
-"ScDDELinksObj";"com::sun::star::container::XElementAccess";"getElementType()"
-"ScDDELinksObj";"com::sun::star::container::XElementAccess";"hasElements()"
"ScDDELinksObj";"com::sun::star::container::XEnumerationAccess";"createEnumeration()"
diff --git a/sc/qa/extras/scddelinksobj.cxx b/sc/qa/extras/scddelinksobj.cxx
index 9b3ae802a07c..095882cb5ba1 100644
--- a/sc/qa/extras/scddelinksobj.cxx
+++ b/sc/qa/extras/scddelinksobj.cxx
@@ -8,9 +8,11 @@
*/
#include <test/calc_unoapi_test.hxx>
+#include <test/container/xelementaccess.hxx>
#include <test/container/xindexaccess.hxx>
#include <test/container/xnameaccess.hxx>
+#include <cppu/unotype.hxx>
#include <rtl/ustring.hxx>
#include <sfx2/app.hxx>
@@ -18,6 +20,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/sheet/XDDELink.hpp>
#include <com/sun/star/sheet/XDDELinks.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
@@ -33,6 +36,7 @@ using namespace com::sun::star;
namespace sc_apitest
{
class ScDDELinksObj : public CalcUnoApiTest,
+ public apitest::XElementAccess,
public apitest::XIndexAccess,
public apitest::XNameAccess
{
@@ -45,6 +49,10 @@ public:
CPPUNIT_TEST_SUITE(ScDDELinksObj);
+ // XElementAccess
+ CPPUNIT_TEST(testGetElementType);
+ CPPUNIT_TEST(testHasElements);
+
// XIndexAccess
CPPUNIT_TEST(testGetByIndex);
CPPUNIT_TEST(testGetCount);
@@ -62,6 +70,7 @@ private:
ScDDELinksObj::ScDDELinksObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
+ , XElementAccess(cppu::UnoType<sheet::XDDELink>::get())
, XIndexAccess(1)
, XNameAccess("soffice|"
+ m_directories.getURLFromSrc("/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods")