summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2019-03-12 22:55:34 +0000
committerJens Carl <j.carl43@gmx.de>2019-03-13 06:38:53 +0100
commit4ad3b5cdf416a8541a7188f67c7ab7fc0a93b94e (patch)
tree26e3cf35eba65ef44e28b59083b1377b85f17f7b /sc
parentbea44e5c1b982d05314b72452b94fe288071a496 (diff)
tdf#45904 Move XNameReplace Java tests to C++
Move XNameReplace Java tests to C++ for ScStyleFamilyObj. Fixes i#23594 by creating a new "com.sun.star.style.CellStyle" rather then using an existing one. Change-Id: Ie42e627020aff475173af5bc014bc28d7a11ec56 Reviewed-on: https://gerrit.libreoffice.org/69140 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/extras/scstylefamilyobj.cxx10
-rw-r--r--sc/qa/unoapi/sc_6.sce1
2 files changed, 9 insertions, 2 deletions
diff --git a/sc/qa/extras/scstylefamilyobj.cxx b/sc/qa/extras/scstylefamilyobj.cxx
index bbe8b7d6457b..fc0e75ccf3df 100644
--- a/sc/qa/extras/scstylefamilyobj.cxx
+++ b/sc/qa/extras/scstylefamilyobj.cxx
@@ -12,6 +12,7 @@
#include <test/container/xindexaccess.hxx>
#include <test/container/xnameaccess.hxx>
#include <test/container/xnamecontainer.hxx>
+#include <test/container/xnamereplace.hxx>
#include <cppu/unotype.hxx>
#include <com/sun/star/container/XIndexAccess.hpp>
@@ -34,7 +35,8 @@ class ScStyleFamilyObj : public CalcUnoApiTest,
public apitest::XElementAccess,
public apitest::XIndexAccess,
public apitest::XNameAccess,
- public apitest::XNameContainer
+ public apitest::XNameContainer,
+ public apitest::XNameReplace
{
public:
ScStyleFamilyObj();
@@ -65,6 +67,9 @@ public:
CPPUNIT_TEST(testRemoveByName);
CPPUNIT_TEST(testRemoveByNameNoneExistingElement);
+ // XNameReplace
+ CPPUNIT_TEST(testReplaceByName);
+
CPPUNIT_TEST_SUITE_END();
private:
@@ -77,6 +82,7 @@ ScStyleFamilyObj::ScStyleFamilyObj()
, XIndexAccess(19)
, XNameAccess("Default")
, XNameContainer("Default")
+ , XNameReplace("Default")
{
}
@@ -94,6 +100,8 @@ uno::Reference<uno::XInterface> ScStyleFamilyObj::init()
uno::UNO_QUERY_THROW);
// XNameContainer
setElement(uno::makeAny(xMSF->createInstance("com.sun.star.style.CellStyle")));
+ // XNameReplace
+ setReplacmentElement(uno::makeAny(xMSF->createInstance("com.sun.star.style.CellStyle")));
uno::Reference<container::XNameContainer> xNC(xNA_SF, uno::UNO_QUERY_THROW);
xNC->insertByName("ScStyleFamilyObj", uno::makeAny(xCS));
diff --git a/sc/qa/unoapi/sc_6.sce b/sc/qa/unoapi/sc_6.sce
index 1077a053ef63..c8bae6e3df39 100644
--- a/sc/qa/unoapi/sc_6.sce
+++ b/sc/qa/unoapi/sc_6.sce
@@ -18,4 +18,3 @@
-o sc.ScModelObj
# -o sc.ScShapeObj
# -o sc.ScSheetLinkObj
--o sc.ScStyleFamilyObj