summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmloff/source/core/xmlimp.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 2c809d1112cb..fc0b407da3f2 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -778,12 +778,15 @@ rName
#ifdef DBG_UTIL
// Non product only: check if endElement call matches startELement call.
- OUString aLocalName;
- sal_uInt16 nPrefix =
- mpNamespaceMap->GetKeyByAttrName( rName, &aLocalName );
- SAL_WARN_IF( xContext->GetPrefix() != nPrefix, "xmloff.core", "SvXMLImport::endElement: popped context has wrong prefix" );
- SAL_WARN_IF( xContext->GetLocalName() != aLocalName, "xmloff.core", "SvXMLImport::endElement: popped context has wrong lname '"
- << aLocalName << "' expected. '" << xContext->GetLocalName() << "' with impl " << getImplementationName() );
+ if (!xContext->GetLocalName().isEmpty()) // prefix+localname are only valid in the non-FastParser case
+ {
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ mpNamespaceMap->GetKeyByAttrName( rName, &aLocalName );
+ SAL_WARN_IF( xContext->GetPrefix() != nPrefix, "xmloff.core", "SvXMLImport::endElement: popped context has wrong prefix" );
+ SAL_WARN_IF( xContext->GetLocalName() != aLocalName, "xmloff.core", "SvXMLImport::endElement: popped context has wrong lname '"
+ << aLocalName << "' expected. '" << xContext->GetLocalName() << "' with impl " << getImplementationName() );
+ }
#endif
// Call a EndElement at the current context.