summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-15 10:28:41 +0200
committerNoel Grandin <noel@peralex.com>2014-12-19 08:50:30 +0200
commitae5d78d605bcb2a849f88cdfddfaf5cf1d5ebf64 (patch)
tree805c70a6595d9031e9bd5a08dd740439345f6a7b
parent4cbba98601ae16cda1739e1e81d697592bb31213 (diff)
remove operator>> and operator<< methods
in favour of ReadXXX/WriteXXX methods Change-Id: I75fcb04cb9e2981a10146a96de27916ca7f6bc57
-rw-r--r--include/oox/helper/binaryinputstream.hxx8
-rw-r--r--include/oox/helper/binaryoutputstream.hxx4
-rw-r--r--include/oox/ole/axbinaryreader.hxx7
-rw-r--r--include/oox/ole/axbinarywriter.hxx4
-rw-r--r--oox/source/ole/axbinaryreader.cxx3
-rw-r--r--oox/source/ole/axbinarywriter.cxx16
-rw-r--r--oox/source/ole/vbamodule.cxx2
-rw-r--r--oox/source/ole/vbaproject.cxx2
-rw-r--r--sc/source/filter/oox/addressconverter.cxx8
-rw-r--r--sc/source/filter/oox/autofilterbuffer.cxx12
-rw-r--r--sc/source/filter/oox/commentsbuffer.cxx3
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx12
-rw-r--r--sc/source/filter/oox/connectionsbuffer.cxx12
-rw-r--r--sc/source/filter/oox/defnamesbuffer.cxx5
-rw-r--r--sc/source/filter/oox/externallinkbuffer.cxx12
-rw-r--r--sc/source/filter/oox/formulabase.cxx8
-rw-r--r--sc/source/filter/oox/formulaparser.cxx26
-rw-r--r--sc/source/filter/oox/pagesettings.cxx39
-rw-r--r--sc/source/filter/oox/pivotcachebuffer.cxx32
-rw-r--r--sc/source/filter/oox/pivottablebuffer.cxx59
-rw-r--r--sc/source/filter/oox/querytablebuffer.cxx5
-rw-r--r--sc/source/filter/oox/richstring.cxx7
-rw-r--r--sc/source/filter/oox/sheetdatacontext.cxx18
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx42
-rw-r--r--sc/source/filter/oox/tablebuffer.cxx6
-rw-r--r--sc/source/filter/oox/viewsettings.cxx28
-rw-r--r--sc/source/filter/oox/workbooksettings.cxx14
-rw-r--r--sc/source/filter/oox/worksheetbuffer.cxx4
-rw-r--r--sc/source/filter/oox/worksheetfragment.cxx25
-rw-r--r--sc/source/filter/oox/worksheetsettings.cxx8
30 files changed, 292 insertions, 139 deletions
diff --git a/include/oox/helper/binaryinputstream.hxx b/include/oox/helper/binaryinputstream.hxx
index 569f48d77642..0c876ecadbef 100644
--- a/include/oox/helper/binaryinputstream.hxx
+++ b/include/oox/helper/binaryinputstream.hxx
@@ -349,10 +349,6 @@ public:
non-seekable streams too. */
virtual void skip( sal_Int32 nBytes, size_t nAtomSize = 1 ) SAL_OVERRIDE;
- /** Stream operator for all data types supported by the readValue() function. */
- template< typename Type >
- SequenceInputStream& operator>>( Type& ornValue ) { ornValue = readValue<Type>(); return *this; }
-
private:
/** Returns the number of bytes available in the sequence for the passed byte count. */
sal_Int32 getMaxBytes( sal_Int32 nBytes ) const
@@ -414,10 +410,6 @@ public:
non-seekable streams too. Does not seek out of the data block. */
virtual void skip( sal_Int32 nBytes, size_t nAtomSize = 1 ) SAL_OVERRIDE;
- /** Stream operator for all data types supported by the readValue() function. */
- template< typename Type >
- RelativeInputStream& operator>>( Type& ornValue ) { readValue( ornValue ); return *this; }
-
private:
/** Returns the number of bytes available in the sequence for the passed byte count. */
sal_Int32 getMaxBytes( sal_Int32 nBytes ) const
diff --git a/include/oox/helper/binaryoutputstream.hxx b/include/oox/helper/binaryoutputstream.hxx
index e1c21ff79a13..a1b562133c61 100644
--- a/include/oox/helper/binaryoutputstream.hxx
+++ b/include/oox/helper/binaryoutputstream.hxx
@@ -191,10 +191,6 @@ public:
/** Write nBytes bytes from the (preallocated!) buffer pMem. */
virtual void writeMemory( const void* pMem, sal_Int32 nBytes, size_t nAtomSize = 1 ) SAL_OVERRIDE;
-
- /** Stream operator for all data types supported by the writeValue() function. */
- template< typename Type >
- SequenceOutputStream& operator<<( Type nValue ) { writeValue( nValue ); return *this; }
};
diff --git a/include/oox/ole/axbinaryreader.hxx b/include/oox/ole/axbinaryreader.hxx
index 116d809a25f4..d10d8abbe0de 100644
--- a/include/oox/ole/axbinaryreader.hxx
+++ b/include/oox/ole/axbinaryreader.hxx
@@ -68,12 +68,9 @@ public:
position of the wrapped stream at construction time). */
void align( size_t nSize );
- /** Stream operator for all data types supported by the readValue() function. */
- template< typename Type >
- AxAlignedInputStream& operator>>( Type& ornValue ) { ornValue = readValue<Type>(); return *this; }
-
/** Aligns the stream according to the passed type and reads a value. */
template< typename Type >
+ SAL_WARN_UNUSED_RESULT
Type readAligned() { align( sizeof( Type ) ); return readValue< Type >(); }
/** Aligns the stream according to the passed type and skips the size of the type. */
template< typename Type >
@@ -105,7 +102,7 @@ public:
/** Reads the next integer property value from the stream, if the
respective flag in the property mask is set. */
template< typename StreamType, typename DataType >
- void readIntProperty( DataType& ornValue )
+ void readIntProperty( DataType& ornValue )
{ if( startNextProperty() ) ornValue = maInStrm.readAligned< StreamType >(); }
/** Reads the next boolean property value from the stream, if the
respective flag in the property mask is set. */
diff --git a/include/oox/ole/axbinarywriter.hxx b/include/oox/ole/axbinarywriter.hxx
index 05d6c60bc7b9..d380ab7223d1 100644
--- a/include/oox/ole/axbinarywriter.hxx
+++ b/include/oox/ole/axbinarywriter.hxx
@@ -56,10 +56,6 @@ public:
void pad( sal_Int32 nBytes, size_t nAtomSize = 1);
- /** Stream operator for all data types supported by the writeValue() function. */
- template< typename Type >
- AxAlignedOutputStream& operator<<( Type nValue ) { writeValue( nValue ); return *this; }
-
/** Aligns the stream according to the passed type and reads a value. */
template< typename Type >
void writeAligned( Type nVal ) { align( sizeof( Type ) ); writeValue( nVal ); }
diff --git a/oox/source/ole/axbinaryreader.cxx b/oox/source/ole/axbinaryreader.cxx
index b06910786669..62835ee713a3 100644
--- a/oox/source/ole/axbinaryreader.cxx
+++ b/oox/source/ole/axbinaryreader.cxx
@@ -129,7 +129,8 @@ AxBinaryPropertyReader::ComplexProperty::~ComplexProperty()
bool AxBinaryPropertyReader::PairProperty::readProperty( AxAlignedInputStream& rInStrm )
{
- rInStrm >> mrPairData.first >> mrPairData.second;
+ mrPairData.first = rInStrm.readInt32();
+ mrPairData.second = rInStrm.readInt32();
return true;
}
diff --git a/oox/source/ole/axbinarywriter.cxx b/oox/source/ole/axbinarywriter.cxx
index 73461955168a..71c01d6dcc8b 100644
--- a/oox/source/ole/axbinarywriter.cxx
+++ b/oox/source/ole/axbinarywriter.cxx
@@ -100,7 +100,7 @@ AxBinaryPropertyWriter::ComplexProperty::~ComplexProperty()
bool AxBinaryPropertyWriter::PairProperty::writeProperty( AxAlignedOutputStream& rOutStrm )
{
- rOutStrm << mrPairData.first << mrPairData.second;
+ rOutStrm.WriteInt32(mrPairData.first).WriteInt32(mrPairData.second);
return true;
}
@@ -117,16 +117,16 @@ AxBinaryPropertyWriter::AxBinaryPropertyWriter( BinaryOutputStream& rOutStrm, bo
mb64BitPropFlags( b64BitPropFlags )
{
sal_uInt16 nId( 0x0200 );
- maOutStrm << nId;
+ maOutStrm.WriteUInt16(nId);
mnBlockSize = 0; // will be filled in the finalize method
- maOutStrm << nId;
+ maOutStrm.WriteUInt16(nId);
mnPropFlagsStart = maOutStrm.tell();
if( mb64BitPropFlags )
- maOutStrm << mnPropFlags;
+ maOutStrm.WriteInt64( mnPropFlags );
else
- maOutStrm << sal_uInt32( mnPropFlags );
+ maOutStrm.WriteUInt32( mnPropFlags );
mnNextProp = 1;
}
@@ -177,12 +177,12 @@ bool AxBinaryPropertyWriter::finalizeExport()
sal_Int64 nPos = maOutStrm.tell();
maOutStrm.seek( mnPropFlagsStart - sizeof( mnBlockSize ) );
- maOutStrm << mnBlockSize;
+ maOutStrm.WriteInt16( mnBlockSize );
if( mb64BitPropFlags )
- maOutStrm << mnPropFlags;
+ maOutStrm.WriteInt64( mnPropFlags );
else
- maOutStrm << sal_uInt32( mnPropFlags );
+ maOutStrm.WriteUInt32( mnPropFlags );
maOutStrm.seek( nPos );
return true;
diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx
index 4c0bf9bd2b08..15291b80055e 100644
--- a/oox/source/ole/vbamodule.cxx
+++ b/oox/source/ole/vbamodule.cxx
@@ -91,7 +91,7 @@ void VbaModule::importDirRecords( BinaryInputStream& rDirStrm )
break;
case VBA_ID_MODULEOFFSET:
OOX_ENSURE_RECORDSIZE( nRecSize == 4 );
- aRecStrm >> mnOffset;
+ mnOffset = aRecStrm.readuInt32();
break;
case VBA_ID_MODULEHELPCONTEXT:
OOX_ENSURE_RECORDSIZE( nRecSize == 4 );
diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx
index 24d474d43501..cb737d7f52ea 100644
--- a/oox/source/ole/vbaproject.cxx
+++ b/oox/source/ole/vbaproject.cxx
@@ -315,7 +315,7 @@ void VbaProject::readVbaModules( StorageBase& rVbaPrjStrg )
case VBA_ID_PROJECTMODULES:
OOX_ENSURE_RECORDSIZE( nRecSize == 2 );
OSL_ENSURE( maModules.empty(), "VbaProject::importVba - unexpected PROJECTMODULES record" );
- aRecStrm >> nModuleCount;
+ nModuleCount = aRecStrm.readuInt16();
break;
case VBA_ID_MODULENAME:
{
diff --git a/sc/source/filter/oox/addressconverter.cxx b/sc/source/filter/oox/addressconverter.cxx
index 59154d2a5f38..920476511e83 100644
--- a/sc/source/filter/oox/addressconverter.cxx
+++ b/sc/source/filter/oox/addressconverter.cxx
@@ -82,7 +82,8 @@ com::sun::star::uno::Sequence< CellRangeAddress > ApiCellRangeList::toSequence()
void BinAddress::read( SequenceInputStream& rStrm )
{
- rStrm >> mnRow >> mnCol;
+ mnRow = rStrm.readInt32();
+ mnCol = rStrm.readInt32();
}
void BinAddress::read( BiffInputStream& rStrm, bool bCol16Bit, bool bRow32Bit )
@@ -93,7 +94,10 @@ void BinAddress::read( BiffInputStream& rStrm, bool bCol16Bit, bool bRow32Bit )
void BinRange::read( SequenceInputStream& rStrm )
{
- rStrm >> maFirst.mnRow >> maLast.mnRow >> maFirst.mnCol >> maLast.mnCol;
+ maFirst.mnRow = rStrm.readInt32();
+ maLast.mnRow = rStrm.readInt32();
+ maFirst.mnCol = rStrm.readInt32();
+ maLast.mnCol = rStrm.readInt32();
}
void BinRange::read( BiffInputStream& rStrm, bool bCol16Bit, bool bRow32Bit )
diff --git a/sc/source/filter/oox/autofilterbuffer.cxx b/sc/source/filter/oox/autofilterbuffer.cxx
index dd14ad05df2e..b4453464265b 100644
--- a/sc/source/filter/oox/autofilterbuffer.cxx
+++ b/sc/source/filter/oox/autofilterbuffer.cxx
@@ -233,7 +233,8 @@ void DiscreteFilter::importRecord( sal_Int32 nRecId, SequenceInputStream& rStrm
case BIFF12_ID_DISCRETEFILTERS:
{
sal_Int32 nShowBlank, nCalendarType;
- rStrm >> nShowBlank >> nCalendarType;
+ nShowBlank = rStrm.readInt32();
+ nCalendarType = rStrm.readInt32();
static const sal_Int32 spnCalendarTypes[] = {
XML_none, XML_gregorian, XML_gregorianUs, XML_japan, XML_taiwan, XML_korea, XML_hijri, XML_thai, XML_hebrew,
@@ -298,7 +299,8 @@ void Top10Filter::importRecord( sal_Int32 nRecId, SequenceInputStream& rStrm )
if( nRecId == BIFF12_ID_TOP10FILTER )
{
sal_uInt8 nFlags;
- rStrm >> nFlags >> mfValue;
+ nFlags = rStrm.readuChar();
+ mfValue = rStrm.readDouble();
mbTop = getFlag( nFlags, BIFF12_TOP10FILTER_TOP );
mbPercent = getFlag( nFlags, BIFF12_TOP10FILTER_PERCENT );
}
@@ -331,7 +333,8 @@ void FilterCriterionModel::setBiffOperator( sal_uInt8 nOperator )
void FilterCriterionModel::readBiffData( SequenceInputStream& rStrm )
{
sal_uInt8 nOperator;
- rStrm >> mnDataType >> nOperator;
+ mnDataType = rStrm.readuChar();
+ nOperator = rStrm.readuChar();
setBiffOperator( nOperator );
switch( mnDataType )
@@ -503,7 +506,8 @@ void FilterColumn::importFilterColumn( const AttributeList& rAttribs )
void FilterColumn::importFilterColumn( SequenceInputStream& rStrm )
{
sal_uInt16 nFlags;
- rStrm >> mnColId >> nFlags;
+ mnColId = rStrm.readInt32();
+ nFlags = rStrm.readuInt16();
mbHiddenButton = getFlag( nFlags, BIFF12_FILTERCOLUMN_HIDDENBUTTON );
mbShowButton = getFlag( nFlags, BIFF12_FILTERCOLUMN_SHOWBUTTON );
}
diff --git a/sc/source/filter/oox/commentsbuffer.cxx b/sc/source/filter/oox/commentsbuffer.cxx
index bd5e1c3dbadf..9f74748c5779 100644
--- a/sc/source/filter/oox/commentsbuffer.cxx
+++ b/sc/source/filter/oox/commentsbuffer.cxx
@@ -121,7 +121,8 @@ void Comment::importCommentPr( const AttributeList& rAttribs )
void Comment::importComment( SequenceInputStream& rStrm )
{
BinRange aBinRange;
- rStrm >> maModel.mnAuthorId >> aBinRange;
+ maModel.mnAuthorId = rStrm.readInt32();
+ rStrm >> aBinRange;
// cell range will be checked while inserting the comment into the document
getAddressConverter().convertToCellRangeUnchecked( maModel.maRange, aBinRange, getSheetIndex() );
}
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index 754c36c2bc7a..4c1894a5edb4 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -415,9 +415,17 @@ void CondFormatRule::importCfRule( SequenceInputStream& rStrm )
{
sal_Int32 nType, nSubType, nOperator, nFmla1Size, nFmla2Size, nFmla3Size;
sal_uInt16 nFlags;
- rStrm >> nType >> nSubType >> maModel.mnDxfId >> maModel.mnPriority >> nOperator;
+ nType = rStrm.readInt32();
+ nSubType = rStrm.readInt32();
+ maModel.mnDxfId = rStrm.readInt32();
+ maModel.mnPriority = rStrm.readInt32();
+ nOperator = rStrm.readInt32();
rStrm.skip( 8 );
- rStrm >> nFlags >> nFmla1Size >> nFmla2Size >> nFmla3Size >> maModel.maText;
+ nFlags = rStrm.readuInt16();
+ nFmla1Size = rStrm.readInt32();
+ nFmla2Size = rStrm.readInt32();
+ nFmla3Size = rStrm.readInt32();
+ rStrm >> maModel.maText;
/* Import the formulas. For no obvious reason, the sizes of the formulas
are already stored before. Nevertheless the following formulas contain
diff --git a/sc/source/filter/oox/connectionsbuffer.cxx b/sc/source/filter/oox/connectionsbuffer.cxx
index dd3d11430578..519c90e1f51a 100644
--- a/sc/source/filter/oox/connectionsbuffer.cxx
+++ b/sc/source/filter/oox/connectionsbuffer.cxx
@@ -182,10 +182,15 @@ void Connection::importConnection( SequenceInputStream& rStrm )
sal_uInt16 nFlags, nStrFlags;
sal_uInt8 nSavePassword, nCredentials;
rStrm.skip( 2 );
- rStrm >> nSavePassword;
+ nSavePassword = rStrm.readuChar();
rStrm.skip( 1 );
maModel.mnInterval = rStrm.readuInt16();
- rStrm >> nFlags >> nStrFlags >> maModel.mnType >> maModel.mnReconnectMethod >> maModel.mnId >> nCredentials;
+ nFlags = rStrm.readuInt16();
+ nStrFlags = rStrm.readuInt16();
+ maModel.mnType = rStrm.readInt32();
+ maModel.mnReconnectMethod = rStrm.readInt32();
+ maModel.mnId = rStrm.readInt32();
+ nCredentials = rStrm.readuChar();
if( getFlag( nStrFlags, BIFF12_CONNECTION_HAS_SOURCEFILE ) )
rStrm >> maModel.maSourceFile;
@@ -217,7 +222,8 @@ void Connection::importWebPr( SequenceInputStream& rStrm )
sal_uInt32 nFlags;
sal_uInt8 nStrFlags;
- rStrm >> nFlags >> nStrFlags;
+ nFlags = rStrm.readuInt32();
+ nStrFlags = rStrm.readuChar();
if( getFlag( nStrFlags, BIFF12_WEBPR_HAS_URL ) )
rStrm >> rWebPr.maUrl;
diff --git a/sc/source/filter/oox/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx
index 85bc04e0b5b2..dc30444b2c7e 100644
--- a/sc/source/filter/oox/defnamesbuffer.cxx
+++ b/sc/source/filter/oox/defnamesbuffer.cxx
@@ -279,9 +279,10 @@ void DefinedName::setFormula( const OUString& rFormula )
void DefinedName::importDefinedName( SequenceInputStream& rStrm )
{
sal_uInt32 nFlags;
- rStrm >> nFlags;
+ nFlags = rStrm.readuInt32();
rStrm.skip( 1 ); // keyboard shortcut
- rStrm >> maModel.mnSheet >> maModel.maName;
+ maModel.mnSheet = rStrm.readInt32();
+ rStrm >> maModel.maName;
mnCalcSheet = (maModel.mnSheet >= 0) ? getWorksheets().getCalcSheetIndex( maModel.mnSheet ) : -1;
// macro function/command, hidden flag
diff --git a/sc/source/filter/oox/externallinkbuffer.cxx b/sc/source/filter/oox/externallinkbuffer.cxx
index fa486d037190..ca1715c08181 100644
--- a/sc/source/filter/oox/externallinkbuffer.cxx
+++ b/sc/source/filter/oox/externallinkbuffer.cxx
@@ -125,7 +125,8 @@ void ExternalName::importExternalNameFlags( SequenceInputStream& rStrm )
{
sal_uInt16 nFlags;
sal_Int32 nSheetId;
- rStrm >> nFlags >> nSheetId;
+ nFlags = rStrm.readuInt16();
+ nSheetId = rStrm.readInt32();
// index into sheet list of EXTSHEETNAMES (one-based in BIFF12)
maModel.mnSheet = nSheetId - 1;
// no flag for built-in names, as in OOXML...
@@ -141,7 +142,8 @@ void ExternalName::importExternalNameFlags( SequenceInputStream& rStrm )
void ExternalName::importDdeItemValues( SequenceInputStream& rStrm )
{
sal_Int32 nRows, nCols;
- rStrm >> nRows >> nCols;
+ nRows = rStrm.readInt32();
+ nCols = rStrm.readInt32();
setResultSize( nCols, nRows );
}
@@ -622,7 +624,9 @@ RefSheetsModel::RefSheetsModel() :
void RefSheetsModel::readBiff12Data( SequenceInputStream& rStrm )
{
- rStrm >> mnExtRefId >> mnTabId1 >> mnTabId2;
+ mnExtRefId = rStrm.readInt32();
+ mnTabId1 = rStrm.readInt32();
+ mnTabId2 = rStrm.readInt32();
}
ExternalLinkBuffer::ExternalLinkBuffer( const WorkbookHelper& rHelper ) :
@@ -675,7 +679,7 @@ void ExternalLinkBuffer::importExternalSheets( SequenceInputStream& rStrm )
OSL_ENSURE( maRefSheets.empty(), "ExternalLinkBuffer::importExternalSheets - multiple EXTERNALSHEETS records" );
maRefSheets.clear();
sal_Int32 nRefCount;
- rStrm >> nRefCount;
+ nRefCount = rStrm.readInt32();
size_t nMaxCount = getLimitedValue< size_t, sal_Int64 >( nRefCount, 0, rStrm.getRemaining() / 12 );
maRefSheets.reserve( nMaxCount );
for( size_t nRefId = 0; !rStrm.isEof() && (nRefId < nMaxCount); ++nRefId )
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index 5b07c1ed4e5e..831931360664 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -98,7 +98,8 @@ void BinSingleRef2d::readBiff12Data( SequenceInputStream& rStrm, bool bRelativeA
{
sal_Int32 nRow;
sal_uInt16 nCol;
- rStrm >> nRow >> nCol;
+ nRow = rStrm.readInt32();
+ nCol = rStrm.readuInt16();
setBiff12Data( nCol, nRow, bRelativeAsOffset );
}
@@ -121,7 +122,10 @@ void BinComplexRef2d::readBiff12Data( SequenceInputStream& rStrm, bool bRelative
{
sal_Int32 nRow1, nRow2;
sal_uInt16 nCol1, nCol2;
- rStrm >> nRow1 >> nRow2 >> nCol1 >> nCol2;
+ nRow1 = rStrm.readInt32();
+ nRow2 = rStrm.readInt32();
+ nCol1 = rStrm.readuInt16();
+ nCol2 = rStrm.readuInt16();
maRef1.setBiff12Data( nCol1, nRow1, bRelativeAsOffset );
maRef2.setBiff12Data( nCol2, nRow2, bRelativeAsOffset );
}
diff --git a/sc/source/filter/oox/formulaparser.cxx b/sc/source/filter/oox/formulaparser.cxx
index 54743dcf4217..4b5a04eff32e 100644
--- a/sc/source/filter/oox/formulaparser.cxx
+++ b/sc/source/filter/oox/formulaparser.cxx
@@ -1321,7 +1321,7 @@ ApiTokenSequence OoxFormulaParserImpl::importBiff12Formula( const CellAddress& r
while( bOk && !rStrm.isEof() && (rStrm.tell() < nFmlaEndPos) )
{
sal_uInt8 nTokenId;
- rStrm >> nTokenId;
+ nTokenId = rStrm.readuChar();
sal_uInt8 nTokenClass = nTokenId & BIFF_TOKCLASS_MASK;
sal_uInt8 nBaseId = nTokenId & BIFF_TOKID_MASK;
@@ -1411,7 +1411,7 @@ bool OoxFormulaParserImpl::importAttrToken( SequenceInputStream& rStrm )
{
bool bOk = true;
sal_uInt8 nType;
- rStrm >> nType;
+ nType = rStrm.readuChar();
// equal flags in all BIFFs
switch( nType )
{
@@ -1444,7 +1444,8 @@ bool OoxFormulaParserImpl::importSpaceToken( SequenceInputStream& rStrm )
{
// equal constants in BIFF and OOX
sal_uInt8 nType, nCount;
- rStrm >> nType >> nCount;
+ nType = rStrm.readuChar();
+ nCount = rStrm.readuChar();
switch( nType )
{
case BIFF_TOK_ATTR_SPACE_SP:
@@ -1473,9 +1474,11 @@ bool OoxFormulaParserImpl::importTableToken( SequenceInputStream& rStrm )
{
sal_uInt16 nFlags, nTableId, nCol1, nCol2;
rStrm.skip( 3 );
- rStrm >> nFlags >> nTableId;
+ nFlags = rStrm.readuInt16();
+ nTableId = rStrm.readuInt16();
rStrm.skip( 2 );
- rStrm >> nCol1 >> nCol2;
+ nCol1 = rStrm.readuInt16();
+ nCol2 = rStrm.readuInt16();
TableRef xTable = getTables().getTable( nTableId );
sal_Int32 nTokenIndex = xTable.get() ? xTable->getTokenIndex() : -1;
if( nTokenIndex >= 0 )
@@ -1706,7 +1709,7 @@ bool OoxFormulaParserImpl::importNameXToken( SequenceInputStream& rStrm )
bool OoxFormulaParserImpl::importFuncToken( SequenceInputStream& rStrm )
{
sal_uInt16 nFuncId;
- rStrm >> nFuncId;
+ nFuncId = rStrm.readuInt16();
return pushBiff12Function( nFuncId );
}
@@ -1714,16 +1717,17 @@ bool OoxFormulaParserImpl::importFuncVarToken( SequenceInputStream& rStrm )
{
sal_uInt8 nParamCount;
sal_uInt16 nFuncId;
- rStrm >> nParamCount >> nFuncId;
+ nParamCount = rStrm.readuChar();
+ nFuncId = rStrm.readuInt16();
return pushBiff12Function( nFuncId, nParamCount );
}
bool OoxFormulaParserImpl::importExpToken( SequenceInputStream& rStrm )
{
BinAddress aBaseAddr;
- rStrm >> aBaseAddr.mnRow;
+ aBaseAddr.mnRow = rStrm.readInt32();
swapStreamPosition( rStrm );
- rStrm >> aBaseAddr.mnCol;
+ aBaseAddr.mnCol = rStrm.readInt32();
swapStreamPosition( rStrm );
return pushSpecialTokenOperand( aBaseAddr, false );
}
@@ -2843,7 +2847,9 @@ OUString FormulaParser::importOleTargetLink( SequenceInputStream& rStrm )
sal_uInt8 nToken;
sal_Int16 nRefId;
sal_Int32 nNameId;
- rStrm >> nToken >> nRefId >> nNameId;
+ nToken = rStrm.readuChar();
+ nRefId = rStrm.readInt16();
+ nNameId = rStrm.readInt32();
if( nToken == (BIFF_TOKCLASS_VAL|BIFF_TOKID_NAMEX) )
aTargetLink = mxImpl->resolveOleTarget( nRefId, true );
}
diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx
index b6f92d9b8b52..07afbe37bc14 100644
--- a/sc/source/filter/oox/pagesettings.cxx
+++ b/sc/source/filter/oox/pagesettings.cxx
@@ -226,15 +226,18 @@ void PageSettings::importPicture( const Relations& rRelations, const AttributeLi
void PageSettings::importPageMargins( SequenceInputStream& rStrm )
{
- rStrm >> maModel.mfLeftMargin >> maModel.mfRightMargin
- >> maModel.mfTopMargin >> maModel.mfBottomMargin
- >> maModel.mfHeaderMargin >> maModel.mfFooterMargin;
+ maModel.mfLeftMargin = rStrm.readDouble();
+ maModel.mfRightMargin = rStrm.readDouble();
+ maModel.mfTopMargin = rStrm.readDouble();
+ maModel.mfBottomMargin = rStrm.readDouble();
+ maModel.mfHeaderMargin = rStrm.readDouble();
+ maModel.mfFooterMargin = rStrm.readDouble();
}
void PageSettings::importPrintOptions( SequenceInputStream& rStrm )
{
sal_uInt16 nFlags;
- rStrm >> nFlags;
+ nFlags = rStrm.readuInt16();
maModel.mbHorCenter = getFlag( nFlags, BIFF12_PRINTOPT_HORCENTER );
maModel.mbVerCenter = getFlag( nFlags, BIFF12_PRINTOPT_VERCENTER );
maModel.mbPrintGrid = getFlag( nFlags, BIFF12_PRINTOPT_PRINTGRID );
@@ -245,11 +248,16 @@ void PageSettings::importPageSetup( const Relations& rRelations, SequenceInputSt
{
OUString aRelId;
sal_uInt16 nFlags;
- rStrm >> maModel.mnPaperSize >> maModel.mnScale
- >> maModel.mnHorPrintRes >> maModel.mnVerPrintRes
- >> maModel.mnCopies >> maModel.mnFirstPage
- >> maModel.mnFitToWidth >> maModel.mnFitToHeight
- >> nFlags >> aRelId;
+ maModel.mnPaperSize = rStrm.readInt32();
+ maModel.mnScale = rStrm.readInt32();
+ maModel.mnHorPrintRes = rStrm.readInt32();
+ maModel.mnVerPrintRes = rStrm.readInt32();
+ maModel.mnCopies = rStrm.readInt32();
+ maModel.mnFirstPage = rStrm.readInt32();
+ maModel.mnFitToWidth = rStrm.readInt32();
+ maModel.mnFitToHeight = rStrm.readInt32();
+ nFlags = rStrm.readuInt16();
+ rStrm >> aRelId;
maModel.setBiffPrintErrors( extractValue< sal_uInt8 >( nFlags, 9, 2 ) );
maModel.maBinSettPath = rRelations.getFragmentPathFromRelId( aRelId );
maModel.mnOrientation = getFlagValue( nFlags, BIFF12_PAGESETUP_DEFAULTORIENT, XML_default, getFlagValue( nFlags, BIFF12_PAGESETUP_LANDSCAPE, XML_landscape, XML_portrait ) );
@@ -265,8 +273,13 @@ void PageSettings::importChartPageSetup( const Relations& rRelations, SequenceIn
{
OUString aRelId;
sal_uInt16 nFirstPage, nFlags;
- rStrm >> maModel.mnPaperSize >> maModel.mnHorPrintRes >> maModel.mnVerPrintRes
- >> maModel.mnCopies >> nFirstPage >> nFlags >> aRelId;
+ maModel.mnPaperSize = rStrm.readInt32();
+ maModel.mnHorPrintRes = rStrm.readInt32();
+ maModel.mnVerPrintRes = rStrm.readInt32();
+ maModel.mnCopies = rStrm.readInt32();
+ nFirstPage = rStrm.readuInt16();
+ nFlags = rStrm.readuInt16();
+ rStrm >> aRelId;
maModel.maBinSettPath = rRelations.getFragmentPathFromRelId( aRelId );
maModel.mnFirstPage = nFirstPage; // 16-bit in CHARTPAGESETUP
maModel.mnOrientation = getFlagValue( nFlags, BIFF12_CHARTPAGESETUP_DEFAULTORIENT, XML_default, getFlagValue( nFlags, BIFF12_CHARTPAGESETUP_LANDSCAPE, XML_landscape, XML_portrait ) );
@@ -279,8 +292,8 @@ void PageSettings::importChartPageSetup( const Relations& rRelations, SequenceIn
void PageSettings::importHeaderFooter( SequenceInputStream& rStrm )
{
sal_uInt16 nFlags;
- rStrm >> nFlags
- >> maModel.maOddHeader >> maModel.maOddFooter
+ nFlags = rStrm.readuInt16();
+ rStrm >> maModel.maOddHeader >> maModel.maOddFooter
>> maModel.maEvenHeader >> maModel.maEvenFooter
>> maModel.maFirstHeader >> maModel.maFirstFooter;
maModel.mbUseEvenHF = getFlag( nFlags, BIFF12_HEADERFOOTER_DIFFEVEN );
diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx
index 48e7b591bd12..da6e770d8905 100644
--- a/sc/source/filter/oox/pivotcachebuffer.cxx
+++ b/sc/source/filter/oox/pivotcachebuffer.cxx
@@ -540,9 +540,13 @@ void PivotCacheField::importGroupItem( sal_Int32 nElement, const AttributeList&
void PivotCacheField::importPCDField( SequenceInputStream& rStrm )
{
sal_uInt16 nFlags;
- rStrm >> nFlags >> maFieldModel.mnNumFmtId;
+ nFlags = rStrm.readuInt16();
+ maFieldModel.mnNumFmtId = rStrm.readInt32();
maFieldModel.mnSqlType = rStrm.readInt16();
- rStrm >> maFieldModel.mnHierarchy >> maFieldModel.mnLevel >> maFieldModel.mnMappingCount >> maFieldModel.maName;
+ maFieldModel.mnHierarchy = rStrm.readInt32();
+ maFieldModel.mnLevel = rStrm.readInt32();
+ maFieldModel.mnMappingCount = rStrm.readInt32();
+ rStrm >> maFieldModel.maName;
if( getFlag( nFlags, BIFF12_PCDFIELD_HASCAPTION ) )
rStrm >> maFieldModel.maCaption;
if( getFlag( nFlags, BIFF12_PCDFIELD_HASFORMULA ) )
@@ -561,7 +565,7 @@ void PivotCacheField::importPCDField( SequenceInputStream& rStrm )
void PivotCacheField::importPCDFSharedItems( SequenceInputStream& rStrm )
{
sal_uInt16 nFlags;
- rStrm >> nFlags;
+ nFlags = rStrm.readuInt16();
maSharedItemsModel.mbHasSemiMixed = getFlag( nFlags, BIFF12_PCDFSITEMS_HASSEMIMIXED );
maSharedItemsModel.mbHasNonDate = getFlag( nFlags, BIFF12_PCDFSITEMS_HASNONDATE );
maSharedItemsModel.mbHasDate = getFlag( nFlags, BIFF12_PCDFSITEMS_HASDATE );
@@ -580,13 +584,18 @@ void PivotCacheField::importPCDFSharedItem( sal_Int32 nRecId, SequenceInputStrea
void PivotCacheField::importPCDFieldGroup( SequenceInputStream& rStrm )
{
- rStrm >> maFieldGroupModel.mnParentField >> maFieldGroupModel.mnBaseField;
+ maFieldGroupModel.mnParentField = rStrm.readInt32();
+ maFieldGroupModel.mnBaseField = rStrm.readInt32();
}
void PivotCacheField::importPCDFRangePr( SequenceInputStream& rStrm )
{
sal_uInt8 nGroupBy, nFlags;
- rStrm >> nGroupBy >> nFlags >> maFieldGroupModel.mfStartValue >> maFieldGroupModel.mfEndValue >> maFieldGroupModel.mfInterval;
+ nGroupBy = rStrm.readuChar();
+ nFlags = rStrm.readuChar();
+ maFieldGroupModel.mfStartValue = rStrm.readDouble();
+ maFieldGroupModel.mfEndValue = rStrm.readDouble();
+ maFieldGroupModel.mfInterval = rStrm.readDouble();
maFieldGroupModel.setBiffGroupBy( nGroupBy );
maFieldGroupModel.mbRangeGroup = true;
@@ -1092,7 +1101,11 @@ void PivotCache::importPCDefinition( SequenceInputStream& rStrm )
{
sal_uInt8 nFlags1, nFlags2;
rStrm.skip( 3 ); // create/refresh version id's
- rStrm >> nFlags1 >> maDefModel.mnMissItemsLimit >> maDefModel.mfRefreshedDate >> nFlags2 >> maDefModel.mnRecords;
+ nFlags1 = rStrm.readuChar();
+ maDefModel.mnMissItemsLimit = rStrm.readInt32();
+ maDefModel.mfRefreshedDate = rStrm.readDouble();
+ nFlags2 = rStrm.readuChar();
+ maDefModel.mnRecords = rStrm.readInt32();
if( getFlag( nFlags2, BIFF12_PCDEFINITION_HASUSERNAME ) )
rStrm >> maDefModel.maRefreshedBy;
if( getFlag( nFlags2, BIFF12_PCDEFINITION_HASRELID ) )
@@ -1113,7 +1126,8 @@ void PivotCache::importPCDefinition( SequenceInputStream& rStrm )
void PivotCache::importPCDSource( SequenceInputStream& rStrm )
{
sal_Int32 nSourceType;
- rStrm >> nSourceType >> maSourceModel.mnConnectionId;
+ nSourceType = rStrm.readInt32();
+ maSourceModel.mnConnectionId = rStrm.readInt32();
static const sal_Int32 spnSourceTypes[] = { XML_worksheet, XML_external, XML_consolidation, XML_scenario };
maSourceModel.mnSourceType = STATIC_ARRAY_SELECT( spnSourceTypes, nSourceType, XML_TOKEN_INVALID );
}
@@ -1121,7 +1135,9 @@ void PivotCache::importPCDSource( SequenceInputStream& rStrm )
void PivotCache::importPCDSheetSource( SequenceInputStream& rStrm, const Relations& rRelations )
{
sal_uInt8 nIsDefName, nIsBuiltinName, nFlags;
- rStrm >> nIsDefName >> nIsBuiltinName >> nFlags;
+ nIsDefName = rStrm.readuChar();
+ nIsBuiltinName = rStrm.readuChar();
+ nFlags = rStrm.readuChar();
if( getFlag( nFlags, BIFF12_PCDWBSOURCE_HASSHEET ) )
rStrm >> maSheetSrcModel.maSheet;
if( getFlag( nFlags, BIFF12_PCDWBSOURCE_HASRELID ) )
diff --git a/sc/source/filter/oox/pivottablebuffer.cxx b/sc/source/filter/oox/pivottablebuffer.cxx
index 0356e5bdaf71..ec574e36b327 100644
--- a/sc/source/filter/oox/pivottablebuffer.cxx
+++ b/sc/source/filter/oox/pivottablebuffer.cxx
@@ -308,7 +308,11 @@ void PivotTableField::importReferenceItem( const AttributeList& rAttribs )
void PivotTableField::importPTField( SequenceInputStream& rStrm )
{
sal_uInt32 nFlags1, nFlags2;
- rStrm >> nFlags1 >> maModel.mnNumFmtId >> nFlags2 >> maModel.mnAutoShowItems >> maModel.mnAutoShowRankBy;
+ nFlags1 = rStrm.readuInt32();
+ maModel.mnNumFmtId = rStrm.readInt32();
+ nFlags2 = rStrm.readuInt32();
+ maModel.mnAutoShowItems = rStrm.readInt32();
+ maModel.mnAutoShowRankBy = rStrm.readInt32();
maModel.setBiffAxis( extractValue< sal_uInt8 >( nFlags1, 0, 3 ) );
maModel.mbDataField = getFlag( nFlags1, BIFF12_PTFIELD_DATAFIELD );
@@ -344,7 +348,9 @@ void PivotTableField::importPTFItem( SequenceInputStream& rStrm )
PTFieldItemModel aModel;
sal_uInt8 nType;
sal_uInt16 nFlags;
- rStrm >> nType >> nFlags >> aModel.mnCacheItem;
+ nType = rStrm.readuChar();
+ nFlags = rStrm.readuInt16();
+ aModel.mnCacheItem = rStrm.readInt32();
aModel.setBiffType( nType );
aModel.mbShowDetails = !getFlag( nFlags, BIFF12_PTFITEM_HIDEDETAILS );
@@ -355,12 +361,12 @@ void PivotTableField::importPTFItem( SequenceInputStream& rStrm )
void PivotTableField::importPTReference( SequenceInputStream& rStrm )
{
- rStrm >> maModel.mnSortRefField;
+ maModel.mnSortRefField = rStrm.readInt32();
}
void PivotTableField::importPTReferenceItem( SequenceInputStream& rStrm )
{
- rStrm >> maModel.mnSortRefItem;
+ maModel.mnSortRefItem = rStrm.readInt32();
}
void PivotTableField::finalizeImport( const Reference< XDataPilotDescriptor >& rxDPDesc )
@@ -776,9 +782,14 @@ void PivotTableFilter::importPTFilter( SequenceInputStream& rStrm )
{
sal_Int32 nType;
sal_uInt16 nFlags;
- rStrm >> maModel.mnField >> maModel.mnMemPropField >> nType;
+ maModel.mnField = rStrm.readInt32();
+ maModel.mnMemPropField = rStrm.readInt32();
+ nType = rStrm.readInt32();
rStrm.skip( 4 ); // unused
- rStrm >> maModel.mnId >> maModel.mnMeasureField >> maModel.mnMeasureHier >> nFlags;
+ maModel.mnId = rStrm.readInt32();
+ maModel.mnMeasureField = rStrm.readInt32();
+ maModel.mnMeasureHier = rStrm.readInt32();
+ nFlags = rStrm.readuInt16();
if( getFlag( nFlags, BIFF12_PTFILTER_HASNAME ) )
rStrm >> maModel.maName;
if( getFlag( nFlags, BIFF12_PTFILTER_HASDESCRIPTION ) )
@@ -815,7 +826,8 @@ void PivotTableFilter::importPTFilter( SequenceInputStream& rStrm )
void PivotTableFilter::importTop10Filter( SequenceInputStream& rStrm )
{
sal_uInt8 nFlags;
- rStrm >> nFlags >> maModel.mfValue;
+ nFlags = rStrm.readuChar();
+ maModel.mfValue = rStrm.readDouble();
SAL_WARN_IF(
getFlag(nFlags, BIFF12_TOP10FILTER_PERCENT) != (maModel.mnType == XML_percent),
@@ -995,13 +1007,18 @@ void PivotTable::importPTDefinition( SequenceInputStream& rStrm )
{
sal_uInt32 nFlags1, nFlags2, nFlags3;
sal_uInt8 nDataAxis;
- rStrm >> nFlags1 >> nFlags2 >> nFlags3 >> nDataAxis;
+ nFlags1 = rStrm.readuInt32();
+ nFlags2 = rStrm.readuInt32();
+ nFlags3 = rStrm.readuInt32();
+ nDataAxis = rStrm.readuChar();
maDefModel.mnPageWrap = rStrm.readuInt8();
rStrm.skip( 2 ); // refresh versions
- rStrm >> maDefModel.mnDataPosition;
+ maDefModel.mnDataPosition = rStrm.readInt32();
maDefModel.mnAutoFormatId = rStrm.readuInt16();
rStrm.skip( 2 ); // unused
- rStrm >> maDefModel.mnChartFormat >> maDefModel.mnCacheId >> maDefModel.maName;
+ maDefModel.mnChartFormat = rStrm.readInt32();
+ maDefModel.mnCacheId = rStrm.readInt32();
+ rStrm >> maDefModel.maName;
if( getFlag( nFlags2, BIFF12_PTDEF_HASDATACAPTION ) )
rStrm >> maDefModel.maDataCaption;
if( getFlag( nFlags2, BIFF12_PTDEF_HASGRANDTOTALCAPTION ) )
@@ -1064,9 +1081,12 @@ void PivotTable::importPTDefinition( SequenceInputStream& rStrm )
void PivotTable::importPTLocation( SequenceInputStream& rStrm, sal_Int16 nSheet )
{
BinRange aBinRange;
- rStrm >> aBinRange >> maLocationModel.mnFirstHeaderRow
- >> maLocationModel.mnFirstDataRow >> maLocationModel.mnFirstDataCol
- >> maLocationModel.mnRowPageCount >> maLocationModel.mnColPageCount;
+ rStrm >> aBinRange;
+ maLocationModel.mnFirstHeaderRow = rStrm.readInt32();
+ maLocationModel.mnFirstDataRow = rStrm.readInt32();
+ maLocationModel.mnFirstDataCol = rStrm.readInt32();
+ maLocationModel.mnRowPageCount = rStrm.readInt32();
+ maLocationModel.mnColPageCount = rStrm.readInt32();
getAddressConverter().convertToCellRangeUnchecked( maLocationModel.maRange, aBinRange, nSheet );
}
@@ -1084,9 +1104,10 @@ void PivotTable::importPTPageField( SequenceInputStream& rStrm )
{
PTPageFieldModel aModel;
sal_uInt8 nFlags;
- rStrm >> aModel.mnField >> aModel.mnItem;
+ aModel.mnField = rStrm.readInt32();
+ aModel.mnItem = rStrm.readInt32();
rStrm.skip( 4 ); // hierarchy
- rStrm >> nFlags;
+ nFlags = rStrm.readuChar();
if( getFlag( nFlags, BIFF12_PTPAGEFIELD_HASNAME ) )
rStrm >> aModel.maName;
maPageFields.push_back( aModel );
@@ -1097,7 +1118,13 @@ void PivotTable::importPTDataField( SequenceInputStream& rStrm )
PTDataFieldModel aModel;
sal_Int32 nSubtotal, nShowDataAs;
sal_uInt8 nHasName;
- rStrm >> aModel.mnField >> nSubtotal >> nShowDataAs >> aModel.mnBaseField >> aModel.mnBaseItem >> aModel.mnNumFmtId >> nHasName;
+ aModel.mnField = rStrm.readInt32( );
+ nSubtotal = rStrm.readInt32();
+ nShowDataAs = rStrm.readInt32();
+ aModel.mnBaseField = rStrm.readInt32();
+ aModel.mnBaseItem = rStrm.readInt32();
+ aModel.mnNumFmtId = rStrm.readInt32();
+ nHasName = rStrm.readuChar();
if( nHasName == 1 )
rStrm >> aModel.maName;
aModel.setBiffSubtotal( nSubtotal );
diff --git a/sc/source/filter/oox/querytablebuffer.cxx b/sc/source/filter/oox/querytablebuffer.cxx
index b2e7cb915657..c1c45e790b70 100644
--- a/sc/source/filter/oox/querytablebuffer.cxx
+++ b/sc/source/filter/oox/querytablebuffer.cxx
@@ -179,9 +179,10 @@ void QueryTable::importQueryTable( const AttributeList& rAttribs )
void QueryTable::importQueryTable( SequenceInputStream& rStrm )
{
sal_uInt32 nFlags;
- rStrm >> nFlags;
+ nFlags = rStrm.readuInt32();
maModel.mnAutoFormatId = rStrm.readuInt16();
- rStrm >> maModel.mnConnId >> maModel.maDefName;
+ maModel.mnConnId = rStrm.readInt32();
+ rStrm >> maModel.maDefName;
static const sal_Int32 spnGrowShrinkTypes[] = { XML_insertClear, XML_insertDelete, XML_overwriteClear };
maModel.mnGrowShrinkType = STATIC_ARRAY_SELECT( spnGrowShrinkTypes, extractValue< sal_uInt8 >( nFlags, 6, 2 ), XML_insertDelete );
diff --git a/sc/source/filter/oox/richstring.cxx b/sc/source/filter/oox/richstring.cxx
index ca8b97706a60..1b2961cbeeaf 100644
--- a/sc/source/filter/oox/richstring.cxx
+++ b/sc/source/filter/oox/richstring.cxx
@@ -224,7 +224,9 @@ void PhoneticSettings::importPhoneticPr( SequenceInputStream& rStrm )
{
sal_uInt16 nFontId;
sal_Int32 nType, nAlignment;
- rStrm >> nFontId >> nType >> nAlignment;
+ nFontId = rStrm.readuInt16();
+ nType = rStrm.readInt32();
+ nAlignment = rStrm.readInt32();
maModel.mnFontId = nFontId;
maModel.setBiffData( nType, nAlignment );
}
@@ -232,7 +234,8 @@ void PhoneticSettings::importPhoneticPr( SequenceInputStream& rStrm )
void PhoneticSettings::importStringData( SequenceInputStream& rStrm )
{
sal_uInt16 nFontId, nFlags;
- rStrm >> nFontId >> nFlags;
+ nFontId = rStrm.readuInt16();
+ nFlags = rStrm.readuInt16();
maModel.mnFontId = nFontId;
maModel.setBiffData( extractValue< sal_Int32 >( nFlags, 0, 2 ), extractValue< sal_Int32 >( nFlags, 2, 2 ) );
}
diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx
index cbd7c9dcda88..fad6d5d9b32e 100644
--- a/sc/source/filter/oox/sheetdatacontext.cxx
+++ b/sc/source/filter/oox/sheetdatacontext.cxx
@@ -372,7 +372,12 @@ void SheetDataContext::importRow( SequenceInputStream& rStrm )
sal_Int32 nSpanCount;
sal_uInt16 nHeight, nFlags1;
sal_uInt8 nFlags2;
- rStrm >> maCurrPos.mnRow >> aModel.mnXfId >> nHeight >> nFlags1 >> nFlags2 >> nSpanCount;
+ maCurrPos.mnRow = rStrm.readInt32();
+ aModel.mnXfId = rStrm.readInt32();
+ nHeight = rStrm.readuInt16();
+ nFlags1 = rStrm.readuInt16();
+ nFlags2 = rStrm.readuChar();
+ nSpanCount = rStrm.readInt32();
maCurrPos.mnCol = 0;
// row index is 0-based in BIFF12, but RowModel expects 1-based
@@ -393,7 +398,8 @@ void SheetDataContext::importRow( SequenceInputStream& rStrm )
for( sal_Int32 nSpanIdx = 0; (nSpanIdx < nSpanCount) && !rStrm.isEof(); ++nSpanIdx )
{
sal_Int32 nFirstCol, nLastCol;
- rStrm >> nFirstCol >> nLastCol;
+ nFirstCol = rStrm.readInt32();
+ nLastCol = rStrm.readInt32();
aModel.insertColSpan( ValueRange( nFirstCol, ::std::min( nLastCol, nMaxCol ) ) );
}
@@ -406,12 +412,11 @@ bool SheetDataContext::readCellHeader( SequenceInputStream& rStrm, CellType eCel
switch( eCellType )
{
case CELLTYPE_VALUE:
- case CELLTYPE_FORMULA: rStrm >> maCurrPos.mnCol; break;
+ case CELLTYPE_FORMULA: maCurrPos.mnCol = rStrm.readInt32(); break;
case CELLTYPE_MULTI: ++maCurrPos.mnCol; break;
}
- sal_uInt32 nXfId;
- rStrm >> nXfId;
+ sal_uInt32 nXfId = rStrm.readuInt32();
bool bValidAddr = mrAddressConv.convertToCellAddress( maCellData.maCellAddr, maCurrPos, mnSheet, true );
maCellData.mnXfId = extractValue< sal_Int32 >( nXfId, 0, 24 );
@@ -547,7 +552,8 @@ void SheetDataContext::importDataTable( SequenceInputStream& rStrm )
{
BinAddress aRef1, aRef2;
sal_uInt8 nFlags;
- rStrm >> aRef1 >> aRef2 >> nFlags;
+ rStrm >> aRef1 >> aRef2;
+ nFlags = rStrm.readuChar();
maTableData.maRef1 = FormulaProcessorBase::generateAddress2dString( aRef1, false );
maTableData.maRef2 = FormulaProcessorBase::generateAddress2dString( aRef2, false );
maTableData.mbRowTable = getFlag( nFlags, BIFF12_DATATABLE_ROW );
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index 1a78749b0116..170387f073d6 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -292,7 +292,9 @@ void Color::importColor( SequenceInputStream& rStrm )
{
sal_uInt8 nFlags, nIndex;
sal_Int16 nTint;
- rStrm >> nFlags >> nIndex >> nTint;
+ nFlags = rStrm.readuChar();
+ nIndex = rStrm.readuChar();
+ nTint = rStrm.readInt16();
// scale tint from signed 16-bit to double range -1.0 ... 1.0
double fTint = nTint;
@@ -662,9 +664,17 @@ void Font::importFont( SequenceInputStream& rStrm )
sal_uInt16 nHeight, nFlags, nWeight, nEscapement;
sal_uInt8 nUnderline, nFamily, nCharSet, nScheme;
- rStrm >> nHeight >> nFlags >> nWeight >> nEscapement >> nUnderline >> nFamily >> nCharSet;
+ nHeight = rStrm.readuInt16();
+ nFlags = rStrm.readuInt16();
+ nWeight = rStrm.readuInt16();
+ nEscapement = rStrm.readuInt16();
+ nUnderline = rStrm.readuChar();
+ nFamily = rStrm.readuChar();
+ nCharSet = rStrm.readuChar();
rStrm.skip( 1 );
- rStrm >> maModel.maColor >> nScheme >> maModel.maName;
+ rStrm >> maModel.maColor;
+ nScheme = rStrm.readuChar();
+ rStrm >> maModel.maName;
// equal constants in all BIFFs for weight, underline, and escapement
maModel.setBiff12Scheme( nScheme );
@@ -1554,7 +1564,8 @@ void Border::importDxfBorder( sal_Int32 nElement, SequenceInputStream& rStrm )
if( BorderLineModel* pBorderLine = getBorderLine( nElement ) )
{
sal_uInt16 nStyle;
- rStrm >> pBorderLine->maColor >> nStyle;
+ rStrm >> pBorderLine->maColor;
+ nStyle = rStrm.readuInt16();
pBorderLine->setBiffStyle( nStyle );
pBorderLine->mbUsed = true;
}
@@ -1758,7 +1769,12 @@ GradientFillModel::GradientFillModel() :
void GradientFillModel::readGradient( SequenceInputStream& rStrm )
{
sal_Int32 nType;
- rStrm >> nType >> mfAngle >> mfLeft >> mfRight >> mfTop >> mfBottom;
+ nType = rStrm.readInt32();
+ mfAngle = rStrm.readDouble();
+ mfLeft = rStrm.readDouble();
+ mfRight = rStrm.readDouble();
+ mfTop = rStrm.readDouble();
+ mfBottom = rStrm.readDouble();
static const sal_Int32 spnTypes[] = { XML_linear, XML_path };
mnType = STATIC_ARRAY_SELECT( spnTypes, nType, XML_TOKEN_INVALID );
}
@@ -1770,11 +1786,13 @@ void GradientFillModel::readGradientStop( SequenceInputStream& rStrm, bool bDxf
if( bDxf )
{
rStrm.skip( 2 );
- rStrm >> fPosition >> aColor;
+ fPosition = rStrm.readDouble();
+ rStrm >> aColor;
}
else
{
- rStrm >> aColor >> fPosition;
+ rStrm >> aColor;
+ fPosition = rStrm.readDouble();
}
if( !rStrm.isEof() && (fPosition >= 0.0) )
maColors[ fPosition ] = aColor;
@@ -1874,7 +1892,7 @@ void Fill::importFill( SequenceInputStream& rStrm )
sal_Int32 nStopCount;
rStrm.skip( 16 );
mxGradientModel->readGradient( rStrm );
- rStrm >> nStopCount;
+ nStopCount = rStrm.readInt32();
for( sal_Int32 nStop = 0; (nStop < nStopCount) && !rStrm.isEof(); ++nStop )
mxGradientModel->readGradientStop( rStrm, false );
}
@@ -2410,12 +2428,13 @@ void Dxf::importDxf( SequenceInputStream& rStrm )
OUString aFmtCode;
sal_uInt16 nRecCount;
rStrm.skip( 4 ); // flags
- rStrm >> nRecCount;
+ nRecCount = rStrm.readuInt16();
for( sal_uInt16 nRec = 0; !rStrm.isEof() && (nRec < nRecCount); ++nRec )
{
sal_uInt16 nSubRecId, nSubRecSize;
sal_Int64 nRecEnd = rStrm.tell();
- rStrm >> nSubRecId >> nSubRecSize;
+ nSubRecId = rStrm.readuInt16();
+ nSubRecSize = rStrm.readuInt16();
nRecEnd += nSubRecSize;
switch( nSubRecId )
{
@@ -2614,7 +2633,8 @@ void CellStyle::importCellStyle( const AttributeList& rAttribs )
void CellStyle::importCellStyle( SequenceInputStream& rStrm )
{
sal_uInt16 nFlags;
- rStrm >> maModel.mnXfId >> nFlags;
+ maModel.mnXfId = rStrm.readInt32();
+ nFlags = rStrm.readuInt16();
maModel.mnBuiltinId = rStrm.readInt8();
maModel.mnLevel = rStrm.readInt8();
rStrm >> maModel.maName;
diff --git a/sc/source/filter/oox/tablebuffer.cxx b/sc/source/filter/oox/tablebuffer.cxx
index 733b70dff4de..1e111b5cd130 100644
--- a/sc/source/filter/oox/tablebuffer.cxx
+++ b/sc/source/filter/oox/tablebuffer.cxx
@@ -65,7 +65,11 @@ void Table::importTable( SequenceInputStream& rStrm, sal_Int16 nSheet )
{
BinRange aBinRange;
sal_Int32 nType;
- rStrm >> aBinRange >> nType >> maModel.mnId >> maModel.mnHeaderRows >> maModel.mnTotalsRows;
+ rStrm >> aBinRange;
+ nType = rStrm.readInt32();
+ maModel.mnId = rStrm.readInt32();
+ maModel.mnHeaderRows = rStrm.readInt32();
+ maModel.mnTotalsRows = rStrm.readInt32();
rStrm.skip( 32 );
rStrm >> maModel.maProgName >> maModel.maDisplayName;
diff --git a/sc/source/filter/oox/viewsettings.cxx b/sc/source/filter/oox/viewsettings.cxx
index 75fa731dde58..05a70fcd9350 100644
--- a/sc/source/filter/oox/viewsettings.cxx
+++ b/sc/source/filter/oox/viewsettings.cxx
@@ -247,13 +247,15 @@ void SheetViewSettings::importSheetView( SequenceInputStream& rStrm )
sal_uInt16 nFlags;
sal_Int32 nViewType;
BinAddress aFirstPos;
- rStrm >> nFlags >> nViewType >> aFirstPos;
+ nFlags = rStrm.readuInt16();
+ nViewType = rStrm.readInt32();
+ rStrm >> aFirstPos;
rModel.maGridColor.importColorId( rStrm );
rModel.mnCurrentZoom = rStrm.readuInt16();
rModel.mnNormalZoom = rStrm.readuInt16();
rModel.mnSheetLayoutZoom = rStrm.readuInt16();
rModel.mnPageLayoutZoom = rStrm.readuInt16();
- rStrm >> rModel.mnWorkbookViewId;
+ rModel.mnWorkbookViewId = rStrm.readInt32();
rModel.maFirstPos = getAddressConverter().createValidCellAddress( aFirstPos, getSheetIndex(), false );
static const sal_Int32 spnViewTypes[] = { XML_normal, XML_pageBreakPreview, XML_pageLayout };
@@ -278,7 +280,11 @@ void SheetViewSettings::importPane( SequenceInputStream& rStrm )
BinAddress aSecondPos;
sal_Int32 nActivePaneId;
sal_uInt8 nFlags;
- rStrm >> rModel.mfSplitX >> rModel.mfSplitY >> aSecondPos >> nActivePaneId >> nFlags;
+ rModel.mfSplitX = rStrm.readDouble();
+ rModel.mfSplitY = rStrm.readDouble();
+ rStrm >> aSecondPos;
+ nActivePaneId = rStrm.readInt32();
+ nFlags = rStrm.readuChar();
rModel.maSecondPos = getAddressConverter().createValidCellAddress( aSecondPos, getSheetIndex(), false );
rModel.mnActivePaneId = lclGetOoxPaneId( nActivePaneId, XML_topLeft );
@@ -296,7 +302,8 @@ void SheetViewSettings::importSelection( SequenceInputStream& rStrm )
PaneSelectionModel& rPaneSel = maSheetViews.back()->createPaneSelection( lclGetOoxPaneId( nPaneId, -1 ) );
// cursor position
BinAddress aActiveCell;
- rStrm >> aActiveCell >> rPaneSel.mnActiveCellId;
+ rStrm >> aActiveCell;
+ rPaneSel.mnActiveCellId = rStrm.readInt32();
rPaneSel.maActiveCell = getAddressConverter().createValidCellAddress( aActiveCell, getSheetIndex(), false );
// selection
BinRangeList aSelection;
@@ -310,7 +317,9 @@ void SheetViewSettings::importChartSheetView( SequenceInputStream& rStrm )
{
SheetViewModel& rModel = *createSheetView();
sal_uInt16 nFlags;
- rStrm >> nFlags >> rModel.mnCurrentZoom >> rModel.mnWorkbookViewId;
+ nFlags = rStrm.readuInt16();
+ rModel.mnCurrentZoom = rStrm.readInt32();
+ rModel.mnWorkbookViewId = rStrm.readInt32();
rModel.mbSelected = getFlag( nFlags, BIFF12_CHARTSHEETVIEW_SELECTED );
rModel.mbZoomToFit = getFlag( nFlags, BIFF12_CHARTSHEETVIEW_ZOOMTOFIT );
@@ -498,7 +507,14 @@ void ViewSettings::importWorkbookView( SequenceInputStream& rStrm )
{
WorkbookViewModel& rModel = createWorkbookView();
sal_uInt8 nFlags;
- rStrm >> rModel.mnWinX >> rModel.mnWinY >> rModel.mnWinWidth >> rModel.mnWinHeight >> rModel.mnTabBarWidth >> rModel.mnFirstVisSheet >> rModel.mnActiveSheet >> nFlags;
+ rModel.mnWinX = rStrm.readInt32();
+ rModel.mnWinY = rStrm.readInt32();
+ rModel.mnWinWidth = rStrm.readInt32();
+ rModel.mnWinHeight = rStrm.readInt32();
+ rModel.mnTabBarWidth = rStrm.readInt32();
+ rModel.mnFirstVisSheet = rStrm.readInt32();
+ rModel.mnActiveSheet = rStrm.readInt32();
+ nFlags = rStrm.readuChar();
rModel.mnVisibility = getFlagValue( nFlags, BIFF12_WBVIEW_HIDDEN, XML_hidden, XML_visible );
rModel.mbShowTabBar = getFlag( nFlags, BIFF12_WBVIEW_SHOWTABBAR );
rModel.mbShowHorScroll = getFlag( nFlags, BIFF12_WBVIEW_SHOWHORSCROLL );
diff --git a/sc/source/filter/oox/workbooksettings.cxx b/sc/source/filter/oox/workbooksettings.cxx
index cb2b221c0c29..71ee5106fea3 100644
--- a/sc/source/filter/oox/workbooksettings.cxx
+++ b/sc/source/filter/oox/workbooksettings.cxx
@@ -140,13 +140,16 @@ void WorkbookSettings::importCalcPr( const AttributeList& rAttribs )
void WorkbookSettings::importFileSharing( SequenceInputStream& rStrm )
{
maFileSharing.mbRecommendReadOnly = rStrm.readuInt16() != 0;
- rStrm >> maFileSharing.mnPasswordHash >> maFileSharing.maUserName;
+ maFileSharing.mnPasswordHash = rStrm.readuInt16();
+ rStrm >> maFileSharing.maUserName;
}
void WorkbookSettings::importWorkbookPr( SequenceInputStream& rStrm )
{
sal_uInt32 nFlags;
- rStrm >> nFlags >> maBookSettings.mnDefaultThemeVer >> maBookSettings.maCodeName;
+ nFlags = rStrm.readuInt32();
+ maBookSettings.mnDefaultThemeVer = rStrm.readInt32();
+ rStrm >> maBookSettings.maCodeName;
maBookSettings.setBiffObjectMode( extractValue< sal_uInt16 >( nFlags, 13, 2 ) );
// set flag means: strip external link values
maBookSettings.mbSaveExtLinkValues = !getFlag( nFlags, BIFF12_WORKBOOKPR_STRIPEXT );
@@ -157,7 +160,12 @@ void WorkbookSettings::importCalcPr( SequenceInputStream& rStrm )
{
sal_Int32 nCalcMode, nProcCount;
sal_uInt16 nFlags;
- rStrm >> maCalcSettings.mnCalcId >> nCalcMode >> maCalcSettings.mnIterateCount >> maCalcSettings.mfIterateDelta >> nProcCount >> nFlags;
+ maCalcSettings.mnCalcId = rStrm.readInt32();
+ nCalcMode = rStrm.readInt32();
+ maCalcSettings.mnIterateCount = rStrm.readInt32();
+ maCalcSettings.mfIterateDelta = rStrm.readDouble();
+ nProcCount = rStrm.readInt32();
+ nFlags = rStrm.readuInt16();
static const sal_Int32 spnCalcModes[] = { XML_manual, XML_auto, XML_autoNoTable };
maCalcSettings.mnRefMode = getFlagValue( nFlags, BIFF12_CALCPR_A1, XML_A1, XML_R1C1 );
diff --git a/sc/source/filter/oox/worksheetbuffer.cxx b/sc/source/filter/oox/worksheetbuffer.cxx
index 85385aaf35f2..23282c1c6ecf 100644
--- a/sc/source/filter/oox/worksheetbuffer.cxx
+++ b/sc/source/filter/oox/worksheetbuffer.cxx
@@ -68,7 +68,9 @@ void WorksheetBuffer::importSheet( SequenceInputStream& rStrm )
{
sal_Int32 nState;
SheetInfoModel aModel;
- rStrm >> nState >> aModel.mnSheetId >> aModel.maRelId >> aModel.maName;
+ nState = rStrm.readInt32();
+ aModel.mnSheetId = rStrm.readInt32();
+ rStrm >> aModel.maRelId >> aModel.maName;
static const sal_Int32 spnStates[] = { XML_visible, XML_hidden, XML_veryHidden };
aModel.mnState = STATIC_ARRAY_SELECT( spnStates, nState, XML_visible );
insertSheet( aModel );
diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx
index 9f2ff39c9920..666550f4b7da 100644
--- a/sc/source/filter/oox/worksheetfragment.cxx
+++ b/sc/source/filter/oox/worksheetfragment.cxx
@@ -162,7 +162,8 @@ void DataValidationsContext::importDataValidation( SequenceInputStream& rStrm )
sal_uInt32 nFlags;
BinRangeList aRanges;
- rStrm >> nFlags >> aRanges >> aModel.maErrorTitle >> aModel.maErrorMessage >> aModel.maInputTitle >> aModel.maInputMessage;
+ nFlags = rStrm.readuInt32();
+ rStrm >> aRanges >> aModel.maErrorTitle >> aModel.maErrorMessage >> aModel.maInputTitle >> aModel.maInputMessage;
// equal flags in all BIFFs
aModel.setBiffType( extractValue< sal_uInt8 >( nFlags, 0, 4 ) );
@@ -623,7 +624,10 @@ void WorksheetFragment::importSheetFormatPr( SequenceInputStream& rStrm )
{
sal_Int32 nDefaultWidth;
sal_uInt16 nBaseWidth, nDefaultHeight, nFlags;
- rStrm >> nDefaultWidth >> nBaseWidth >> nDefaultHeight >> nFlags;
+ nDefaultWidth = rStrm.readInt32();
+ nBaseWidth = rStrm.readuInt16();
+ nDefaultHeight = rStrm.readuInt16();
+ nFlags = rStrm.readuInt16();
// base column with
setBaseColumnWidth( nBaseWidth );
@@ -644,7 +648,11 @@ void WorksheetFragment::importCol( SequenceInputStream& rStrm )
sal_Int32 nWidth;
sal_uInt16 nFlags;
- rStrm >> aModel.maRange.mnFirst >> aModel.maRange.mnLast >> nWidth >> aModel.mnXfId >> nFlags;
+ aModel.maRange.mnFirst = rStrm.readInt32();
+ aModel.maRange.mnLast = rStrm.readInt32();
+ nWidth = rStrm.readInt32();
+ aModel.mnXfId = rStrm.readInt32();
+ nFlags = rStrm.readuInt16();
// column indexes are 0-based in BIFF12, but ColumnModel expects 1-based
++aModel.maRange.mnFirst;
@@ -686,7 +694,10 @@ void WorksheetFragment::importBrk( SequenceInputStream& rStrm, bool bRowBreak )
{
PageBreakModel aModel;
sal_Int32 nManual;
- rStrm >> aModel.mnColRow >> aModel.mnMin >> aModel.mnMax >> nManual;
+ aModel.mnColRow = rStrm.readInt32();
+ aModel.mnMin = rStrm.readInt32();
+ aModel.mnMax = rStrm.readInt32();
+ nManual = rStrm.readInt32();
aModel.mbManual = nManual != 0;
setPageBreak( aModel, bRowBreak );
}
@@ -706,7 +717,11 @@ void WorksheetFragment::importOleObject( SequenceInputStream& rStrm )
::oox::vml::OleObjectInfo aInfo;
sal_Int32 nAspect, nUpdateMode, nShapeId;
sal_uInt16 nFlags;
- rStrm >> nAspect >> nUpdateMode >> nShapeId >> nFlags >> aInfo.maProgId;
+ nAspect = rStrm.readInt32();
+ nUpdateMode = rStrm.readInt32();
+ nShapeId = rStrm.readInt32();
+ nFlags = rStrm.readuInt16();
+ rStrm >> aInfo.maProgId;
aInfo.mbLinked = getFlag( nFlags, BIFF12_OLEOBJECT_LINKED );
if( aInfo.mbLinked )
aInfo.maTargetLink = getFormulaParser().importOleTargetLink( rStrm );
diff --git a/sc/source/filter/oox/worksheetsettings.cxx b/sc/source/filter/oox/worksheetsettings.cxx
index 09483b46fa12..1d0166824fab 100644
--- a/sc/source/filter/oox/worksheetsettings.cxx
+++ b/sc/source/filter/oox/worksheetsettings.cxx
@@ -187,7 +187,9 @@ void WorksheetSettings::importSheetPr( SequenceInputStream& rStrm )
{
sal_uInt16 nFlags1;
sal_uInt8 nFlags2;
- rStrm >> nFlags1 >> nFlags2 >> maSheetSettings.maTabColor;
+ nFlags1 = rStrm.readuInt16();
+ nFlags2 = rStrm.readuChar();
+ rStrm >> maSheetSettings.maTabColor;
rStrm.skip( 8 ); // sync anchor cell
rStrm >> maSheetSettings.maCodeName;
// sheet settings
@@ -209,7 +211,7 @@ void WorksheetSettings::importChartSheetPr( SequenceInputStream& rStrm )
void WorksheetSettings::importSheetProtection( SequenceInputStream& rStrm )
{
- rStrm >> maSheetProt.mnPasswordHash;
+ maSheetProt.mnPasswordHash = rStrm.readuInt16();
// no flags field for all these boolean flags?!?
maSheetProt.mbSheet = rStrm.readInt32() != 0;
maSheetProt.mbObjects = rStrm.readInt32() != 0;
@@ -231,7 +233,7 @@ void WorksheetSettings::importSheetProtection( SequenceInputStream& rStrm )
void WorksheetSettings::importChartProtection( SequenceInputStream& rStrm )
{
- rStrm >> maSheetProt.mnPasswordHash;
+ maSheetProt.mnPasswordHash = rStrm.readuInt16();
// no flags field for all these boolean flags?!?
maSheetProt.mbSheet = rStrm.readInt32() != 0;
maSheetProt.mbObjects = rStrm.readInt32() != 0;