summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2022-02-28 23:54:54 -0800
committerJens Carl <j.carl43@gmx.de>2022-03-01 17:40:52 +0100
commit26cbb045a06c4027bd7b446d692c3b38297d0283 (patch)
treebf8b8832e9b0ad517e1d7c4039d63b5faa744844 /sc
parent66614d9d1c63ecd957440184e696cd1d71fba96a (diff)
tdf#45904 Move XComponent Java test to C++
Move XComponent Jave tests to C++ for ScCellFieldObj_Cell and ScCellFieldObj_Header (formerly ScCellFieldObj). Change-Id: Ibf293a72801720fee49acdda5a3a463e9202bb58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130742 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/extras/sceditfieldobj-cell.cxx8
-rw-r--r--sc/qa/extras/sceditfieldobj-header.cxx8
-rw-r--r--sc/qa/unoapi/sc_2.sce1
3 files changed, 16 insertions, 1 deletions
diff --git a/sc/qa/extras/sceditfieldobj-cell.cxx b/sc/qa/extras/sceditfieldobj-cell.cxx
index 53f333269989..b4efe8931e20 100644
--- a/sc/qa/extras/sceditfieldobj-cell.cxx
+++ b/sc/qa/extras/sceditfieldobj-cell.cxx
@@ -9,6 +9,7 @@
#include <test/calc_unoapi_test.hxx>
#include <test/beans/xpropertyset.hxx>
+#include <test/lang/xcomponent.hxx>
#include <test/text/textcontent.hxx>
#include <test/text/xtextfield.hxx>
#include <test/text/xtextcontent.hxx>
@@ -35,6 +36,7 @@ namespace sc_apitest
{
class ScEditFieldObj_Cell : public CalcUnoApiTest,
public apitest::TextContent,
+ public apitest::XComponent,
public apitest::XPropertySet,
public apitest::XTextContent,
public apitest::XTextField
@@ -48,6 +50,7 @@ public:
virtual uno::Reference<text::XTextContent> getTextContent() override;
virtual uno::Reference<text::XTextRange> getTextRange() override;
virtual bool isAttachSupported() override { return true; }
+ virtual void triggerDesktopTerminate() override{};
void testEditFieldProperties();
@@ -56,6 +59,11 @@ public:
// TextContent
CPPUNIT_TEST(testTextContentProperties);
+ // XComponent
+ CPPUNIT_TEST(testAddEventListener);
+ CPPUNIT_TEST(testRemoveEventListener);
+ CPPUNIT_TEST(testDispose);
+
// XPropertySet
CPPUNIT_TEST(testGetPropertySetInfo);
CPPUNIT_TEST(testGetPropertyValue);
diff --git a/sc/qa/extras/sceditfieldobj-header.cxx b/sc/qa/extras/sceditfieldobj-header.cxx
index 57e4d067f381..da4558a85826 100644
--- a/sc/qa/extras/sceditfieldobj-header.cxx
+++ b/sc/qa/extras/sceditfieldobj-header.cxx
@@ -9,6 +9,7 @@
#include <test/calc_unoapi_test.hxx>
#include <test/beans/xpropertyset.hxx>
+#include <test/lang/xcomponent.hxx>
#include <test/text/textcontent.hxx>
#include <test/text/xtextcontent.hxx>
#include <test/text/xtextfield.hxx>
@@ -35,6 +36,7 @@ namespace sc_apitest
{
class ScEditFieldObj_Header : public CalcUnoApiTest,
public apitest::TextContent,
+ public apitest::XComponent,
public apitest::XPropertySet,
public apitest::XTextContent,
public apitest::XTextField
@@ -48,12 +50,18 @@ public:
virtual uno::Reference<text::XTextContent> getTextContent() override;
virtual uno::Reference<text::XTextRange> getTextRange() override;
virtual bool isAttachSupported() override { return false; }
+ virtual void triggerDesktopTerminate() override{};
CPPUNIT_TEST_SUITE(ScEditFieldObj_Header);
// TextContent
CPPUNIT_TEST(testTextContentProperties);
+ // XComponent
+ CPPUNIT_TEST(testAddEventListener);
+ CPPUNIT_TEST(testRemoveEventListener);
+ CPPUNIT_TEST(testDispose);
+
// XPropertySet
CPPUNIT_TEST(testGetPropertySetInfo);
CPPUNIT_TEST(testGetPropertyValue);
diff --git a/sc/qa/unoapi/sc_2.sce b/sc/qa/unoapi/sc_2.sce
index ca7b7b54a042..7f3495a1d6ba 100644
--- a/sc/qa/unoapi/sc_2.sce
+++ b/sc/qa/unoapi/sc_2.sce
@@ -24,5 +24,4 @@
# -o sc.ScAnnotationShapeObj
-o sc.ScAutoFormatFieldObj
-o sc.ScCellCursorObj
-# ported to cppunit -o sc.ScCellFieldObj
-o sc.ScCellObj