--- a/oox/source/drawingml/hyperlinkcontext.cxx +++ b/oox/source/drawingml/hyperlinkcontext.cxx @@ -189,10 +189,12 @@ && rNamespace == "http://schemas.microsoft.com/office/drawing/2018/hyperlinkcolor" && rName.subView(rName.lastIndexOf(':') + 1) == u"hlinkClr") { - const sal_Int32 nSelection = AttributeList(rxAttribs).getToken(XML_val, XML_TOKEN_INVALID); - if (nSelection == XML_tx) + // ST_HyperlinkColor derives from xs:token: surrounding XML whitespace + // must collapse before comparing either documented enumeration value. + const OUString aSelection = AttributeList(rxAttribs).getStringDefaulted(XML_val).trim(); + if (aSelection == "tx") maProperties.setProperty(PROP_CharColor, XML_fillcolor); - else if (nSelection == XML_hlink) + else if (aSelection == "hlink") maProperties.erase(PROP_CharColor); } // hlinkClr is a leaf. No shared element-stack entry is pushed for unknown