diff options
author | Jens Carl <j.carl43@gmx.de> | 2019-04-02 00:02:14 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2019-04-02 03:09:04 +0200 |
commit | 331e0c83466edef000ffb02b3e55cb49c5580347 (patch) | |
tree | 42e08a7dc8c7a2518e1d11c5763dc7c76b8780b3 | |
parent | 2c53846e8861c2252b712e5733936b83f66c4816 (diff) |
tdf#45904 Move XIndexAccess Java tests to C++
Move XIndexAccess Java tests to C++ for ScAutoFormatObj.
Change-Id: Ifa88b55b4691accb19c18a8c5f9c880d26a3d078
Reviewed-on: https://gerrit.libreoffice.org/70094
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
-rw-r--r-- | qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAutoFormatObj.csv | 2 | ||||
-rw-r--r-- | sc/qa/extras/scautoformatobj.cxx | 26 |
2 files changed, 15 insertions, 13 deletions
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAutoFormatObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAutoFormatObj.csv index c4a036d9c3f2..694fd818058d 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAutoFormatObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAutoFormatObj.csv @@ -1,5 +1,3 @@ -"ScAutoFormatObj";"com::sun::star::container::XIndexAccess";"getCount()" -"ScAutoFormatObj";"com::sun::star::container::XIndexAccess";"getByIndex()" "ScAutoFormatObj";"com::sun::star::container::XElementAccess";"getElementType()" "ScAutoFormatObj";"com::sun::star::container::XElementAccess";"hasElements()" "ScAutoFormatObj";"com::sun::star::container::XNamed";"getName()" diff --git a/sc/qa/extras/scautoformatobj.cxx b/sc/qa/extras/scautoformatobj.cxx index 518b967335b1..8f86f46d2f9c 100644 --- a/sc/qa/extras/scautoformatobj.cxx +++ b/sc/qa/extras/scautoformatobj.cxx @@ -9,6 +9,7 @@ #include <test/calc_unoapi_test.hxx> #include <test/container/xenumerationaccess.hxx> +#include <test/container/xindexaccess.hxx> #include <test/sheet/tableautoformat.hxx> #include <com/sun/star/beans/XPropertySet.hpp> @@ -21,15 +22,13 @@ #include <com/sun/star/uno/Reference.hxx> using namespace css; -using namespace css::uno; -using namespace com::sun::star; namespace sc_apitest { class ScAutoFormatObj : public CalcUnoApiTest, + public apitest::TableAutoFormat, public apitest::XEnumerationAccess, - public apitest::TableAutoFormat - + public apitest::XIndexAccess { public: ScAutoFormatObj(); @@ -40,11 +39,15 @@ public: CPPUNIT_TEST_SUITE(ScAutoFormatObj); + // TableAutoFormat + CPPUNIT_TEST(testTableAutoFormatProperties); + // XEnumerationAccess CPPUNIT_TEST(testCreateEnumeration); - // TableAutoFormat - CPPUNIT_TEST(testTableAutoFormatProperties); + // XIndexAccess + CPPUNIT_TEST(testGetByIndex); + CPPUNIT_TEST(testGetCount); CPPUNIT_TEST_SUITE_END(); @@ -54,19 +57,20 @@ private: ScAutoFormatObj::ScAutoFormatObj() : CalcUnoApiTest("/sc/qa/extras/testdocuments") + , XIndexAccess(16) { } uno::Reference<uno::XInterface> ScAutoFormatObj::init() { - uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW); - uno::Reference<lang::XMultiServiceFactory> xMSF(xDoc, UNO_QUERY_THROW); + uno::Reference<lang::XMultiServiceFactory> xMSF(xDoc, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIA( - xMSF->createInstance("com.sun.star.sheet.TableAutoFormats"), UNO_QUERY_THROW); + xMSF->createInstance("com.sun.star.sheet.TableAutoFormats"), uno::UNO_QUERY_THROW); uno::Reference<beans::XPropertySet> xTableAutoFormat(xIA->getByIndex(xIA->getCount() - 1), - UNO_QUERY_THROW); + uno::UNO_QUERY_THROW); return xTableAutoFormat; } @@ -84,7 +88,7 @@ void ScAutoFormatObj::tearDown() CPPUNIT_TEST_SUITE_REGISTRATION(ScAutoFormatObj); -} // end namespace +} // namespace sc_apitest CPPUNIT_PLUGIN_IMPLEMENT(); |