summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
Diffstat (limited to 'sax')
-rw-r--r--sax/source/fastparser/fastparser.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 04bf69a1705b..05288a4ef5f3 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -933,7 +933,6 @@ void FastSaxParserImpl::setNamespaceHandler( const Reference< XFastNamespaceHand
maData.mxNamespaceHandler = Handler;
}
-#include <stdio.h>
void FastSaxParserImpl::setCustomEntityNames( const ::css::uno::Sequence< ::rtl::OUString >& names, const ::css::uno::Sequence< ::rtl::OUString >& replacements )
{
mEntityNames = names;
@@ -1372,16 +1371,17 @@ xmlEntityPtr FastSaxParserImpl::callbackGetEntity( const xmlChar *name )
int lname = strlen(dname);
if( lname == 0 )
return xmlGetPredefinedEntity(name);
- if( !mEntityNames.hasElements() )
- return xmlGetPredefinedEntity(name);
- for( size_t i = 0; i < mEntityNames.size(); ++i )
+ if (mEntityNames.hasElements())
{
- if( mEntityNames[i].compareToAscii(dname) == 0 )
+ for (size_t i = 0; i < mEntityNames.size(); ++i)
{
- return xmlNewEntity( nullptr,
- name,
- XML_INTERNAL_GENERAL_ENTITY, nullptr, nullptr,
- BAD_CAST(OUStringToOString(mEntityReplacements[i],RTL_TEXTENCODING_UTF8).getStr()));
+ if (mEntityNames[i].compareToAscii(dname) == 0)
+ {
+ return xmlNewEntity(
+ nullptr, name, XML_INTERNAL_GENERAL_ENTITY, nullptr, nullptr,
+ BAD_CAST(
+ OUStringToOString(mEntityReplacements[i], RTL_TEXTENCODING_UTF8).getStr()));
+ }
}
}
if( lname < 2 )