10#ifndef INCLUDED_OOX_OLE_AXBINARYWRITER_HXX
11#define INCLUDED_OOX_OLE_AXBINARYWRITER_HXX
19#include <rtl/ustring.hxx>
40 virtual sal_Int64
size()
const override;
43 virtual sal_Int64
tell()
const override;
46 virtual void seek( sal_Int64
nPos )
override;
48 virtual void close()
override;
55 virtual void writeMemory(
const void* pMem, sal_Int32 nBytes,
size_t nAtomSize = 1 )
override;
59 void align(
size_t nSize );
61 void pad( sal_Int32 nBytes );
64 template<
typename Type >
75typedef ::std::pair< sal_Int32, sal_Int32 >
AxPairData;
86 template<
typename StreamType,
typename DataType >
Interface for binary output stream classes.
void writeValue(Type nValue)
Writes a value to the stream and converts it to platform byte order.
A wrapper for a binary output stream that supports aligned write operations.
void align(size_t nSize)
Aligns the stream to a multiple of the passed size (relative to the position of the wrapped stream at...
void pad(sal_Int32 nBytes)
virtual void writeMemory(const void *pMem, sal_Int32 nBytes, size_t nAtomSize=1) override
Reads nBytes bytes to the (existing) buffer opMem.
BinaryOutputStream * mpOutStrm
The wrapped input stream.
virtual void close() override
Closes the input stream but not the wrapped stream.
sal_Int64 mnStrmPos
Tracks relative position in the stream.
virtual sal_Int64 tell() const override
Return the current relative stream position (relative to position of the wrapped stream at constructi...
void writeAligned(Type nVal)
Aligns the stream according to the passed type and reads a value.
virtual void writeData(const StreamDataSequence &orData, size_t nAtomSize=1) override
Reads nBytes bytes to the passed sequence.
AxAlignedOutputStream(BinaryOutputStream &rOutStrm)
sal_Int64 mnStrmSize
Size of the wrapped stream data.
sal_Int64 mnWrappedBeginPos
starting pos or wrapped stream
virtual sal_Int64 size() const override
Returns the size of the data this stream represents, if the wrapped stream supports the size() operat...
virtual void seek(sal_Int64 nPos) override
Seeks the stream to the passed relative position, if it is behind the current position.
Export helper to write simple and complex ActiveX form control properties to a binary input stream.
ComplexPropVector maStreamProps
Stores info for all used stream data properties.
RefVector< ComplexProperty > ComplexPropVector
void finalizeExport()
Final processing, write contents of all complex properties, writes record size.
void writeIntProperty(DataType ornValue)
Write an integer property value to the stream, the respective flag in the property mask is set.
void writeBoolProperty(bool orbValue)
Write a boolean property value to the stream, the respective flag in the property mask is set.
sal_Int64 mnPropFlagsStart
pos of Prop flags
ComplexPropVector maLargeProps
Stores info for all used large properties.
void writePairProperty(AxPairData &orPairData)
Write a pair property the stream, the respective flag in the property mask is set.
bool mbValid
True = stream still valid.
AxBinaryPropertyWriter(BinaryOutputStream &rOutStrm, bool b64BitPropFlags=false)
AxAlignedOutputStream maOutStrm
The input stream to read from.
sal_Int64 mnPropFlags
Flags specifying existing properties.
void startNextProperty(bool bSkip=false)
void skipProperty()
Skips the next property clears the respective flag in the property mask.
void writeStringProperty(OUString &orValue)
Write a string property to the stream, the respective flag in the property mask is set.
sal_Int64 mnNextProp
Next property to read.
DataType
Specifiers for atomic data types.
::std::pair< sal_Int32, sal_Int32 > AxPairData
A pair of integer values as a property.
css::uno::Sequence< sal_Int8 > StreamDataSequence
Base class for complex properties such as string, point, size, GUID, picture.
virtual bool writeProperty(AxAlignedOutputStream &rOutStrm)=0
virtual ~ComplexProperty()
Complex property for a 32-bit value pair, e.g.
PairProperty(AxPairData &rPairData)
virtual bool writeProperty(AxAlignedOutputStream &rOutStrm) override
Stream property for a picture or mouse icon.
virtual bool writeProperty(AxAlignedOutputStream &rOutStrm) override
Complex property for a string value.
virtual bool writeProperty(AxAlignedOutputStream &rOutStrm) override
StringProperty(OUString &rValue, sal_uInt32 nSize)