summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2018-12-07 20:54:57 +0000
committerJens Carl <j.carl43@gmx.de>2018-12-08 04:04:00 +0100
commit165e0e14e5ad71a44d7eb1f301a565c5cd8f0559 (patch)
tree7ba53ee08158dae1cb10d6a2619ff5841059d015
parent47d7608395bde93782cd9642abeeebe482ddf301 (diff)
tdf#45904 Move XElementAccess Java tests to C++
Move XElementAccess Java tests to C++ for ScCellFieldsObj. Change-Id: I140cb1f1d5f9cbccfd4dbb43d37c9cd48b7346e8 Reviewed-on: https://gerrit.libreoffice.org/64794 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellFieldsObj.csv2
-rw-r--r--sc/qa/extras/sccellfieldsobj.cxx13
2 files changed, 12 insertions, 3 deletions
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellFieldsObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellFieldsObj.csv
index dac1b035ea34..ea3a0c75040a 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellFieldsObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellFieldsObj.csv
@@ -1,3 +1 @@
-"ScCellFieldsObj";"com::sun::star::container::XElementAccess";"getElementType()"
-"ScCellFieldsObj";"com::sun::star::container::XElementAccess";"hasElements()"
"ScCellFieldsObj";"com::sun::star::container::XEnumerationAccess";"createEnumeration()"
diff --git a/sc/qa/extras/sccellfieldsobj.cxx b/sc/qa/extras/sccellfieldsobj.cxx
index ec6400ebf6f1..d9074ad68641 100644
--- a/sc/qa/extras/sccellfieldsobj.cxx
+++ b/sc/qa/extras/sccellfieldsobj.cxx
@@ -8,6 +8,7 @@
*/
#include <test/calc_unoapi_test.hxx>
+#include <test/container/xelementaccess.hxx>
#include <test/util/xrefreshable.hxx>
#include <com/sun/star/container/XIndexAccess.hpp>
@@ -19,17 +20,22 @@
#include <com/sun/star/table/XCell.hpp>
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextField.hpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/uno/Reference.hxx>
+#include <cppu/unotype.hxx>
+
using namespace css;
using namespace css::uno;
namespace sc_apitest
{
-class ScCellFieldsObj : public CalcUnoApiTest, public apitest::XRefreshable
+class ScCellFieldsObj : public CalcUnoApiTest,
+ public apitest::XElementAccess,
+ public apitest::XRefreshable
{
public:
ScCellFieldsObj();
@@ -40,6 +46,10 @@ public:
CPPUNIT_TEST_SUITE(ScCellFieldsObj);
+ // XElementAccess
+ CPPUNIT_TEST(testGetElementType);
+ CPPUNIT_TEST(testHasElements);
+
// XRefreshable
CPPUNIT_TEST(testAddRefreshListener);
CPPUNIT_TEST(testRefresh);
@@ -53,6 +63,7 @@ private:
ScCellFieldsObj::ScCellFieldsObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
+ , XElementAccess(cppu::UnoType<text::XTextField>::get())
{
}