LibreOffice Module oox (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
oox::vml::InputStream Class Referencefinal

An input stream class for VML streams, implementing the UNO interface com.sun.star.io.XInputStream needed by the Expat XML parsers. More...

#include <vmlinputstream.hxx>

Inheritance diagram for oox::vml::InputStream:
[legend]
Collaboration diagram for oox::vml::InputStream:
[legend]

Public Member Functions

 InputStream (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::io::XInputStream > &rxInStrm)
 
virtual ~InputStream () override
 
virtual sal_Int32 SAL_CALL readBytes (css::uno::Sequence< sal_Int8 > &rData, sal_Int32 nBytesToRead) override
 
virtual sal_Int32 SAL_CALL readSomeBytes (css::uno::Sequence< sal_Int8 > &rData, sal_Int32 nMaxBytesToRead) override
 
virtual void SAL_CALL skipBytes (sal_Int32 nBytesToSkip) override
 
virtual sal_Int32 SAL_CALL available () override
 
virtual void SAL_CALL closeInput () override
 

Private Member Functions

void updateBuffer ()
 
OString readToElementBegin ()
 
OString readToElementEnd ()
 

Private Attributes

css::uno::Reference< css::io::XTextInputStream2 > mxTextStrm
 
css::uno::Sequence< sal_UnicodemaOpeningBracket
 
css::uno::Sequence< sal_UnicodemaClosingBracket
 
OString maBuffer
 
sal_Int32 mnBufferPos
 

Detailed Description

An input stream class for VML streams, implementing the UNO interface com.sun.star.io.XInputStream needed by the Expat XML parsers.

This stream reads the data from the input stream passed to the constructor, and parses all XML elements for features unsupported by the current Expat XML parser:

1) All elements that have the form '<![inst]>' where 'inst' is any string not containing the characters '<' and '>' are stripped from the input stream.

2) Multiple occurrences of the same attribute in an element but the last are removed.

3) Line breaks represented by a single
element (without matching element) are replaced by a literal LF character.

Definition at line 56 of file vmlinputstream.hxx.

Constructor & Destructor Documentation

oox::vml::InputStream::InputStream ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::io::XInputStream > &  rxInStrm 
)
explicit
oox::vml::InputStream::~InputStream ( )
overridevirtual

Definition at line 282 of file vmlinputstream.cxx.

Member Function Documentation

sal_Int32 SAL_CALL oox::vml::InputStream::available ( )
overridevirtual

Definition at line 330 of file vmlinputstream.cxx.

References maBuffer, mnBufferPos, and updateBuffer().

void SAL_CALL oox::vml::InputStream::closeInput ( )
overridevirtual

Definition at line 336 of file vmlinputstream.cxx.

References mxTextStrm.

virtual sal_Int32 SAL_CALL oox::vml::InputStream::readBytes ( css::uno::Sequence< sal_Int8 > &  rData,
sal_Int32  nBytesToRead 
)
overridevirtual
virtual sal_Int32 SAL_CALL oox::vml::InputStream::readSomeBytes ( css::uno::Sequence< sal_Int8 > &  rData,
sal_Int32  nMaxBytesToRead 
)
overridevirtual
OString oox::vml::InputStream::readToElementBegin ( )
private
Exceptions
css::io::IOException
css::uno::RuntimeException

Definition at line 381 of file vmlinputstream.cxx.

References maOpeningBracket, mxTextStrm, and OUStringToOString().

Referenced by updateBuffer().

OString oox::vml::InputStream::readToElementEnd ( )
private
Exceptions
css::io::IOException
css::uno::RuntimeException

Definition at line 386 of file vmlinputstream.cxx.

References maClosingBracket, mxTextStrm, and OUStringToOString().

Referenced by updateBuffer().

void SAL_CALL oox::vml::InputStream::skipBytes ( sal_Int32  nBytesToSkip)
overridevirtual

Definition at line 316 of file vmlinputstream.cxx.

References maBuffer, mnBufferPos, mxTextStrm, and updateBuffer().

void oox::vml::InputStream::updateBuffer ( )
private
Exceptions
css::io::IOException
css::uno::RuntimeException

Definition at line 343 of file vmlinputstream.cxx.

References aBuffer, oox::vml::gaClosingCData(), oox::vml::gaOpeningCData(), maBuffer, mnBufferPos, mxTextStrm, readToElementBegin(), and readToElementEnd().

Referenced by available(), and skipBytes().

Member Data Documentation

OString oox::vml::InputStream::maBuffer
private

Definition at line 86 of file vmlinputstream.hxx.

Referenced by available(), skipBytes(), and updateBuffer().

css::uno::Sequence< sal_Unicode > oox::vml::InputStream::maClosingBracket
private

Definition at line 85 of file vmlinputstream.hxx.

Referenced by readToElementEnd().

css::uno::Sequence< sal_Unicode > oox::vml::InputStream::maOpeningBracket
private

Definition at line 84 of file vmlinputstream.hxx.

Referenced by readToElementBegin().

sal_Int32 oox::vml::InputStream::mnBufferPos
private

Definition at line 87 of file vmlinputstream.hxx.

Referenced by available(), skipBytes(), and updateBuffer().

css::uno::Reference< css::io::XTextInputStream2 > oox::vml::InputStream::mxTextStrm
private

The documentation for this class was generated from the following files: