LibreOffice Module oox (master) 1
|
Base class for binary input and output streams wrapping a UNO stream, seekable via the com.sun.star.io.XSeekable interface. More...
#include <binarystreambase.hxx>
Public Member Functions | |
virtual | ~BinaryXSeekableStream () override |
virtual sal_Int64 | size () const override |
Returns the size of the stream, if wrapped stream is seekable, otherwise -1. More... | |
virtual sal_Int64 | tell () const override |
Returns the current stream position, if wrapped stream is seekable, otherwise -1. More... | |
virtual void | seek (sal_Int64 nPos) override |
Seeks the stream to the passed position, if wrapped stream is seekable. More... | |
virtual void | close () override |
Releases the reference to the UNO XSeekable interface. More... | |
Public Member Functions inherited from oox::BinaryStreamBase | |
virtual | ~BinaryStreamBase () |
virtual sal_Int64 | size () const =0 |
Implementations return the size of the stream, if possible. More... | |
virtual sal_Int64 | tell () const =0 |
Implementations return the current stream position, if possible. More... | |
virtual void | seek (sal_Int64 nPos)=0 |
Implementations seek the stream to the passed position, if the stream is seekable. More... | |
virtual void | close ()=0 |
Implementations close the stream. More... | |
bool | isSeekable () const |
Returns true, if the implementation supports the seek() operation. More... | |
bool | isEof () const |
Returns true, if the stream position is invalid (EOF). More... | |
sal_Int64 | getRemaining () const |
Returns the size of the remaining data available in the stream, if stream supports size() and tell(), otherwise -1. More... | |
void | seekToStart () |
Seeks the stream to the beginning, if stream is seekable. More... | |
void | alignToBlock (sal_Int32 nBlockSize, sal_Int64 nAnchorPos) |
Seeks the stream forward to a position that is a multiple of the passed block size, if stream is seekable. More... | |
Protected Member Functions | |
BinaryXSeekableStream (const css::uno::Reference< css::io::XSeekable > &rxSeekable) | |
Protected Member Functions inherited from oox::BinaryStreamBase | |
BinaryStreamBase (bool bSeekable) | |
Private Attributes | |
css::uno::Reference< css::io::XSeekable > | mxSeekable |
Stream seeking interface. More... | |
Additional Inherited Members | |
Protected Attributes inherited from oox::BinaryStreamBase | |
bool | mbEof |
End of stream flag. More... | |
Base class for binary input and output streams wrapping a UNO stream, seekable via the com.sun.star.io.XSeekable interface.
Definition at line 123 of file binarystreambase.hxx.
|
overridevirtual |
Definition at line 63 of file binarystreambase.cxx.
|
explicitprotected |
Definition at line 57 of file binarystreambase.cxx.
|
overridevirtual |
Releases the reference to the UNO XSeekable interface.
Implements oox::BinaryStreamBase.
Reimplemented in oox::BinaryXInputStream, and oox::BinaryXOutputStream.
Definition at line 106 of file binarystreambase.cxx.
References oox::BinaryStreamBase::mbEof, and mxSeekable.
Referenced by oox::BinaryXInputStream::close(), and oox::BinaryXOutputStream::close().
|
overridevirtual |
Seeks the stream to the passed position, if wrapped stream is seekable.
Implements oox::BinaryStreamBase.
Definition at line 93 of file binarystreambase.cxx.
References Exception, oox::BinaryStreamBase::mbEof, mxSeekable, and nPos.
Referenced by oox::ole::MSConvertOCXControls::ReadOCXCtlsStream(), and oox::ole::VbaModule::readSourceCode().
|
overridevirtual |
Returns the size of the stream, if wrapped stream is seekable, otherwise -1.
Implements oox::BinaryStreamBase.
Definition at line 67 of file binarystreambase.cxx.
References Exception, mxSeekable, and TOOLS_WARN_EXCEPTION.
Referenced by oox::crypto::DocumentDecryption::DocumentDecryption(), and oox::ole::MSConvertOCXControls::ReadOCXStorage().
|
overridevirtual |
Returns the current stream position, if wrapped stream is seekable, otherwise -1.
Implements oox::BinaryStreamBase.
Definition at line 80 of file binarystreambase.cxx.
References Exception, mxSeekable, and TOOLS_WARN_EXCEPTION.
|
private |