diff options
author | anfanite396 <dipamt1729@gmail.com> | 2023-08-11 19:13:08 +0530 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2023-08-25 08:23:23 +0200 |
commit | 7b999ca22824e102d283a8b7327fa2717db6568a (patch) | |
tree | 887b27982b8a13d50d86865a0332c2a5a6b43126 /sw/qa | |
parent | bb8f57dfa17e108c4cd5d08a538077c3d2c6f195 (diff) |
tdf#45904: Move _XAutoTextContainer Java tests to C++
Change-Id: Ie6ebc43c52204984cb6196f539c735701d13dc22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155627
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/api/SwXAutoTextContainer.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sw/qa/api/SwXAutoTextContainer.cxx b/sw/qa/api/SwXAutoTextContainer.cxx index 7651c4360e9a..f848846324e0 100644 --- a/sw/qa/api/SwXAutoTextContainer.cxx +++ b/sw/qa/api/SwXAutoTextContainer.cxx @@ -11,6 +11,7 @@ #include <test/container/xnameaccess.hxx> #include <test/container/xindexaccess.hxx> #include <test/container/xelementaccess.hxx> +#include <test/text/xautotextcontainer.hxx> #include <com/sun/star/frame/Desktop.hpp> @@ -30,14 +31,16 @@ namespace class SwXAutoTextContainer final : public UnoApiTest, public apitest::XElementAccess, public apitest::XIndexAccess, - public apitest::XNameAccess + public apitest::XNameAccess, + public apitest::XAutoTextContainer { public: SwXAutoTextContainer() : UnoApiTest("") , XElementAccess(cppu::UnoType<text::XAutoTextGroup>::get()) , XIndexAccess(3) - , XNameAccess("standard") + , XNameAccess("crdbus50") + , XAutoTextContainer("crdbus50") { } @@ -52,6 +55,10 @@ public: Reference<text::XAutoTextContainer> xAutoTextContainer = text::AutoTextContainer::create(comphelper::getProcessComponentContext()); + Reference<container::XNameAccess> xNA(xAutoTextContainer, UNO_QUERY_THROW); + Sequence<rtl::OUString> aNames = xNA->getElementNames(); + std::cout << aNames[0] << std::endl; + return Reference<XInterface>(xAutoTextContainer, UNO_QUERY_THROW); } @@ -63,10 +70,12 @@ public: CPPUNIT_TEST(testGetByIndex); CPPUNIT_TEST(testGetElementType); CPPUNIT_TEST(testHasElements); + CPPUNIT_TEST(testInsertNewByName); + CPPUNIT_TEST(testRemoveByName); CPPUNIT_TEST_SUITE_END(); }; CPPUNIT_TEST_SUITE_REGISTRATION(SwXAutoTextContainer); } -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |