LibreOffice Module oox (master) 1
|
#include <textinputstream.hxx>
Public Member Functions | |
TextInputStream (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::io::XInputStream > &rxInStrm, rtl_TextEncoding eTextEnc) | |
TextInputStream (const css::uno::Reference< css::uno::XComponentContext > &rxContext, BinaryInputStream &rInStrm, rtl_TextEncoding eTextEnc) | |
~TextInputStream () | |
bool | isEof () const |
Returns true, if no more text is available in the stream. More... | |
OUString | readLine () |
Reads a text line from the stream. More... | |
OUString | readToChar (sal_Unicode cChar, bool bIncludeChar) |
Reads a text portion from the stream until the specified character is found. More... | |
Static Public Member Functions | |
static css::uno::Reference< css::io::XTextInputStream2 > | createXTextInputStream (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::io::XInputStream > &rxInStrm, rtl_TextEncoding eTextEnc) |
Creates a UNO text input stream object from the passed UNO input stream. More... | |
Private Member Functions | |
void | init (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::io::XInputStream > &rxInStrm, rtl_TextEncoding eTextEnc) |
OUString | createFinalString (const OUString &rString) |
Adds the pending character in front of the passed string, if existing. More... | |
Private Attributes | |
css::uno::Reference< css::io::XTextInputStream2 > | mxTextStrm |
sal_Unicode | mcPendingChar |
Definition at line 39 of file textinputstream.hxx.
|
explicit |
|
explicit |
oox::TextInputStream::~TextInputStream | ( | ) |
Definition at line 112 of file textinputstream.cxx.
|
private |
Adds the pending character in front of the passed string, if existing.
Definition at line 190 of file textinputstream.cxx.
|
static |
Creates a UNO text input stream object from the passed UNO input stream.
Definition at line 170 of file textinputstream.cxx.
References Exception.
|
private |
Definition at line 200 of file textinputstream.cxx.
bool oox::TextInputStream::isEof | ( | ) | const |
Returns true, if no more text is available in the stream.
Definition at line 116 of file textinputstream.cxx.
References Exception.
Referenced by oox::dump::TextLineStreamObject::implDumpText(), oox::dump::XmlStreamObject::implDumpText(), oox::ole::VbaUserForm::importForm(), oox::dump::SharedConfigData::readConfigFile(), oox::ole::VbaModule::readSourceCode(), and oox::ole::VbaProject::readVbaModules().
OUString oox::TextInputStream::readLine | ( | ) |
Reads a text line from the stream.
If the last line in the stream is not terminated with line-end character(s), the stream will immediately go into EOF state and return the text line. Otherwise, if the last character in the stream is a line-end character, the next call to this function will turn the stream into EOF state and return an empty string.
Definition at line 128 of file textinputstream.cxx.
References Exception.
Referenced by oox::dump::TextLineStreamObject::implDumpText(), oox::ole::VbaUserForm::importForm(), oox::ole::VbaModule::readSourceCode(), and oox::ole::VbaProject::readVbaModules().
OUString oox::TextInputStream::readToChar | ( | sal_Unicode | cChar, |
bool | bIncludeChar | ||
) |
Reads a text portion from the stream until the specified character is found.
If the end of the stream is not terminated with the specified character, the stream will immediately go into EOF state and return the remaining text portion. Otherwise, if the last character in the stream is the specified character (and caller specifies to read and return it, see parameter bIncludeChar), the next call to this function will turn the stream into EOF state and return an empty string.
cChar | The separator character to be read to. |
bIncludeChar | True = if found, the specified character will be read from stream and included in the returned string. False = the specified character will neither be read from the stream nor included in the returned string, but will be returned as first character in the next call of this function or readLine(). |
Definition at line 143 of file textinputstream.cxx.
References Exception.
Referenced by oox::dump::XmlStreamObject::implDumpText().
|
private |
Definition at line 113 of file textinputstream.hxx.
|
private |
Definition at line 112 of file textinputstream.hxx.