diff options
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/fastparser/fastparser.cxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 9f60b72c2d5c..9535902f92d2 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -859,6 +859,24 @@ void FastSaxParser::produce( CallbackType aType ) } } +bool FastSaxParser::hasNamespaceURL( const OUString& rPrefix ) const +{ + const Entity& rEntity = getEntity(); + + if (rEntity.maNamespaceCount.empty()) + return false; + + OString aPrefix = OUStringToOString(rPrefix, RTL_TEXTENCODING_UTF8); + sal_uInt32 nNamespace = rEntity.maNamespaceCount.top(); + while (nNamespace--) + { + if (rEntity.maNamespaceDefines[nNamespace]->maPrefix == aPrefix) + return true; + } + + return false; +} + bool FastSaxParser::consume(EventList *pEventList) { Entity& rEntity = getEntity(); @@ -924,6 +942,11 @@ Entity& FastSaxParser::getEntity() return maEntities.top(); } +const Entity& FastSaxParser::getEntity() const +{ + return maEntities.top(); +} + // starts parsing with actual parser ! void FastSaxParser::parse() { |