LibreOffice Module oox (master) 1
|
Wrapper for a fast SAX parser that works on automatically generated OOXML token and namespace identifiers. More...
#include <fastparser.hxx>
Public Member Functions | |
FastParser () | |
FastParser (const FastParser &)=delete | |
FastParser & | operator= (const FastParser &)=delete |
~FastParser () | |
void | registerNamespace (sal_Int32 nNamespaceId) |
Registers an OOXML namespace at the parser. More... | |
void | setDocumentHandler (const css::uno::Reference< css::xml::sax::XFastDocumentHandler > &rxDocHandler) |
Sets the passed document handler that will receive the SAX parser events. More... | |
void | clearDocumentHandler () |
void | parseStream (const css::xml::sax::InputSource &rInputSource, bool bCloseStream=false) |
Parses the passed SAX input source. More... | |
void | parseStream (const css::uno::Reference< css::io::XInputStream > &rxInStream, const OUString &rStreamName) |
Parses the passed input stream. More... | |
void | parseStream (StorageBase &rStorage, const OUString &rStreamName) |
Parses a stream from the passed storage with the specified name. More... | |
const css::uno::Reference< css::xml::sax::XFastTokenHandler > & | getTokenHandler () const |
Private Attributes | |
css::uno::Reference< css::xml::sax::XFastTokenHandler > | mxTokenHandler |
const NamespaceMap & | mrNamespaceMap |
rtl::Reference< sax_fastparser::FastSaxParser > | mxParser |
Wrapper for a fast SAX parser that works on automatically generated OOXML token and namespace identifiers.
Definition at line 53 of file fastparser.hxx.
|
explicit |
css::uno::RuntimeException |
Definition at line 64 of file fastparser.cxx.
References mxParser, and mxTokenHandler.
|
delete |
oox::core::FastParser::~FastParser | ( | ) |
Definition at line 77 of file fastparser.cxx.
void oox::core::FastParser::clearDocumentHandler | ( | ) |
Definition at line 108 of file fastparser.cxx.
References mxParser.
|
inline |
Definition at line 105 of file fastparser.hxx.
|
delete |
void oox::core::FastParser::parseStream | ( | const css::uno::Reference< css::io::XInputStream > & | rxInStream, |
const OUString & | rStreamName | ||
) |
Parses the passed input stream.
bCloseStream | True = closes the passed stream after parsing. |
css::xml::sax::SAXException | |
css::io::IOException | |
css::uno::RuntimeException |
void oox::core::FastParser::parseStream | ( | const css::xml::sax::InputSource & | rInputSource, |
bool | bCloseStream = false |
||
) |
Parses the passed SAX input source.
bCloseStream | True = closes the stream in the input source after parsing. |
css::xml::sax::SAXException | |
css::io::IOException | |
css::uno::RuntimeException |
Referenced by oox::core::XmlFilterBase::importFragment(), oox::docprop::DocumentPropertiesImport::importProperties(), and parseStream().
void oox::core::FastParser::parseStream | ( | StorageBase & | rStorage, |
const OUString & | rStreamName | ||
) |
Parses a stream from the passed storage with the specified name.
bCloseStream | True = closes the stream after parsing. |
css::xml::sax::SAXException | |
css::io::IOException | |
css::uno::RuntimeException |
Definition at line 132 of file fastparser.cxx.
References oox::StorageBase::openInputStream(), and parseStream().
void oox::core::FastParser::registerNamespace | ( | sal_Int32 | nNamespaceId | ) |
Registers an OOXML namespace at the parser.
css::lang::IllegalArgumentException | |
css::uno::RuntimeException |
Definition at line 81 of file fastparser.cxx.
References oox::ContainerHelper::getMapElement(), oox::NamespaceMap::maStrictNamespaceMap, oox::NamespaceMap::maTransitionalNamespaceMap, mrNamespaceMap, and mxParser.
Referenced by oox::docprop::DocumentPropertiesImport::importProperties().
void oox::core::FastParser::setDocumentHandler | ( | const css::uno::Reference< css::xml::sax::XFastDocumentHandler > & | rxDocHandler | ) |
Sets the passed document handler that will receive the SAX parser events.
css::uno::RuntimeException |
Definition at line 101 of file fastparser.cxx.
References mxParser.
Referenced by oox::core::XmlFilterBase::importFragment(), and oox::docprop::DocumentPropertiesImport::importProperties().
|
private |
Definition at line 109 of file fastparser.hxx.
Referenced by registerNamespace().
|
private |
Definition at line 110 of file fastparser.hxx.
Referenced by clearDocumentHandler(), FastParser(), registerNamespace(), and setDocumentHandler().
|
private |
Definition at line 108 of file fastparser.hxx.
Referenced by FastParser().