LibreOffice Module oox (master) 1
|
Interface for binary output stream classes. More...
#include <binaryoutputstream.hxx>
Public Member Functions | |
virtual void | writeData (const StreamDataSequence &rData, size_t nAtomSize=1)=0 |
Derived classes implement writing the contents of the passed data sequence. More... | |
virtual void | writeMemory (const void *pMem, sal_Int32 nBytes, size_t nAtomSize=1)=0 |
Derived classes implement writing the contents of the (preallocated!) memory buffer pMem. More... | |
template<typename Type > | |
void | writeArray (Type *opnArray, sal_Int32 nElemCount) |
template<typename Type > | |
void | writeArray (const Type *opnArray, sal_Int32 nElemCount) |
template<typename Type > | |
void | writeValue (Type nValue) |
Writes a value to the stream and converts it to platform byte order. More... | |
BinaryOutputStream & | WriteInt16 (sal_Int16 x) |
BinaryOutputStream & | WriteUInt16 (sal_uInt16 x) |
BinaryOutputStream & | WriteInt32 (sal_Int32 x) |
BinaryOutputStream & | WriteUInt32 (sal_uInt32 x) |
BinaryOutputStream & | WriteInt64 (sal_Int64 x) |
void | writeCompressedUnicodeArray (const OUString &rString, bool bCompressed) |
void | writeCharArrayUC (std::u16string_view rString, rtl_TextEncoding eTextEnc) |
void | writeUnicodeArray (const OUString &rString) |
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 | |
BinaryOutputStream () | |
This dummy default c'tor will never call the c'tor of the virtual base class BinaryStreamBase as this class cannot be instantiated directly. More... | |
Protected Member Functions inherited from oox::BinaryStreamBase | |
BinaryStreamBase (bool bSeekable) | |
Private Member Functions | |
BinaryOutputStream (BinaryOutputStream const &)=delete | |
BinaryOutputStream & | operator= (BinaryOutputStream const &)=delete |
Additional Inherited Members | |
Protected Attributes inherited from oox::BinaryStreamBase | |
bool | mbEof |
End of stream flag. More... | |
Interface for binary output stream classes.
The binary data in the stream is written in little-endian format.
Definition at line 45 of file binaryoutputstream.hxx.
|
inlineprotected |
This dummy default c'tor will never call the c'tor of the virtual base class BinaryStreamBase as this class cannot be instantiated directly.
Definition at line 93 of file binaryoutputstream.hxx.
|
privatedelete |
|
privatedelete |
void oox::BinaryOutputStream::writeArray | ( | const Type * | opnArray, |
sal_Int32 | nElemCount | ||
) |
Definition at line 109 of file binaryoutputstream.hxx.
References writeArray().
void oox::BinaryOutputStream::writeArray | ( | Type * | opnArray, |
sal_Int32 | nElemCount | ||
) |
Definition at line 101 of file binaryoutputstream.hxx.
References oox::ByteOrderConverter::convertLittleEndianArray(), SAL_MAX_INT32, and writeMemory().
Referenced by oox::ole::OleHelper::exportGuid(), writeArray(), and writeUnicodeArray().
void oox::BinaryOutputStream::writeCharArrayUC | ( | std::u16string_view | rString, |
rtl_TextEncoding | eTextEnc | ||
) |
Definition at line 102 of file binaryoutputstream.cxx.
References OUStringToOString(), and writeMemory().
Referenced by writeCompressedUnicodeArray().
void oox::BinaryOutputStream::writeCompressedUnicodeArray | ( | const OUString & | rString, |
bool | bCompressed | ||
) |
Definition at line 123 of file binaryoutputstream.cxx.
References writeCharArrayUC(), and writeUnicodeArray().
|
pure virtual |
Derived classes implement writing the contents of the passed data sequence.
nAtomSize | The size of the elements in the memory block, if available. Derived classes may be interested in this information. |
Implemented in oox::ole::AxAlignedOutputStream, oox::BinaryXOutputStream, and oox::SequenceOutputStream.
Referenced by oox::BinaryInputStream::copyToStream(), oox::ole::AxAlignedOutputStream::pad(), and oox::ole::AxAlignedOutputStream::writeData().
|
inline |
Definition at line 78 of file binaryoutputstream.hxx.
References writeValue(), and x.
Referenced by oox::ole::AxBinaryPropertyWriter::finalizeExport().
|
inline |
Definition at line 80 of file binaryoutputstream.hxx.
References writeValue(), and x.
Referenced by oox::ole::OleFormCtrlExportHelper::exportName(), and oox::ole::AxBinaryPropertyWriter::PairProperty::writeProperty().
|
inline |
Definition at line 82 of file binaryoutputstream.hxx.
References writeValue(), and x.
Referenced by oox::ole::AxBinaryPropertyWriter::AxBinaryPropertyWriter(), and oox::ole::AxBinaryPropertyWriter::finalizeExport().
|
pure virtual |
Derived classes implement writing the contents of the (preallocated!) memory buffer pMem.
nAtomSize | The size of the elements in the memory block, if available. Derived classes may be interested in this information. |
Implemented in oox::BinaryXOutputStream, oox::SequenceOutputStream, and oox::ole::AxAlignedOutputStream.
Referenced by oox::ole::AxCommandButtonModel::exportCompObj(), oox::ole::AxLabelModel::exportCompObj(), oox::ole::AxImageModel::exportCompObj(), oox::ole::AxToggleButtonModel::exportCompObj(), oox::ole::AxCheckBoxModel::exportCompObj(), oox::ole::AxOptionButtonModel::exportCompObj(), oox::ole::AxTextBoxModel::exportCompObj(), oox::ole::AxNumericFieldModel::exportCompObj(), oox::ole::AxListBoxModel::exportCompObj(), oox::ole::AxComboBoxModel::exportCompObj(), oox::ole::AxSpinButtonModel::exportCompObj(), oox::ole::AxScrollBarModel::exportCompObj(), writeArray(), writeCharArrayUC(), oox::ole::AxAlignedOutputStream::writeMemory(), and writeValue().
|
inline |
Definition at line 79 of file binaryoutputstream.hxx.
References writeValue(), and x.
Referenced by oox::ole::AxBinaryPropertyWriter::AxBinaryPropertyWriter(), oox::ole::OleHelper::exportGuid(), and oox::crypto::Standard2007Engine::writeEncryptionInfo().
|
inline |
Definition at line 81 of file binaryoutputstream.hxx.
References writeValue(), and x.
Referenced by oox::ole::AxBinaryPropertyWriter::AxBinaryPropertyWriter(), oox::crypto::Standard2007Engine::encrypt(), oox::ole::OleHelper::exportGuid(), oox::ole::AxBinaryPropertyWriter::finalizeExport(), oox::crypto::AgileEngine::writeEncryptionInfo(), and oox::crypto::Standard2007Engine::writeEncryptionInfo().
void oox::BinaryOutputStream::writeUnicodeArray | ( | const OUString & | rString | ) |
Definition at line 110 of file binaryoutputstream.cxx.
References writeArray().
Referenced by oox::ole::OleFormCtrlExportHelper::exportName(), writeCompressedUnicodeArray(), and oox::crypto::Standard2007Engine::writeEncryptionInfo().
Writes a value to the stream and converts it to platform byte order.
All data types supported by the ByteOrderConverter class can be used.
Definition at line 117 of file binaryoutputstream.hxx.
References oox::ByteOrderConverter::convertLittleEndian(), nValue, and writeMemory().
Referenced by oox::ole::AxAlignedOutputStream::writeAligned(), WriteInt16(), WriteInt32(), WriteInt64(), WriteUInt16(), and WriteUInt32().