LibreOffice Module oox (master)  1
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
oox::BinaryXSeekableStream Class Reference

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>

Inheritance diagram for oox::BinaryXSeekableStream:
[legend]
Collaboration diagram for oox::BinaryXSeekableStream:
[legend]

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 ()
 
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...
 

Detailed Description

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.

Constructor & Destructor Documentation

oox::BinaryXSeekableStream::~BinaryXSeekableStream ( )
overridevirtual

Definition at line 64 of file binarystreambase.cxx.

oox::BinaryXSeekableStream::BinaryXSeekableStream ( const css::uno::Reference< css::io::XSeekable > &  rxSeekable)
explicitprotected

Definition at line 58 of file binarystreambase.cxx.

Member Function Documentation

void oox::BinaryXSeekableStream::close ( )
overridevirtual

Releases the reference to the UNO XSeekable interface.

Implements oox::BinaryStreamBase.

Reimplemented in oox::BinaryXInputStream, and oox::BinaryXOutputStream.

Definition at line 107 of file binarystreambase.cxx.

References oox::BinaryStreamBase::mbEof, and mxSeekable.

Referenced by oox::BinaryXOutputStream::close(), and oox::BinaryXInputStream::close().

void oox::BinaryXSeekableStream::seek ( sal_Int64  nPos)
overridevirtual

Seeks the stream to the passed position, if wrapped stream is seekable.

Implements oox::BinaryStreamBase.

Definition at line 94 of file binarystreambase.cxx.

References Exception, oox::BinaryStreamBase::mbEof, and mxSeekable.

Referenced by oox::ole::MSConvertOCXControls::ReadOCXCtlsStream(), and oox::ole::VbaModule::readSourceCode().

sal_Int64 oox::BinaryXSeekableStream::size ( ) const
overridevirtual

Returns the size of the stream, if wrapped stream is seekable, otherwise -1.

Implements oox::BinaryStreamBase.

Definition at line 68 of file binarystreambase.cxx.

References Exception, mxSeekable, and TOOLS_WARN_EXCEPTION.

Referenced by oox::crypto::DocumentDecryption::DocumentDecryption(), and oox::ole::MSConvertOCXControls::ReadOCXStorage().

sal_Int64 oox::BinaryXSeekableStream::tell ( ) const
overridevirtual

Returns the current stream position, if wrapped stream is seekable, otherwise -1.

Implements oox::BinaryStreamBase.

Definition at line 81 of file binarystreambase.cxx.

References Exception, mxSeekable, and TOOLS_WARN_EXCEPTION.

Member Data Documentation

css::uno::Reference< css::io::XSeekable > oox::BinaryXSeekableStream::mxSeekable
private

Stream seeking interface.

Definition at line 143 of file binarystreambase.hxx.

Referenced by close(), seek(), size(), and tell().


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