sw/qa/api/SwXAutoTextContainer.cxx | 9 +++++++++ 1 file changed, 9 insertions(+)
New commits: commit a02f3eeffececfec5b43c4e5c4aa617fe4096176 Author: Miklos Vajna <[email protected]> AuthorDate: Mon Dec 16 09:12:32 2024 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Dec 19 11:32:53 2024 +0100 CppunitTest_sw_apitests: remove leftover myNewGroup2.bau before the test This fails for me in a tree that runs 'make check' and there was a previous 'make check' previously. Seems the trouble is that we have this C++ test creating an autotext .bau file, but there is also a Java one, so if we're not lucky with the order of these, the C++ one will fail with its hardcoded "must be 3 .bau files in instdir" assertion. Fix the immediate problem by removing the test .bau file before running the C++ test. A better, but more complex fix would be to create the test .bau file in the user profile (and not in instdir) for both the Java and C++ cases, and then none of these tests would influece other tests during 'make check'. Change-Id: I536d769db733515ec6a7d41fd7dbf601c4b582d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178548 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Tested-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178576 (cherry picked from commit 703cbc0bb75b0943cf5b95ff62c6fe4b4a028788) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178589 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins diff --git a/sw/qa/api/SwXAutoTextContainer.cxx b/sw/qa/api/SwXAutoTextContainer.cxx index 4d6031a990e4..c87952f091fb 100644 --- a/sw/qa/api/SwXAutoTextContainer.cxx +++ b/sw/qa/api/SwXAutoTextContainer.cxx @@ -53,6 +53,15 @@ public: Reference<text::XAutoTextContainer> xAutoTextContainer = text::AutoTextContainer::create(comphelper::getProcessComponentContext()); + try + { + // See qadevOOo/tests/java/mod/_sw/SwXAutoTextGroup.java. + xAutoTextContainer->removeByName(u"myNewGroup2*1"_ustr); + } + catch (const container::NoSuchElementException&) + { + } + Reference<container::XNameAccess> xNA(xAutoTextContainer, UNO_QUERY_THROW); Sequence<rtl::OUString> aNames = xNA->getElementNames(); std::cout << aNames[0] << std::endl;
