diff options
-rw-r--r-- | sax/source/fastparser/fastparser.cxx | 18 | ||||
-rw-r--r-- | starmath/source/mathmlattr.hxx | 1 | ||||
-rw-r--r-- | starmath/source/mathmlimport.cxx | 1 |
3 files changed, 10 insertions, 10 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 ) diff --git a/starmath/source/mathmlattr.hxx b/starmath/source/mathmlattr.hxx index fba6f3bc4195..104495d2c878 100644 --- a/starmath/source/mathmlattr.hxx +++ b/starmath/source/mathmlattr.hxx @@ -13,7 +13,6 @@ #include <rtl/ustring.hxx> #include <sal/types.h> #include <tools/fract.hxx> -#include "xparsmlbase.hxx" // MathML 3: 2.1.5.1 Syntax notation used in the MathML specification // <https://www.w3.org/TR/MathML/chapter2.html#id.2.1.5.1> diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index c06d0043dee7..e68184660850 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -63,6 +63,7 @@ one go*/ #include <memory> #include "mathmlattr.hxx" +#include "xparsmlbase.hxx" #include "mathmlimport.hxx" #include <document.hxx> #include <smdll.hxx> |