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

◆ InputStream()

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

◆ ~InputStream()

oox::vml::InputStream::~InputStream ( )
overridevirtual

Definition at line 280 of file vmlinputstream.cxx.

Member Function Documentation

◆ available()

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

Definition at line 328 of file vmlinputstream.cxx.

◆ closeInput()

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

Definition at line 334 of file vmlinputstream.cxx.

◆ readBytes()

virtual sal_Int32 SAL_CALL oox::vml::InputStream::readBytes ( css::uno::Sequence< sal_Int8 > &  rData,
sal_Int32  nBytesToRead 
)
overridevirtual

◆ readSomeBytes()

virtual sal_Int32 SAL_CALL oox::vml::InputStream::readSomeBytes ( css::uno::Sequence< sal_Int8 > &  rData,
sal_Int32  nMaxBytesToRead 
)
overridevirtual

◆ readToElementBegin()

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

Definition at line 379 of file vmlinputstream.cxx.

References OUStringToOString().

◆ readToElementEnd()

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

Definition at line 384 of file vmlinputstream.cxx.

References OUStringToOString().

◆ skipBytes()

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

Definition at line 314 of file vmlinputstream.cxx.

◆ updateBuffer()

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

Definition at line 341 of file vmlinputstream.cxx.

References aBuffer, oox::vml::gaClosingCData(), and oox::vml::gaOpeningCData().

Member Data Documentation

◆ maBuffer

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

Definition at line 86 of file vmlinputstream.hxx.

◆ maClosingBracket

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

Definition at line 85 of file vmlinputstream.hxx.

◆ maOpeningBracket

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

Definition at line 84 of file vmlinputstream.hxx.

◆ mnBufferPos

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

Definition at line 87 of file vmlinputstream.hxx.

◆ mxTextStrm

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

Definition at line 83 of file vmlinputstream.hxx.


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