summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-02-05 10:41:04 +0200
committerMichael Stahl <mstahl@redhat.com>2014-02-12 15:31:40 +0000
commit15535e32ddcfee451d4dbc9be9de0b8c9f9d78d4 (patch)
treedb4badc477cea1ecd51f5fab82ce0f24ae20f155 /starmath
parent7accbd8c0d7f1d0b87748f0de599c4d8b469a61e (diff)
convert SvStream::operator>> methods to ReadXXX methods
First, I updated the clang rewriter to do the conversion. Then I lightly hand-tweaked the output for the few places where the rewriter messed up, mostly when dealing with calls on "this". Change-Id: I40a6a977959cd97415c678eafc8507de8aa3b1a9 Reviewed-on: https://gerrit.libreoffice.org/7879 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/eqnolefilehdr.cxx2
-rw-r--r--starmath/source/mathtype.cxx70
2 files changed, 36 insertions, 36 deletions
diff --git a/starmath/source/eqnolefilehdr.cxx b/starmath/source/eqnolefilehdr.cxx
index a017963d41bf..c35903c7c3ea 100644
--- a/starmath/source/eqnolefilehdr.cxx
+++ b/starmath/source/eqnolefilehdr.cxx
@@ -42,7 +42,7 @@ sal_Bool GetMathTypeVersion( SotStorage* pStor, sal_uInt8 &nVersion )
//
EQNOLEFILEHDR aHdr;
aHdr.Read(pS);
- *pS >> nVer;
+ pS->ReadUChar( nVer );
if (!pS->GetError())
{
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 688a91408ebf..b90b79d3303a 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -564,11 +564,11 @@ int MathType::Parse(SotStorage *pStor)
EQNOLEFILEHDR aHdr;
aHdr.Read(pS);
- *pS >> nVersion;
- *pS >> nPlatform;
- *pS >> nProduct;
- *pS >> nProdVersion;
- *pS >> nProdSubVersion;
+ pS->ReadUChar( nVersion );
+ pS->ReadUChar( nPlatform );
+ pS->ReadUChar( nProduct );
+ pS->ReadUChar( nProdVersion );
+ pS->ReadUChar( nProdSubVersion );
if (nVersion > 3) // allow only supported versions of MathType to be parsed
return 0;
@@ -636,15 +636,15 @@ static void lcl_AppendDummyTerm(OUString &rRet)
void MathType::HandleNudge()
{
sal_uInt8 nXNudge;
- *pS >> nXNudge;
+ pS->ReadUChar( nXNudge );
sal_uInt8 nYNudge;
- *pS >> nYNudge;
+ pS->ReadUChar( nYNudge );
if (nXNudge == 128 && nYNudge == 128)
{
sal_uInt16 nXLongNudge;
sal_uInt16 nYLongNudge;
- *pS >> nXLongNudge;
- *pS >> nYLongNudge;
+ pS->ReadUInt16( nXLongNudge );
+ pS->ReadUInt16( nYLongNudge );
}
}
/*Fabously complicated as many tokens have to be reordered and generally
@@ -669,7 +669,7 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
do
{
nTag = 0;
- *pS >> nTag;
+ pS->ReadUChar( nTag );
nRecord = nTag&0x0F;
/*MathType strings can of course include words which
@@ -1719,31 +1719,31 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
HandleEmblishments();
break;
case RULER:
- *pS >> nTabStops;
+ pS->ReadUChar( nTabStops );
for (i=0;i<nTabStops;i++)
{
- *pS >> nTabType;
- *pS >> nTabOffset;
+ pS->ReadUChar( nTabType );
+ pS->ReadUInt16( nTabOffset );
}
SAL_WARN("starmath", "Not seen in the wild Equation Ruler Field");
break;
case FONT:
{
MathTypeFont aFont;
- *pS >> aFont.nTface;
+ pS->ReadUChar( aFont.nTface );
/*
The typeface number is the negative (which makes it
positive) of the typeface value (unbiased) that appears in
CHAR records that might follow a given FONT record
*/
aFont.nTface = 128-aFont.nTface;
- *pS >> aFont.nStyle;
+ pS->ReadUChar( aFont.nStyle );
aUserStyles.insert(aFont);
std::vector<sal_Char> aSeq;
while(true)
{
sal_Char nChar8(0);
- *pS >> nChar8;
+ pS->ReadChar( nChar8 );
if (nChar8 == 0)
break;
aSeq.push_back(nChar8);
@@ -2654,8 +2654,8 @@ void MathType::HandleOperator(SmNode *pNode,int nLevel)
int MathType::HandlePile(int &rSetAlign,int nLevel,sal_uInt8 nSelector,
sal_uInt8 nVariation)
{
- *pS >> nHAlign;
- *pS >> nVAlign;
+ pS->ReadUChar( nHAlign );
+ pS->ReadUChar( nVAlign );
HandleAlign(nHAlign,nVAlign,rSetAlign);
@@ -2676,11 +2676,11 @@ int MathType::HandleMatrix(int nLevel,sal_uInt8 nSelector,
sal_uInt8 nVariation)
{
sal_uInt8 nH_just,nV_just,nRows,nCols;
- *pS >> nVAlign;
- *pS >> nH_just;
- *pS >> nV_just;
- *pS >> nRows;
- *pS >> nCols;
+ pS->ReadUChar( nVAlign );
+ pS->ReadUChar( nH_just );
+ pS->ReadUChar( nV_just );
+ pS->ReadUChar( nRows );
+ pS->ReadUChar( nCols );
int nBytes = ((nRows+1)*2)/8;
if (((nRows+1)*2)%8)
nBytes++;
@@ -2705,9 +2705,9 @@ int MathType::HandleTemplate(int nLevel,sal_uInt8 &rSelector,
sal_uInt8 &rVariation, sal_Int32 &rLastTemplateBracket)
{
sal_uInt8 nOption; //This appears utterly unused
- *pS >> rSelector;
- *pS >> rVariation;
- *pS >> nOption;
+ pS->ReadUChar( rSelector );
+ pS->ReadUChar( rVariation );
+ pS->ReadUChar( nOption );
OSL_ENSURE(rSelector < 48,"Selector out of range");
if ((rSelector >= 21) && (rSelector <=26))
{
@@ -2756,7 +2756,7 @@ void MathType::HandleEmblishments()
sal_uInt8 nEmbel;
do
{
- *pS >> nEmbel;
+ pS->ReadUChar( nEmbel );
switch (nEmbel)
{
case 0x02:
@@ -2834,21 +2834,21 @@ void MathType::HandleEmblishments()
void MathType::HandleSetSize()
{
sal_uInt8 nTemp;
- *pS >> nTemp;
+ pS->ReadUChar( nTemp );
switch (nTemp)
{
case 101:
- *pS >> nLSize;
+ pS->ReadInt16( nLSize );
nLSize = -nLSize;
break;
case 100:
- *pS >> nTemp;
+ pS->ReadUChar( nTemp );
nLSize = nTemp;
- *pS >> nDSize;
+ pS->ReadInt16( nDSize );
break;
default:
nLSize = nTemp;
- *pS >> nTemp;
+ pS->ReadUChar( nTemp );
nDSize = nTemp-128;
break;
}
@@ -2867,15 +2867,15 @@ int MathType::HandleChar(sal_Int32 &rTextStart,int &rSetSize,int nLevel,
}
sal_uInt8 nOldTypeFace = nTypeFace;
- *pS >> nTypeFace;
+ pS->ReadUChar( nTypeFace );
if (nVersion < 3)
{
sal_uInt8 nChar8;
- *pS >> nChar8;
+ pS->ReadUChar( nChar8 );
nChar = nChar8;
}
else
- *pS >> nChar;
+ pS->ReadUInt16( nChar );
/*
bad character, old mathtype < 3 has these