From 59fd5874dcc1ff4fc469067a55e99c2cd79716c3 Mon Sep 17 00:00:00 2001 From: Jens Carl Date: Wed, 26 Feb 2020 22:36:36 -0800 Subject: 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 --- sc/qa/extras/sctablesheetsobj.cxx | 12 ++++++++---- sc/qa/unoapi/sc_7.sce | 1 - 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'sc') 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 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 -- cgit