From 767bd70746e2c5149b18766df97acfc56ab4d978 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 21 Mar 2024 18:47:03 +0100 Subject: configmgr: fix parse error if subelements of used The unused but valid child elements of such as may be used by exentions. This fails with: warn:configmgr:15104:10916:configmgr/source/components.cxx:660: error reading "file:///instdir/program/../share/uno_packages/cache/uno_packages/....xcs" com.sun.star.uno.RuntimeException message: "bad member in ....xcs at configmgr/source/xcsparser.cxx:289" Because ending the first such element sets bIsParsingInfo_ to false. This fix just concatenates all the characters in all the children, should work well enough for extensions. (regression from commit db3078bd8c8e3ce3a99fc3987bb6e93b609990c1) Change-Id: I17a3fb7014cd34c1d546701036550085365432a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165143 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 8350404ec1c02df8b4f6b4f48947ddbff53d91e5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165126 Reviewed-by: Stephan Bergmann --- configmgr/source/xcsparser.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'configmgr') diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx index e70ddac6a6c9..35f61fa1959e 100644 --- a/configmgr/source/xcsparser.cxx +++ b/configmgr/source/xcsparser.cxx @@ -129,7 +129,9 @@ bool XcsParser::startElement( // illegal content): if (ignoring_ > 0 || (nsId == xmlreader::XmlReader::NAMESPACE_NONE - && (name == "import" || name == "uses" || name == "constraints" || name == "desc"))) + && (name == "import" || name == "uses" || name == "constraints" || name == "desc" + // the following are unused by LO but valid + || name == "deprecated" || name == "author" || name == "label"))) { assert(ignoring_ < LONG_MAX); ++ignoring_; -- cgit