diff options
author | Jens Carl <j.carl43@gmx.de> | 2020-02-25 20:27:40 -0800 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2020-02-26 07:11:50 +0100 |
commit | 20747665a60b5c8782ab77962380ea34a30c20fa (patch) | |
tree | c3a0521089ce63f775e2323c9d420f4417893996 | |
parent | 4ec76bdeeb000881cf46c78166dc02badb4f44db (diff) |
tdf#45904 Move XNameReplace Java test to C++
Move XNameReplace Java test to C++ for ScTableSheetsObj.
Fixes i#23594 by creating a new "com.sun.star.sheet.Spreadsheet" rather
then using an existing one.
Change-Id: If7058647cc5d79d11e5542a82017d5bd02f7049e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89493
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
-rw-r--r-- | qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetsObj.csv | 1 | ||||
-rw-r--r-- | sc/qa/extras/sctablesheetsobj.cxx | 10 | ||||
-rw-r--r-- | sc/qa/unoapi/knownissues.xcl | 3 |
3 files changed, 10 insertions, 4 deletions
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetsObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetsObj.csv index 83fbb64ec41d..e348d3613059 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetsObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetsObj.csv @@ -1,4 +1,3 @@ -"ScTableSheetsObj";"com::sun::star::container::XNameReplace";"replaceByName()" "ScTableSheetsObj";"com::sun::star::container::XNameContainer";"insertByName()" "ScTableSheetsObj";"com::sun::star::container::XNameContainer";"removeByName()" "ScTableSheetsObj";"com::sun::star::container::XIndexAccess";"getCount()" diff --git a/sc/qa/extras/sctablesheetsobj.cxx b/sc/qa/extras/sctablesheetsobj.cxx index 82c74e832c7d..34b1e03cfa90 100644 --- a/sc/qa/extras/sctablesheetsobj.cxx +++ b/sc/qa/extras/sctablesheetsobj.cxx @@ -11,6 +11,7 @@ #include <test/container/xenumerationaccess.hxx> #include <test/container/xnameaccess.hxx> #include <test/container/xnamecontainer.hxx> +#include <test/container/xnamereplace.hxx> #include <test/sheet/xspreadsheets.hxx> #include <test/sheet/xspreadsheets2.hxx> @@ -24,6 +25,7 @@ class ScTableSheetsObj : public CalcUnoApiTest, public ::apitest::XEnumerationAccess, public ::apitest::XNameAccess, public ::apitest::XNameContainer, + public ::apitest::XNameReplace, public ::apitest::XSpreadsheets, public ::apitest::XSpreadsheets2 { @@ -43,6 +45,9 @@ public: CPPUNIT_TEST(testGetElementNames); CPPUNIT_TEST(testHasByName); + // XNameReplace + CPPUNIT_TEST(testReplaceByName); + // XSpreadsheets CPPUNIT_TEST(testInsertNewByName); CPPUNIT_TEST(testInsertNewByNameBadName); @@ -80,6 +85,7 @@ ScTableSheetsObj::ScTableSheetsObj() : CalcUnoApiTest("/sc/qa/extras/testdocuments") , ::apitest::XNameAccess("Sheet1") , ::apitest::XNameContainer("Sheet2") + , ::apitest::XNameReplace("Sheet2") { } @@ -103,6 +109,10 @@ uno::Reference< uno::XInterface > ScTableSheetsObj::init() xDocument.set(mxComponent, UNO_QUERY_THROW); uno::Reference< uno::XInterface > xReturn( xDocument->getSheets(), UNO_QUERY_THROW); + uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY_THROW); + // XNameReplace + setReplacementElement(uno::makeAny(xMSF->createInstance("com.sun.star.sheet.Spreadsheet"))); + return xReturn; } diff --git a/sc/qa/unoapi/knownissues.xcl b/sc/qa/unoapi/knownissues.xcl index 7da16e74cf43..999c7681d327 100644 --- a/sc/qa/unoapi/knownissues.xcl +++ b/sc/qa/unoapi/knownissues.xcl @@ -38,9 +38,6 @@ sc.ScTableSheetObj::com::sun::star::sheet::XCellRangeData ### i84669 ### sc.ScTabViewObj::com::sun::star::sheet::XRangeSelection -### i23594 ### -sc.ScTableSheetsObj::com::sun::star::container::XNameReplace - ### i31378 ### sc.ScDocumentConfiguration::com::sun::star::document::Settings |