diff options
-rw-r--r-- | include/xmloff/nmspmap.hxx | 13 | ||||
-rw-r--r-- | sax/source/expatwrap/saxwriter.cxx | 1 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlimprt.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimpit.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltbli.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLChartContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLSeries2Context.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/DocumentSettingsContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/DomBuilderContext.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/core/RDFaImportHelper.cxx | 5 | ||||
-rw-r--r-- | xmloff/source/core/nmspmap.cxx | 41 | ||||
-rw-r--r-- | xmloff/source/draw/eventimp.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/elementimport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/script/XMLEventImportHelper.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionImportContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtfldi.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/text/txtvfldi.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/transform/EventOOoTContext.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/transform/TransformerBase.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/xforms/xformsapi.cxx | 4 |
20 files changed, 61 insertions, 48 deletions
diff --git a/include/xmloff/nmspmap.hxx b/include/xmloff/nmspmap.hxx index 140dacdbb446..668bfd22745c 100644 --- a/include/xmloff/nmspmap.hxx +++ b/include/xmloff/nmspmap.hxx @@ -104,15 +104,14 @@ public: OUString GetAttrNameByKey( sal_uInt16 nKey ) const; - /* This will replace the version with the unused 5th default parameter */ - sal_uInt16 GetKeyByAttrName_( const OUString& rAttrName, + enum class QNameMode { AttrNameCached, AttrValue }; + sal_uInt16 GetKeyByQName(const OUString& rQName, OUString *pPrefix, OUString *pLocalName, - OUString *pNamespace = nullptr, - bool bCache = true) const; + OUString *pNamespace, + QNameMode eMode) const; - /* This will replace the version with the unused 3rd default parameter */ - sal_uInt16 GetKeyByAttrName_( const OUString& rAttrName, + sal_uInt16 GetKeyByAttrValueQName(const OUString& rAttrName, OUString *pLocalName) const; sal_uInt16 GetFirstKey() const; @@ -138,7 +137,7 @@ public: /* deprecated */ OUString GetAttrNameByIndex( sal_uInt16 nIdx ) const; /* deprecated */ OUString GetQNameByIndex( sal_uInt16 nIdx, const OUString& rLocalName ) const; -/* deprecated */ sal_uInt16 GetKeyByAttrName( const OUString& rAttrName, + sal_uInt16 GetKeyByAttrName( const OUString& rAttrName, OUString *pPrefix, OUString *pLocalName, OUString *pNamespace ) const; diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx index 7eb599a5cfc6..552447dda2e6 100644 --- a/sax/source/expatwrap/saxwriter.cxx +++ b/sax/source/expatwrap/saxwriter.cxx @@ -578,6 +578,7 @@ void CheckValidName(OUString const& rName) auto const c(rName[i]); if (c == ':') { + // see https://www.w3.org/TR/REC-xml-names/#ns-qualnames assert(!hasColon && "only one colon allowed"); hasColon = true; } diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 08e01b8cf7cd..1c90d5627fd2 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -1903,7 +1903,7 @@ void ScXMLImport::ExtractFormulaNamespaceGrammar( { // parse the attribute value, extract namespace ID, literal namespace, and formula string rFormulaNmsp.clear(); - sal_uInt16 nNsId = GetNamespaceMap().GetKeyByAttrName_( rAttrValue, nullptr, &rFormula, &rFormulaNmsp, false ); + sal_uInt16 nNsId = GetNamespaceMap().GetKeyByQName(rAttrValue, nullptr, &rFormula, &rFormulaNmsp, SvXMLNamespaceMap::QNameMode::AttrValue); // check if we have an ODF formula namespace if( !bRestrictToExternalNmsp ) switch( nNsId ) diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 1da664861205..4db664b1c84c 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -150,7 +150,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet, rNamespaceMap ); } } - else if( USHRT_MAX != nUnknownWhich ) + else if (USHRT_MAX != nUnknownWhich && !aLocalName.isEmpty()) { if( !pUnknownItem ) { diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index db95b73a328b..5873e9a6bf19 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -491,7 +491,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl( { OUString sTmp; const sal_uInt16 nPrefix2 = GetImport().GetNamespaceMap(). - GetKeyByAttrName_( rValue, &sTmp ); + GetKeyByAttrValueQName(rValue, &sTmp); m_sFormula = XML_NAMESPACE_OOOW == nPrefix2 ? sTmp : rValue; } break; diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index f06936d9139a..e5f677f3fa0e 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -337,7 +337,7 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut { OUString sClassName; sal_uInt16 nClassPrefix = - GetImport().GetNamespaceMap().GetKeyByAttrName( + GetImport().GetNamespaceMap().GetKeyByAttrValueQName( aValue, &sClassName ); if( XML_NAMESPACE_CHART == nClassPrefix ) { diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index 11cea543d7d7..32f84b0feae1 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -330,7 +330,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib { OUString aClassName; sal_uInt16 nClassPrefix = - GetImport().GetNamespaceMap().GetKeyByAttrName( + GetImport().GetNamespaceMap().GetKeyByAttrValueQName( aValue, &aClassName ); if( XML_NAMESPACE_CHART == nClassPrefix ) maSeriesChartTypeName = SchXMLTools::GetChartTypeByClassName( aClassName, false /* bUseOldNames */ ); diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 6f8b9788d082..087bf2d34b4b 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -320,7 +320,7 @@ SvXMLImportContextRef XMLDocumentSettingsContext::CreateChildContext( sal_uInt16 { OUString aLocalConfigName; sal_uInt16 nConfigPrefix = - GetImport().GetNamespaceMap().GetKeyByAttrName( + GetImport().GetNamespaceMap().GetKeyByAttrValueQName( sName, &aLocalConfigName ); if( XML_NAMESPACE_OOO == nConfigPrefix ) diff --git a/xmloff/source/core/DomBuilderContext.cxx b/xmloff/source/core/DomBuilderContext.cxx index 83e345deb08c..9f893d710ae0 100644 --- a/xmloff/source/core/DomBuilderContext.cxx +++ b/xmloff/source/core/DomBuilderContext.cxx @@ -121,8 +121,8 @@ void DomBuilderContext::StartElement( // namespace handling: determine namespace & namespace key OUString sNamespace; sal_uInt16 nNamespaceKey = - GetImport().GetNamespaceMap().GetKeyByAttrName_( - rName, nullptr, nullptr, &sNamespace ); + GetImport().GetNamespaceMap().GetKeyByAttrName( + rName, nullptr, nullptr, &sNamespace); // create attribute node and set value Reference<XElement> xElement( mxNode, UNO_QUERY_THROW ); diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx index 7b29abf94f41..81af8cb9d976 100644 --- a/xmloff/source/core/RDFaImportHelper.cxx +++ b/xmloff/source/core/RDFaImportHelper.cxx @@ -169,8 +169,9 @@ RDFaReader::ReadCURIE(OUString const & i_rCURIE) const OUString Prefix; OUString LocalName; OUString Namespace; - sal_uInt16 nKey( GetImport().GetNamespaceMap().GetKeyByAttrName_( - i_rCURIE, &Prefix, &LocalName, &Namespace) ); + // LocalName may contain ':', see "ipchar" in RFC 3987 + sal_uInt16 nKey( GetImport().GetNamespaceMap().GetKeyByQName( + i_rCURIE, &Prefix, &LocalName, &Namespace, SvXMLNamespaceMap::QNameMode::AttrValue) ); if ( Prefix == "_" ) { // eeek, it's a bnode! diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx index c1ee7412f438..2a2d106a6408 100644 --- a/xmloff/source/core/nmspmap.cxx +++ b/xmloff/source/core/nmspmap.cxx @@ -260,24 +260,29 @@ OUString SvXMLNamespaceMap::GetQNameByKey( sal_uInt16 nKey, } } -sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName_( - const OUString& rAttrName, +sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrValueQName( + const OUString& rAttrValue, OUString *pLocalName) const { - return GetKeyByAttrName_( rAttrName, nullptr, pLocalName, nullptr, false/*bCache*/ ); + return GetKeyByQName(rAttrValue, nullptr, pLocalName, nullptr, QNameMode::AttrValue); } -sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName_( const OUString& rAttrName, +/** + @param rQName either attribute name or qualified/namespaced attribute value + @param bCacheAttrName true: rQName is element or attribute name, cache it + false: rQName is attribute value, may contain extra ':', don't cache it + */ +sal_uInt16 SvXMLNamespaceMap::GetKeyByQName(const OUString& rQName, OUString *pPrefix, OUString *pLocalName, OUString *pNamespace, - bool bCache) const + QNameMode const eMode) const { sal_uInt16 nKey; NameSpaceHash::const_iterator it; - if (bCache) - it = aNameCache.find ( rAttrName ); + if (eMode == QNameMode::AttrNameCached) + it = aNameCache.find ( rQName ); else it = aNameCache.end(); if ( it != aNameCache.end() ) @@ -298,17 +303,23 @@ sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName_( const OUString& rAttrName, { OUString sEntryPrefix, sEntryName; - sal_Int32 nColonPos = rAttrName.indexOf( ':' ); + sal_Int32 nColonPos = rQName.indexOf( ':' ); if( -1 == nColonPos ) { // case: no ':' found -> default namespace - sEntryName = rAttrName; + sEntryName = rQName; } else { // normal case: ':' found -> get prefix/suffix - sEntryPrefix = rAttrName.copy( 0L, nColonPos ); - sEntryName = rAttrName.copy( nColonPos + 1 ); + sEntryPrefix = rQName.copy( 0L, nColonPos ); + sEntryName = rQName.copy( nColonPos + 1 ); + } + + if (eMode == QNameMode::AttrNameCached && sEntryName.indexOf(':') != -1) + { + SAL_INFO("xmloff", "invalid attribute name with multiple ':'"); + return XML_NAMESPACE_UNKNOWN; } if( pPrefix ) @@ -333,13 +344,13 @@ sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName_( const OUString& rAttrName, else nKey = XML_NAMESPACE_UNKNOWN; - if (bCache) + if (eMode == QNameMode::AttrNameCached) { rtl::Reference<NameSpaceEntry> xEntry(new NameSpaceEntry); xEntry->sPrefix = std::move(sEntryPrefix); xEntry->sName = std::move(sEntryName); xEntry->nKey = std::move(nKey); - aNameCache.emplace(rAttrName, std::move(xEntry)); + aNameCache.emplace(rQName, std::move(xEntry)); } } @@ -420,7 +431,7 @@ sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName( const OUString& rAttrName, OUString *pLocalName) const { - return GetKeyByAttrName_( rAttrName, nullptr, pLocalName ); + return GetKeyByQName(rAttrName, nullptr, pLocalName, nullptr, QNameMode::AttrNameCached); } sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName( const OUString& rAttrName, @@ -428,7 +439,7 @@ sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName( const OUString& rAttrName, OUString *pLocalName, OUString *pNamespace ) const { - return GetKeyByAttrName_ ( rAttrName, pPrefix, pLocalName, pNamespace ); + return GetKeyByQName(rAttrName, pPrefix, pLocalName, pNamespace, QNameMode::AttrNameCached); } bool SvXMLNamespaceMap::NormalizeURI( OUString& rName ) diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx index f88af2fc88b3..f119c9fd0067 100644 --- a/xmloff/source/draw/eventimp.cxx +++ b/xmloff/source/draw/eventimp.cxx @@ -194,7 +194,7 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons { sEventName = sValue; sal_uInt16 nScriptPrefix = - GetImport().GetNamespaceMap().GetKeyByAttrName( sValue, &sEventName ); + GetImport().GetNamespaceMap().GetKeyByAttrValueQName(sValue, &sEventName); maData.mbValid = XML_NAMESPACE_DOM == nScriptPrefix && sEventName == "click"; } else if( IsXMLToken( aAttrLocalName, XML_LANGUAGE ) ) @@ -203,7 +203,7 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons OUString aScriptLanguage; maData.msLanguage = sValue; sal_uInt16 nScriptPrefix = rImp.GetNamespaceMap(). - GetKeyByAttrName( maData.msLanguage, &aScriptLanguage ); + GetKeyByAttrValueQName(maData.msLanguage, &aScriptLanguage); if( XML_NAMESPACE_OOO == nScriptPrefix ) maData.msLanguage = aScriptLanguage; } diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 877095defd42..1e3281750996 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -147,7 +147,7 @@ namespace xmloff if ( !sControlImplementation.isEmpty() ) { OUString sOOoImplementationName; - const sal_uInt16 nImplPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sControlImplementation, &sOOoImplementationName ); + const sal_uInt16 nImplPrefix = GetImport().GetNamespaceMap().GetKeyByAttrValueQName( sControlImplementation, &sOOoImplementationName ); m_sServiceName = ( nImplPrefix == XML_NAMESPACE_OOO ) ? sOOoImplementationName : sControlImplementation; } diff --git a/xmloff/source/script/XMLEventImportHelper.cxx b/xmloff/source/script/XMLEventImportHelper.cxx index 1e2c39e144ae..bbdb65ecbcd0 100644 --- a/xmloff/source/script/XMLEventImportHelper.cxx +++ b/xmloff/source/script/XMLEventImportHelper.cxx @@ -113,7 +113,7 @@ SvXMLImportContext* XMLEventImportHelper::CreateContext( // translate event name from xml to api OUString sMacroName; sal_uInt16 nMacroPrefix = - rImport.GetNamespaceMap().GetKeyByAttrName( rXmlEventName, + rImport.GetNamespaceMap().GetKeyByAttrValueQName(rXmlEventName, &sMacroName ); XMLEventName aEventName( nMacroPrefix, sMacroName ); NameMap::iterator aNameIter = pEventNameMap->find(aEventName); @@ -121,7 +121,7 @@ SvXMLImportContext* XMLEventImportHelper::CreateContext( { OUString aScriptLanguage; sal_uInt16 nScriptPrefix = rImport.GetNamespaceMap(). - GetKeyByAttrName( rLanguage, &aScriptLanguage ); + GetKeyByAttrValueQName(rLanguage, &aScriptLanguage); if( XML_NAMESPACE_OOO != nScriptPrefix ) aScriptLanguage = rLanguage ; diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx index d5783a26fcc3..d34bd224f248 100644 --- a/xmloff/source/text/XMLSectionImportContext.cxx +++ b/xmloff/source/text/XMLSectionImportContext.cxx @@ -254,7 +254,7 @@ void XMLSectionImportContext::ProcessAttributes( { OUString sTmp; sal_uInt16 nPrefix = GetImport().GetNamespaceMap(). - GetKeyByAttrName_( sAttr, &sTmp ); + GetKeyByAttrValueQName(sAttr, &sTmp); if( XML_NAMESPACE_OOOW == nPrefix ) { sCond = sTmp; diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 10e246596821..391b047dd5cb 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -1318,7 +1318,7 @@ void XMLDatabaseNextImportContext::ProcessAttribute( if (XML_TOK_TEXTFIELD_CONDITION == nAttrToken) { OUString sTmp; - sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName_( + sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrValueQName( sAttrValue, &sTmp ); if( XML_NAMESPACE_OOOW == nPrefix ) { @@ -1843,7 +1843,7 @@ void XMLHiddenParagraphImportContext::ProcessAttribute( if (XML_TOK_TEXTFIELD_CONDITION == nAttrToken) { OUString sTmp; - sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName_( + sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrValueQName( sAttrValue, &sTmp ); if( XML_NAMESPACE_OOOW == nPrefix ) { @@ -1901,7 +1901,7 @@ void XMLConditionalTextImportContext::ProcessAttribute( { OUString sTmp; sal_uInt16 nPrefix = GetImport().GetNamespaceMap(). - GetKeyByAttrName_( sAttrValue, &sTmp ); + GetKeyByAttrValueQName(sAttrValue, &sTmp); if( XML_NAMESPACE_OOOW == nPrefix ) { sCondition = sTmp; @@ -1971,7 +1971,7 @@ void XMLHiddenTextImportContext::ProcessAttribute( { OUString sTmp; sal_uInt16 nPrefix = GetImport().GetNamespaceMap(). - GetKeyByAttrName_( sAttrValue, &sTmp ); + GetKeyByAttrValueQName(sAttrValue, &sTmp); if( XML_NAMESPACE_OOOW == nPrefix ) { sCondition = sTmp; diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index e2ddd6ec42d5..257180699e9e 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.cxx @@ -130,7 +130,7 @@ void XMLVarFieldImportContext::ProcessAttribute( { OUString sTmp; sal_uInt16 nPrefix = GetImport().GetNamespaceMap(). - GetKeyByAttrName_( sAttrValue, &sTmp ); + GetKeyByAttrValueQName(sAttrValue, &sTmp); if( XML_NAMESPACE_OOOW == nPrefix ) { sFormula = sTmp; @@ -1196,7 +1196,7 @@ void XMLValueImportHelper::ProcessAttribute( { OUString sTmp; sal_uInt16 nPrefix = rImport.GetNamespaceMap(). - GetKeyByAttrName_( sAttrValue, &sTmp ); + GetKeyByAttrValueQName(sAttrValue, &sTmp); if( XML_NAMESPACE_OOOW == nPrefix ) { sFormula = sTmp; diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx index bd77d1116425..71566a3466e0 100644 --- a/xmloff/source/transform/EventOOoTContext.cxx +++ b/xmloff/source/transform/EventOOoTContext.cxx @@ -82,7 +82,8 @@ XMLEventOOoTransformerContext::XMLEventOOoTransformerContext( const OUString& rQName, bool bPersistent ) : XMLPersElemContentTContext( rImp, rQName, - rImp.GetNamespaceMap().GetKeyByAttrName( rQName ), XML_EVENT_LISTENER ), + rImp.GetNamespaceMap().GetKeyByAttrValueQName(rQName, nullptr), + XML_EVENT_LISTENER), m_bPersistent( bPersistent ) { } diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index 2a838cbfc97b..acc7c541fbdf 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -1206,7 +1206,7 @@ bool XMLTransformerBase::RemoveNamespacePrefix( OUString& rName, { OUString aLocalName; sal_uInt16 nPrefix = - GetNamespaceMap().GetKeyByAttrName_( rName, &aLocalName ); + GetNamespaceMap().GetKeyByAttrValueQName(rName, &aLocalName); bool bRet = XML_NAMESPACE_UNKNOWN != nPrefix && (USHRT_MAX == nPrefixOnly || nPrefix == nPrefixOnly); if( bRet ) diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx index 1c1d21125418..7f56fc1f3f3b 100644 --- a/xmloff/source/xforms/xformsapi.cxx +++ b/xmloff/source/xforms/xformsapi.cxx @@ -195,7 +195,7 @@ sal_uInt16 xforms_getTypeClass( { // translate name into token for local name OUString sLocalName; - sal_uInt16 nPrefix = rNamespaceMap.GetKeyByAttrName(rXMLName, &sLocalName); + sal_uInt16 nPrefix = rNamespaceMap.GetKeyByAttrValueQName(rXMLName, &sLocalName); static const SvXMLTokenMap aMap( aTypes ); sal_uInt16 nToken = aMap.Get( nPrefix, sLocalName ); @@ -265,7 +265,7 @@ OUString xforms_getTypeName( const OUString& rXMLName ) { OUString sLocalName; - sal_uInt16 nPrefix = rNamespaceMap.GetKeyByAttrName(rXMLName, &sLocalName); + sal_uInt16 nPrefix = rNamespaceMap.GetKeyByAttrValueQName(rXMLName, &sLocalName); static const SvXMLTokenMap aMap( aTypes ); sal_uInt16 nToken = aMap.Get( nPrefix, sLocalName ); return ( nToken == XML_TOK_UNKNOWN ) |