qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAutoFormatObj.csv | 4 - sc/qa/extras/scautoformatobj.cxx | 34 ++++++---- 2 files changed, 23 insertions(+), 15 deletions(-)
New commits: commit 321607572f0880d1cd6c6de9ee931c33d90bae7c Author: Jens Carl <j.car...@gmx.de> AuthorDate: Tue Apr 2 00:06:44 2019 +0000 Commit: Jens Carl <j.car...@gmx.de> CommitDate: Tue Apr 2 03:09:14 2019 +0200 tdf#45904 Move XElementAccess Java tests to C++ Move XElementAccess Java tests to C++ for ScAutoFormatObj. Change-Id: I926052ed79d6639ef3898f6486b626ca6cc042c3 Reviewed-on: https://gerrit.libreoffice.org/70095 Tested-by: Jenkins Reviewed-by: Jens Carl <j.car...@gmx.de> 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 694fd818058d..ac08c66f293c 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::XElementAccess";"getElementType()" -"ScAutoFormatObj";"com::sun::star::container::XElementAccess";"hasElements()" "ScAutoFormatObj";"com::sun::star::container::XNamed";"getName()" "ScAutoFormatObj";"com::sun::star::container::XNamed";"setName()" "ScAutoFormatObj";"com::sun::star::beans::XPropertySet";"getPropertySetInfo()" diff --git a/sc/qa/extras/scautoformatobj.cxx b/sc/qa/extras/scautoformatobj.cxx index 8f86f46d2f9c..1f64c0b9c295 100644 --- a/sc/qa/extras/scautoformatobj.cxx +++ b/sc/qa/extras/scautoformatobj.cxx @@ -8,9 +8,11 @@ */ #include <test/calc_unoapi_test.hxx> +#include <test/container/xelementaccess.hxx> #include <test/container/xenumerationaccess.hxx> #include <test/container/xindexaccess.hxx> #include <test/sheet/tableautoformat.hxx> +#include <cppu/unotype.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XIndexAccess.hpp> @@ -27,6 +29,7 @@ namespace sc_apitest { class ScAutoFormatObj : public CalcUnoApiTest, public apitest::TableAutoFormat, + public apitest::XElementAccess, public apitest::XEnumerationAccess, public apitest::XIndexAccess { @@ -42,6 +45,10 @@ public: // TableAutoFormat CPPUNIT_TEST(testTableAutoFormatProperties); + // XElementAccess + CPPUNIT_TEST(testGetElementType); + CPPUNIT_TEST(testHasElements); + // XEnumerationAccess CPPUNIT_TEST(testCreateEnumeration); @@ -57,6 +64,7 @@ private: ScAutoFormatObj::ScAutoFormatObj() : CalcUnoApiTest("/sc/qa/extras/testdocuments") + , XElementAccess(cppu::UnoType<beans::XPropertySet>::get()) , XIndexAccess(16) { } commit 331e0c83466edef000ffb02b3e55cb49c5580347 Author: Jens Carl <j.car...@gmx.de> AuthorDate: Tue Apr 2 00:02:14 2019 +0000 Commit: Jens Carl <j.car...@gmx.de> CommitDate: Tue Apr 2 03:09:04 2019 +0200 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.car...@gmx.de> 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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits