configmgr/source/xcsparser.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 27526cde7fb6cdcf23f23349cdc7ebdaa3d9bcfa
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Thu Mar 21 18:47:03 2024 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Fri Mar 22 10:09:12 2024 +0100

    configmgr: fix parse error if subelements of <info> used
    
    The unused but valid child elements of <info> such as <author> 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 <component> 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 <michael.st...@allotropia.de>
    (cherry picked from commit 8350404ec1c02df8b4f6b4f48947ddbff53d91e5)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165126
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

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_;

Reply via email to