LibreOffice Module oox (master) 1
|
Import helper to read simple and complex ActiveX form control properties from a binary input stream. More...
#include <axbinaryreader.hxx>
Classes | |
struct | ArrayStringProperty |
Complex property for an array of strings. More... | |
struct | ComplexProperty |
Base class for complex properties such as string, point, size, GUID, picture. More... | |
struct | FontProperty |
Stream property for a font structure. More... | |
struct | GuidProperty |
Complex property for a GUID value. More... | |
struct | PairProperty |
Complex property for a 32-bit value pair, e.g. More... | |
struct | PictureProperty |
Stream property for a picture or mouse icon. More... | |
struct | StringProperty |
Complex property for a string value. More... | |
Public Member Functions | |
AxBinaryPropertyReader (BinaryInputStream &rInStrm, bool b64BitPropFlags=false) | |
template<typename StreamType , typename DataType > | |
void | readIntProperty (DataType &ornValue) |
Reads the next integer property value from the stream, if the respective flag in the property mask is set. More... | |
void | readBoolProperty (bool &orbValue, bool bReverse=false) |
Reads the next boolean property value from the stream, if the respective flag in the property mask is set. More... | |
void | readPairProperty (AxPairData &orPairData) |
Reads the next pair property from the stream, if the respective flag in the property mask is set. More... | |
void | readStringProperty (OUString &orValue) |
Reads the next string property from the stream, if the respective flag in the property mask is set. More... | |
void | readArrayStringProperty (std::vector< OUString > &rStrings) |
Reads ArrayString, an array of fmString ( compressed or uncompressed ) is read from the stream and inserted into rStrings. More... | |
void | readGuidProperty (OUString &orGuid) |
Reads the next GUID property from the stream, if the respective flag in the property mask is set. More... | |
void | readFontProperty (AxFontData &orFontData) |
Reads the next font property from the stream, if the respective flag in the property mask is set. More... | |
void | readPictureProperty (StreamDataSequence &orPicData) |
Reads the next picture property from the stream, if the respective flag in the property mask is set. More... | |
template<typename StreamType > | |
void | skipIntProperty () |
Skips the next integer property value in the stream, if the respective flag in the property mask is set. More... | |
void | skipBoolProperty () |
Skips the next boolean property value in the stream, if the respective flag in the property mask is set. More... | |
void | skipStringProperty () |
Skips the next string property in the stream, if the respective flag in the property mask is set. More... | |
void | skipArrayStringProperty () |
Skips the next ArrayString property in the stream, if the respective flag in the property mask is set. More... | |
void | skipGuidProperty () |
Skips the next GUID property in the stream, if the respective flag in the property mask is set. More... | |
void | skipPictureProperty () |
Skips the next picture property in the stream, if the respective flag in the property mask is set. More... | |
void | skipUndefinedProperty () |
Has to be called for undefined properties. More... | |
bool | finalizeImport () |
Final processing, reads contents of all complex properties. More... | |
Private Types | |
typedef RefVector< ComplexProperty > | ComplexPropVector |
Private Member Functions | |
bool | ensureValid (bool bCondition=true) |
bool | startNextProperty () |
Private Attributes | |
AxAlignedInputStream | maInStrm |
The input stream to read from. More... | |
ComplexPropVector | maLargeProps |
Stores info for all used large properties. More... | |
ComplexPropVector | maStreamProps |
Stores info for all used stream data properties. More... | |
StreamDataSequence | maDummyPicData |
Dummy picture for unsupported properties. More... | |
OUString | maDummyString |
Dummy string for unsupported properties. More... | |
AxArrayString | maDummyArrayString |
Dummy strings for unsupported ArrayString properties. More... | |
sal_Int64 | mnPropFlags |
Flags specifying existing properties. More... | |
sal_Int64 | mnNextProp |
Next property to read. More... | |
sal_Int64 | mnPropsEnd |
End position of simple/large properties. More... | |
bool | mbValid |
True = stream still valid. More... | |
Import helper to read simple and complex ActiveX form control properties from a binary input stream.
Definition at line 100 of file axbinaryreader.hxx.
|
private |
Definition at line 241 of file axbinaryreader.hxx.
|
explicit |
Definition at line 173 of file axbinaryreader.cxx.
References maInStrm, mnNextProp, mnPropFlags, mnPropsEnd, oox::BinaryInputStream::readInt64(), oox::BinaryInputStream::readuInt16(), oox::BinaryInputStream::readuInt32(), oox::ole::AxAlignedInputStream::skip(), and oox::ole::AxAlignedInputStream::tell().
|
private |
Definition at line 275 of file axbinaryreader.cxx.
References oox::BinaryStreamBase::isEof(), maInStrm, and mbValid.
Referenced by finalizeImport(), readFontProperty(), readPictureProperty(), skipUndefinedProperty(), and startNextProperty().
bool oox::ole::AxBinaryPropertyReader::finalizeImport | ( | ) |
Final processing, reads contents of all complex properties.
Definition at line 245 of file axbinaryreader.cxx.
References oox::ole::AxAlignedInputStream::align(), ensureValid(), maInStrm, maLargeProps, maStreamProps, mbValid, mnPropFlags, mnPropsEnd, and oox::ole::AxAlignedInputStream::seek().
Referenced by oox::ole::AxFontData::importBinaryModel(), oox::ole::VbaSiteModel::importBinaryModel(), oox::ole::AxCommandButtonModel::importBinaryModel(), oox::ole::AxLabelModel::importBinaryModel(), oox::ole::AxImageModel::importBinaryModel(), oox::ole::AxTabStripModel::importBinaryModel(), oox::ole::AxMorphDataModelBase::importBinaryModel(), oox::ole::AxSpinButtonModel::importBinaryModel(), oox::ole::AxScrollBarModel::importBinaryModel(), oox::ole::AxContainerModelBase::importBinaryModel(), and oox::ole::AxContainerModelBase::importClassTable().
void oox::ole::AxBinaryPropertyReader::readArrayStringProperty | ( | std::vector< OUString > & | rStrings | ) |
Reads ArrayString, an array of fmString ( compressed or uncompressed ) is read from the stream and inserted into rStrings.
Definition at line 210 of file axbinaryreader.cxx.
References maInStrm, maLargeProps, oox::ole::AxAlignedInputStream::readAligned(), and startNextProperty().
Referenced by oox::ole::AxTabStripModel::importBinaryModel(), and skipArrayStringProperty().
void oox::ole::AxBinaryPropertyReader::readBoolProperty | ( | bool & | orbValue, |
bool | bReverse = false |
||
) |
Reads the next boolean property value from the stream, if the respective flag in the property mask is set.
Definition at line 189 of file axbinaryreader.cxx.
References startNextProperty().
Referenced by oox::ole::AxCommandButtonModel::importBinaryModel(), oox::ole::AxImageModel::importBinaryModel(), and oox::ole::AxContainerModelBase::importBinaryModel().
void oox::ole::AxBinaryPropertyReader::readFontProperty | ( | AxFontData & | orFontData | ) |
Reads the next font property from the stream, if the respective flag in the property mask is set.
Definition at line 225 of file axbinaryreader.cxx.
References ensureValid(), maInStrm, maStreamProps, oox::ole::AxAlignedInputStream::readAligned(), and startNextProperty().
Referenced by oox::ole::AxContainerModelBase::importBinaryModel().
void oox::ole::AxBinaryPropertyReader::readGuidProperty | ( | OUString & | orGuid | ) |
Reads the next GUID property from the stream, if the respective flag in the property mask is set.
The GUID will be enclosed in braces.
Definition at line 219 of file axbinaryreader.cxx.
References maLargeProps, and startNextProperty().
Referenced by oox::ole::AxContainerModelBase::importClassTable(), and skipGuidProperty().
|
inline |
Reads the next integer property value from the stream, if the respective flag in the property mask is set.
Definition at line 108 of file axbinaryreader.hxx.
References maInStrm, oox::ole::AxAlignedInputStream::readAligned(), and startNextProperty().
Referenced by oox::ole::AxFontData::importBinaryModel(), oox::ole::VbaSiteModel::importBinaryModel(), oox::ole::AxCommandButtonModel::importBinaryModel(), oox::ole::AxLabelModel::importBinaryModel(), oox::ole::AxImageModel::importBinaryModel(), oox::ole::AxTabStripModel::importBinaryModel(), oox::ole::AxMorphDataModelBase::importBinaryModel(), oox::ole::AxSpinButtonModel::importBinaryModel(), oox::ole::AxScrollBarModel::importBinaryModel(), oox::ole::AxContainerModelBase::importBinaryModel(), and oox::ole::AxMultiPageModel::importPageAndMultiPageProperties().
void oox::ole::AxBinaryPropertyReader::readPairProperty | ( | AxPairData & | orPairData | ) |
Reads the next pair property from the stream, if the respective flag in the property mask is set.
Definition at line 195 of file axbinaryreader.cxx.
References maLargeProps, and startNextProperty().
Referenced by oox::ole::VbaSiteModel::importBinaryModel(), oox::ole::AxCommandButtonModel::importBinaryModel(), oox::ole::AxLabelModel::importBinaryModel(), oox::ole::AxImageModel::importBinaryModel(), oox::ole::AxTabStripModel::importBinaryModel(), oox::ole::AxMorphDataModelBase::importBinaryModel(), oox::ole::AxSpinButtonModel::importBinaryModel(), oox::ole::AxScrollBarModel::importBinaryModel(), and oox::ole::AxContainerModelBase::importBinaryModel().
void oox::ole::AxBinaryPropertyReader::readPictureProperty | ( | StreamDataSequence & | orPicData | ) |
Reads the next picture property from the stream, if the respective flag in the property mask is set.
Definition at line 235 of file axbinaryreader.cxx.
References ensureValid(), maInStrm, maStreamProps, oox::ole::AxAlignedInputStream::readAligned(), and startNextProperty().
Referenced by oox::ole::AxCommandButtonModel::importBinaryModel(), oox::ole::AxImageModel::importBinaryModel(), oox::ole::AxMorphDataModelBase::importBinaryModel(), oox::ole::AxContainerModelBase::importBinaryModel(), and skipPictureProperty().
void oox::ole::AxBinaryPropertyReader::readStringProperty | ( | OUString & | orValue | ) |
Reads the next string property from the stream, if the respective flag in the property mask is set.
Definition at line 201 of file axbinaryreader.cxx.
References maInStrm, maLargeProps, oox::ole::AxAlignedInputStream::readAligned(), and startNextProperty().
Referenced by oox::ole::AxFontData::importBinaryModel(), oox::ole::VbaSiteModel::importBinaryModel(), oox::ole::AxCommandButtonModel::importBinaryModel(), oox::ole::AxLabelModel::importBinaryModel(), oox::ole::AxMorphDataModelBase::importBinaryModel(), oox::ole::AxContainerModelBase::importBinaryModel(), and skipStringProperty().
|
inline |
Skips the next ArrayString property in the stream, if the respective flag in the property mask is set.
Definition at line 144 of file axbinaryreader.hxx.
References maDummyArrayString, and readArrayStringProperty().
Referenced by oox::ole::AxTabStripModel::importBinaryModel().
|
inline |
Skips the next boolean property value in the stream, if the respective flag in the property mask is set.
Definition at line 138 of file axbinaryreader.hxx.
References startNextProperty().
Referenced by oox::ole::AxImageModel::importBinaryModel(), oox::ole::AxTabStripModel::importBinaryModel(), and oox::ole::AxMorphDataModelBase::importBinaryModel().
|
inline |
Skips the next GUID property in the stream, if the respective flag in the property mask is set.
Definition at line 147 of file axbinaryreader.hxx.
References maDummyString, and readGuidProperty().
Referenced by oox::ole::AxContainerModelBase::importClassTable().
|
inline |
Skips the next integer property value in the stream, if the respective flag in the property mask is set.
Definition at line 135 of file axbinaryreader.hxx.
References maInStrm, oox::ole::AxAlignedInputStream::skipAligned(), and startNextProperty().
Referenced by oox::ole::AxFontData::importBinaryModel(), oox::ole::AxCommandButtonModel::importBinaryModel(), oox::ole::AxLabelModel::importBinaryModel(), oox::ole::AxImageModel::importBinaryModel(), oox::ole::AxTabStripModel::importBinaryModel(), oox::ole::AxMorphDataModelBase::importBinaryModel(), oox::ole::AxSpinButtonModel::importBinaryModel(), oox::ole::AxScrollBarModel::importBinaryModel(), oox::ole::AxContainerModelBase::importBinaryModel(), oox::ole::AxContainerModelBase::importClassTable(), and oox::ole::AxMultiPageModel::importPageAndMultiPageProperties().
|
inline |
Skips the next picture property in the stream, if the respective flag in the property mask is set.
Definition at line 150 of file axbinaryreader.hxx.
References maDummyPicData, and readPictureProperty().
Referenced by oox::ole::AxCommandButtonModel::importBinaryModel(), oox::ole::AxLabelModel::importBinaryModel(), oox::ole::AxImageModel::importBinaryModel(), oox::ole::AxTabStripModel::importBinaryModel(), oox::ole::AxMorphDataModelBase::importBinaryModel(), oox::ole::AxSpinButtonModel::importBinaryModel(), oox::ole::AxScrollBarModel::importBinaryModel(), and oox::ole::AxContainerModelBase::importBinaryModel().
|
inline |
Skips the next string property in the stream, if the respective flag in the property mask is set.
Definition at line 141 of file axbinaryreader.hxx.
References maDummyString, and readStringProperty().
Referenced by oox::ole::VbaSiteModel::importBinaryModel().
|
inline |
Has to be called for undefined properties.
If the respective flag in the mask is set, the property import cannot be finished successfully.
Definition at line 153 of file axbinaryreader.hxx.
References ensureValid(), and startNextProperty().
Referenced by oox::ole::VbaSiteModel::importBinaryModel(), oox::ole::AxImageModel::importBinaryModel(), oox::ole::AxTabStripModel::importBinaryModel(), oox::ole::AxMorphDataModelBase::importBinaryModel(), oox::ole::AxContainerModelBase::importBinaryModel(), oox::ole::AxContainerModelBase::importClassTable(), and oox::ole::AxMultiPageModel::importPageAndMultiPageProperties().
|
private |
Definition at line 281 of file axbinaryreader.cxx.
References ensureValid(), oox::getFlag(), mnNextProp, mnPropFlags, and oox::setFlag().
Referenced by readArrayStringProperty(), readBoolProperty(), readFontProperty(), readGuidProperty(), readIntProperty(), readPairProperty(), readPictureProperty(), readStringProperty(), skipBoolProperty(), skipIntProperty(), and skipUndefinedProperty().
|
private |
Dummy strings for unsupported ArrayString properties.
Definition at line 249 of file axbinaryreader.hxx.
Referenced by skipArrayStringProperty().
|
private |
Dummy picture for unsupported properties.
Definition at line 247 of file axbinaryreader.hxx.
Referenced by skipPictureProperty().
|
private |
Dummy string for unsupported properties.
Definition at line 248 of file axbinaryreader.hxx.
Referenced by skipGuidProperty(), and skipStringProperty().
|
private |
The input stream to read from.
Definition at line 244 of file axbinaryreader.hxx.
Referenced by AxBinaryPropertyReader(), ensureValid(), finalizeImport(), readArrayStringProperty(), readFontProperty(), readIntProperty(), readPictureProperty(), readStringProperty(), and skipIntProperty().
|
private |
Stores info for all used large properties.
Definition at line 245 of file axbinaryreader.hxx.
Referenced by finalizeImport(), readArrayStringProperty(), readGuidProperty(), readPairProperty(), and readStringProperty().
|
private |
Stores info for all used stream data properties.
Definition at line 246 of file axbinaryreader.hxx.
Referenced by finalizeImport(), readFontProperty(), and readPictureProperty().
|
private |
True = stream still valid.
Definition at line 253 of file axbinaryreader.hxx.
Referenced by ensureValid(), and finalizeImport().
|
private |
Next property to read.
Definition at line 251 of file axbinaryreader.hxx.
Referenced by AxBinaryPropertyReader(), and startNextProperty().
|
private |
Flags specifying existing properties.
Definition at line 250 of file axbinaryreader.hxx.
Referenced by AxBinaryPropertyReader(), finalizeImport(), and startNextProperty().
|
private |
End position of simple/large properties.
Definition at line 252 of file axbinaryreader.hxx.
Referenced by AxBinaryPropertyReader(), and finalizeImport().