|
LibreOffice Module sax (master) 1
|
Public Member Functions | |
| FastSaxParserImpl () | |
| ~FastSaxParserImpl () | |
| void | parseStream (const css::xml::sax::InputSource &aInputSource) |
| void | setFastDocumentHandler (const css::uno::Reference< css::xml::sax::XFastDocumentHandler > &Handler) |
| void | setTokenHandler (const css::uno::Reference< css::xml::sax::XFastTokenHandler > &Handler) |
| void | registerNamespace (const OUString &NamespaceURL, sal_Int32 NamespaceToken) |
| OUString const & | getNamespaceURL (std::u16string_view rPrefix) |
| void | setErrorHandler (const css::uno::Reference< css::xml::sax::XErrorHandler > &Handler) |
| void | setNamespaceHandler (const css::uno::Reference< css::xml::sax::XFastNamespaceHandler > &Handler) |
| void | setCustomEntityNames (const ::css::uno::Sequence<::css::beans::Pair<::rtl::OUString, ::rtl::OUString > > &replacements) |
| void | callbackStartElement (const xmlChar *localName, const xmlChar *prefix, const xmlChar *URI, int numNamespaces, const xmlChar **namespaces, int numAttributes, const xmlChar **attributes) |
| void | callbackEndElement () |
| void | callbackCharacters (const xmlChar *s, int nLen) |
| void | callbackProcessingInstruction (const xmlChar *target, const xmlChar *data) |
| xmlEntityPtr | callbackGetEntity (const xmlChar *name) |
| void | pushEntity (const ParserData &, xml::sax::InputSource const &) |
| void | popEntity () |
| Entity & | getEntity () |
| void | parse () |
| void | produce (bool bForceFlush=false) |
Public Attributes | |
| bool | m_bIgnoreMissingNSDecl |
| bool | m_bDisableThreadedParser |
Private Member Functions | |
| bool | consume (EventList &) |
| void | deleteUsedEvents () |
| void | sendPendingCharacters () |
| void | addUnknownElementWithPrefix (const xmlChar **attributes, int i, rtl::Reference< FastAttributeList > const &xAttributes) |
| sal_Int32 | GetToken (const xmlChar *pName) |
| sal_Int32 | GetTokenWithPrefix (const xmlChar *pPrefix, const xmlChar *pName) |
| OUString const & | GetNamespaceURL (std::string_view rPrefix) |
| sal_Int32 | GetNamespaceToken (const OUString &rNamespaceURL) |
| sal_Int32 | GetTokenWithContextNamespace (sal_Int32 nNamespaceToken, const xmlChar *pName) |
| void | DefineNamespace (const OString &rPrefix, const OUString &namespaceURL) |
Private Attributes | |
| std::vector< ReplacementPair > | m_Replacements |
| std::vector< xmlEntityPtr > | m_TemporalEntities |
| std::mutex | maMutex |
| Protecting whole parseStream() execution. More... | |
| ::rtl::Reference< FastLocatorImpl > | mxDocumentLocator |
| NamespaceMap | maNamespaceMap |
| ParserData | maData |
| Entity * | mpTop |
| Cached parser configuration for next call of parseStream(). More... | |
| std::stack< Entity > | maEntities |
| std::stack::top() is amazingly slow => cache this. More... | |
| std::vector< char > | pendingCharacters |
| Entity stack for each call of parseStream(). More... | |
Definition at line 225 of file fastparser.cxx.
|
explicit |
Definition at line 662 of file fastparser.cxx.
References mpTop, and mxDocumentLocator.
| sax_fastparser::FastSaxParserImpl::~FastSaxParserImpl | ( | ) |
Definition at line 670 of file fastparser.cxx.
References m_TemporalEntities, and mxDocumentLocator.
|
private |
Definition at line 1300 of file fastparser.cxx.
References i, m_bIgnoreMissingNSDecl, SAL_INFO, and XML_CAST.
Referenced by callbackStartElement().
| void sax_fastparser::FastSaxParserImpl::callbackCharacters | ( | const xmlChar * | s, |
| int | nLen | ||
| ) |
Definition at line 1333 of file fastparser.cxx.
References pendingCharacters.
| void sax_fastparser::FastSaxParserImpl::callbackEndElement | ( | ) |
Definition at line 1313 of file fastparser.cxx.
References getEntity(), pendingCharacters, produce(), SAL_WARN_IF, and sendPendingCharacters().
| xmlEntityPtr sax_fastparser::FastSaxParserImpl::callbackGetEntity | ( | const xmlChar * | name | ) |
Definition at line 1385 of file fastparser.cxx.
References m_Replacements, m_TemporalEntities, name, OUStringToOString(), and XML_CAST.
| void sax_fastparser::FastSaxParserImpl::callbackProcessingInstruction | ( | const xmlChar * | target, |
| const xmlChar * | data | ||
| ) |
Definition at line 1364 of file fastparser.cxx.
References getEntity(), pendingCharacters, produce(), sendPendingCharacters(), and XML_CAST.
| void sax_fastparser::FastSaxParserImpl::callbackStartElement | ( | const xmlChar * | localName, |
| const xmlChar * | prefix, | ||
| const xmlChar * | URI, | ||
| int | numNamespaces, | ||
| const xmlChar ** | namespaces, | ||
| int | numAttributes, | ||
| const xmlChar ** | attributes | ||
| ) |
Definition at line 1131 of file fastparser.cxx.
References addUnknownElementWithPrefix(), DefineNamespace(), getEntity(), GetNamespaceToken(), GetToken(), GetTokenWithContextNamespace(), GetTokenWithPrefix(), i, m_bIgnoreMissingNSDecl, mxDocumentLocator, NormalizeURI(), pendingCharacters, prefix, produce(), SAL_INFO, SAL_WARN, sendPendingCharacters(), and XML_CAST.
|
private |
Definition at line 1004 of file fastparser.cxx.
References getEntity(), and mxDocumentLocator.
Referenced by parseStream().
|
private |
Definition at line 684 of file fastparser.cxx.
References getEntity(), and GetNamespaceToken().
Referenced by callbackStartElement().
|
private |
Definition at line 960 of file fastparser.cxx.
References aEventList, and getEntity().
Referenced by parseStream().
|
inline |
Definition at line 269 of file fastparser.cxx.
References mpTop.
Referenced by callbackEndElement(), callbackProcessingInstruction(), callbackStartElement(), consume(), DefineNamespace(), deleteUsedEvents(), GetNamespaceURL(), GetToken(), GetTokenWithPrefix(), parse(), parseStream(), produce(), and sendPendingCharacters().
|
private |
Definition at line 724 of file fastparser.cxx.
References maNamespaceMap.
Referenced by callbackStartElement(), DefineNamespace(), and registerNamespace().
|
private |
| css::xml::sax::SAXException |
Definition at line 733 of file fastparser.cxx.
References Any, getEntity(), and nNamespace.
Referenced by getNamespaceURL().
| OUString const & sax_fastparser::FastSaxParserImpl::getNamespaceURL | ( | std::u16string_view | rPrefix | ) |
| css::lang::IllegalArgumentException | |
| css::uno::RuntimeException |
Definition at line 925 of file fastparser.cxx.
References Exception, GetNamespaceURL(), and OUStringToOString().
|
private |
Definition at line 696 of file fastparser.cxx.
References getEntity(), sax_fastparser::FastTokenHandlerBase::getTokenFromChars(), pName, and XML_CAST.
Referenced by callbackStartElement(), and GetTokenWithContextNamespace().
|
private |
Definition at line 748 of file fastparser.cxx.
References GetToken(), and pName.
Referenced by callbackStartElement(), and GetTokenWithPrefix().
|
private |
| css::xml::sax::SAXException |
Definition at line 702 of file fastparser.cxx.
References getEntity(), GetTokenWithContextNamespace(), m_bIgnoreMissingNSDecl, nNamespace, pName, sPrefix, and XML_CAST.
Referenced by callbackStartElement().
| void sax_fastparser::FastSaxParserImpl::parse | ( | ) |
Definition at line 1063 of file fastparser.cxx.
References Any, BUFFER_SIZE, getEntity(), mxDocumentLocator, and produce().
Referenced by parseStream().
| void sax_fastparser::FastSaxParserImpl::parseStream | ( | const css::xml::sax::InputSource & | aInputSource | ) |
| css::xml::sax::SAXException | |
| css::io::IOException | |
| css::uno::RuntimeException |
Definition at line 806 of file fastparser.cxx.
References aEventList, consume(), deleteUsedEvents(), getEntity(), m_bDisableThreadedParser, maData, maMutex, mxDocumentLocator, parse(), and pushEntity().
| void sax_fastparser::FastSaxParserImpl::popEntity | ( | ) |
Definition at line 1056 of file fastparser.cxx.
References maEntities, and mpTop.
| void sax_fastparser::FastSaxParserImpl::produce | ( | bool | bForceFlush = false | ) |
Definition at line 978 of file fastparser.cxx.
References getEntity().
Referenced by callbackEndElement(), callbackProcessingInstruction(), callbackStartElement(), parse(), and sendPendingCharacters().
| void sax_fastparser::FastSaxParserImpl::pushEntity | ( | const ParserData & | rEntityData, |
| xml::sax::InputSource const & | rSource | ||
| ) |
Definition at line 1038 of file fastparser.cxx.
References Any, maEntities, mpTop, and OUStringToOString().
Referenced by parseStream().
| void sax_fastparser::FastSaxParserImpl::registerNamespace | ( | const OUString & | NamespaceURL, |
| sal_Int32 | NamespaceToken | ||
| ) |
| css::lang::IllegalArgumentException | |
| css::uno::RuntimeException |
Definition at line 912 of file fastparser.cxx.
References GetNamespaceToken(), and maNamespaceMap.
|
private |
Definition at line 1349 of file fastparser.cxx.
References getEntity(), pendingCharacters, and produce().
Referenced by callbackEndElement(), callbackProcessingInstruction(), and callbackStartElement().
| void sax_fastparser::FastSaxParserImpl::setCustomEntityNames | ( | const ::css::uno::Sequence<::css::beans::Pair<::rtl::OUString, ::rtl::OUString > > & | replacements | ) |
Definition at line 947 of file fastparser.cxx.
References i, and m_Replacements.
| void sax_fastparser::FastSaxParserImpl::setErrorHandler | ( | const css::uno::Reference< css::xml::sax::XErrorHandler > & | Handler | ) |
| css::uno::RuntimeException |
Definition at line 937 of file fastparser.cxx.
References maData.
| void sax_fastparser::FastSaxParserImpl::setFastDocumentHandler | ( | const css::uno::Reference< css::xml::sax::XFastDocumentHandler > & | Handler | ) |
| css::uno::RuntimeException |
Definition at line 901 of file fastparser.cxx.
References maData.
| void sax_fastparser::FastSaxParserImpl::setNamespaceHandler | ( | const css::uno::Reference< css::xml::sax::XFastNamespaceHandler > & | Handler | ) |
| css::uno::RuntimeException |
Definition at line 942 of file fastparser.cxx.
References maData.
| void sax_fastparser::FastSaxParserImpl::setTokenHandler | ( | const css::uno::Reference< css::xml::sax::XFastTokenHandler > & | Handler | ) |
| css::uno::RuntimeException |
Definition at line 906 of file fastparser.cxx.
References maData.
| bool sax_fastparser::FastSaxParserImpl::m_bDisableThreadedParser |
Definition at line 273 of file fastparser.cxx.
Referenced by parseStream().
| bool sax_fastparser::FastSaxParserImpl::m_bIgnoreMissingNSDecl |
Definition at line 272 of file fastparser.cxx.
Referenced by addUnknownElementWithPrefix(), callbackStartElement(), and GetTokenWithPrefix().
|
private |
Definition at line 232 of file fastparser.cxx.
Referenced by callbackGetEntity(), and setCustomEntityNames().
|
private |
Definition at line 233 of file fastparser.cxx.
Referenced by callbackGetEntity(), and ~FastSaxParserImpl().
|
private |
Definition at line 295 of file fastparser.cxx.
Referenced by parseStream(), setErrorHandler(), setFastDocumentHandler(), setNamespaceHandler(), and setTokenHandler().
|
private |
std::stack::top() is amazingly slow => cache this.
Definition at line 298 of file fastparser.cxx.
Referenced by popEntity(), and pushEntity().
|
private |
Protecting whole parseStream() execution.
Definition at line 291 of file fastparser.cxx.
Referenced by parseStream().
|
private |
Definition at line 293 of file fastparser.cxx.
Referenced by GetNamespaceToken(), and registerNamespace().
|
private |
Cached parser configuration for next call of parseStream().
Definition at line 297 of file fastparser.cxx.
Referenced by getEntity(), popEntity(), and pushEntity().
|
private |
Definition at line 292 of file fastparser.cxx.
Referenced by callbackStartElement(), consume(), FastSaxParserImpl(), parse(), parseStream(), and ~FastSaxParserImpl().
|
private |
Entity stack for each call of parseStream().
Definition at line 299 of file fastparser.cxx.
Referenced by callbackCharacters(), callbackEndElement(), callbackProcessingInstruction(), callbackStartElement(), and sendPendingCharacters().