summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2020-02-26 22:36:36 -0800
committerJens Carl <j.carl43@gmx.de>2020-02-27 22:27:05 +0100
commit59fd5874dcc1ff4fc469067a55e99c2cd79716c3 (patch)
tree0477c12612b67e39b0e84648355ba3d367979af4 /sc
parentb9b553f17404ff24aae2be4cda65fa3c0f380985 (diff)
tdf#45904 Move XNameContainer Java tests to C++
Move missing XNameContainer Java tests to C++ for ScTableSheetsObj. Change-Id: I63a91487ab2e50b97c937edae929c43261553db9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89614 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/extras/sctablesheetsobj.cxx12
-rw-r--r--sc/qa/unoapi/sc_7.sce1
2 files changed, 8 insertions, 5 deletions
diff --git a/sc/qa/extras/sctablesheetsobj.cxx b/sc/qa/extras/sctablesheetsobj.cxx
index b995a03a78ab..41856b5b2df7 100644
--- a/sc/qa/extras/sctablesheetsobj.cxx
+++ b/sc/qa/extras/sctablesheetsobj.cxx
@@ -59,6 +59,13 @@ public:
CPPUNIT_TEST(testGetElementNames);
CPPUNIT_TEST(testHasByName);
+ // XNameContainer
+ CPPUNIT_TEST(testInsertByName);
+ CPPUNIT_TEST(testInsertByNameEmptyName);
+ CPPUNIT_TEST(testInsertByNameDuplicate);
+ CPPUNIT_TEST(testRemoveByName);
+ CPPUNIT_TEST(testRemoveByNameNoneExistingElement);
+
// XNameReplace
CPPUNIT_TEST(testReplaceByName);
@@ -81,10 +88,6 @@ public:
CPPUNIT_TEST(testImportCellStyle);
CPPUNIT_TEST(testLastAfterInsertCopy);
- // XNameContainer
- CPPUNIT_TEST(testRemoveByName);
- CPPUNIT_TEST(testRemoveByNameNoneExistingElement);
-
CPPUNIT_TEST_SUITE_END();
virtual uno::Reference< lang::XComponent > getComponent() override;
@@ -126,6 +129,7 @@ uno::Reference< uno::XInterface > ScTableSheetsObj::init()
uno::Reference< uno::XInterface > xReturn( xDocument->getSheets(), UNO_QUERY_THROW);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY_THROW);
+ XNameContainer::setElement(uno::makeAny(xMSF->createInstance("com.sun.star.sheet.Spreadsheet")));
// XNameReplace
setReplacementElement(uno::makeAny(xMSF->createInstance("com.sun.star.sheet.Spreadsheet")));
diff --git a/sc/qa/unoapi/sc_7.sce b/sc/qa/unoapi/sc_7.sce
index e88e9db49f4e..f060cb194313 100644
--- a/sc/qa/unoapi/sc_7.sce
+++ b/sc/qa/unoapi/sc_7.sce
@@ -18,7 +18,6 @@
# -o sc.ScStyleObj
# # i84656 -o sc.ScTabViewObj
# -o sc.ScTableSheetObj
-# -o sc.ScTableSheetsObj
# #i89411 -o sc.XMLContentExporter
# #i89411 -o sc.XMLContentImporter
# #i89411 -o sc.XMLExporter