Repository.mk | 1 extras/Module_extras.mk | 1 extras/Package_autotext.mk | 14 +++++++++++++ officecfg/registry/data/org/openoffice/Office/Paths.xcu | 1 officecfg/registry/schema/org/openoffice/Office/Common.xcs | 1 sw/qa/api/SwXAutoTextContainer.cxx | 9 ++++++++ 6 files changed, 27 insertions(+)
New commits: commit 2388501ed81c4873d63f2f26505603ade06642d3 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Dec 16 11:09:15 2024 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Dec 16 14:33:15 2024 +0100 Reapply "add an autotext 'common' directory like templates/common" This reverts commit 331bcad4dbe923f4ce47cfe1de64ea0ffbe5a6ce now there is a fix for the problem that triggered the revert. Change-Id: I4acacd51d5799e80dfa42a0433278e684d82a860 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178577 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/Repository.mk b/Repository.mk index c67abb0e6171..7a5f2eabe0fe 100644 --- a/Repository.mk +++ b/Repository.mk @@ -959,6 +959,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\ extensions_OOoSpotlightImporter \ ) \ extras_autocorr \ + extras_autotext \ extras_autotextuser \ extras_cfgsrvnolang \ extras_cfgusr \ diff --git a/extras/Module_extras.mk b/extras/Module_extras.mk index f78c226cd401..717436fed25d 100644 --- a/extras/Module_extras.mk +++ b/extras/Module_extras.mk @@ -16,6 +16,7 @@ $(eval $(call gb_Module_add_targets,extras,\ CustomTarget_gallsystem \ CustomTarget_templates \ Package_autocorr \ + Package_autotext \ Package_autotextuser \ Package_cfgsrvnolang \ Package_cfgusr \ diff --git a/extras/Package_autotext.mk b/extras/Package_autotext.mk new file mode 100644 index 000000000000..d5b5c6471fc8 --- /dev/null +++ b/extras/Package_autotext.mk @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Package_Package,extras_autotext,$(gb_CustomTarget_workdir)/extras/source/autotext)) + +$(eval $(call gb_Package_add_empty_directory,extras_autotext,$(LIBO_SHARE_FOLDER)/autotext/common)) + +# vim: set noet sw=4 ts=4: diff --git a/officecfg/registry/data/org/openoffice/Office/Paths.xcu b/officecfg/registry/data/org/openoffice/Office/Paths.xcu index b5b304b8f362..fa25191be2a4 100644 --- a/officecfg/registry/data/org/openoffice/Office/Paths.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Paths.xcu @@ -34,6 +34,7 @@ </node> <node oor:name="AutoText" oor:op="fuse" oor:mandatory="true"> <node oor:name="InternalPaths"> + <node oor:name="$(insturl)/@LIBO_SHARE_FOLDER@/autotext/common" oor:op="fuse"/> <node oor:name="$(insturl)/@LIBO_SHARE_FOLDER@/autotext/$(vlang)" oor:op="fuse"/> </node> <prop oor:name="WritePath"> diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index 4fb3dec7983f..d705bf51aa83 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -1377,6 +1377,7 @@ </info> <value> <it>$(insturl)/@LIBO_SHARE_FOLDER@/autotext/$(vlang)</it> + <it>$(insturl)/@LIBO_SHARE_FOLDER@/autotext/common</it> <it>$(userurl)/autotext</it> </value> </prop> commit 703cbc0bb75b0943cf5b95ff62c6fe4b4a028788 Author: Miklos Vajna <[email protected]> AuthorDate: Mon Dec 16 09:12:32 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Dec 16 14:33:08 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 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;
