summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/mathtype.cxx50
1 files changed, 21 insertions, 29 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 72c3bed94edb..43602a491d03 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -558,36 +558,28 @@ bool MathType::Parse(SvStream* pStream)
pS = pStream;
pS->SetEndian( SvStreamEndian::LITTLE );
- bool bRet;
- try
- {
- EQNOLEFILEHDR aHdr;
- aHdr.Read(pS);
- sal_uInt8 nProdVersion;
- sal_uInt8 nProdSubVersion;
- sal_uInt8 nPlatform;
- sal_uInt8 nProduct;
- 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 false;
+ EQNOLEFILEHDR aHdr;
+ aHdr.Read(pS);
+ sal_uInt8 nProdVersion;
+ sal_uInt8 nProdSubVersion;
+ sal_uInt8 nPlatform;
+ sal_uInt8 nProduct;
+ 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 false;
+
+ bool bRet = HandleRecords(0);
+ //little crude hack to close occasionally open expressions
+ //a sophisticated system to determine what expressions are
+ //opened is required, but this is as much work as rewriting
+ //starmaths internals.
+ rRet.append("{}");
- bRet = HandleRecords(0);
- //little crude hack to close occasionally open expressions
- //a sophisticated system to determine what expressions are
- //opened is required, but this is as much work as rewriting
- //starmaths internals.
- rRet.append("{}");
- }
- catch (const SvStreamEOFException&)
- {
- SAL_WARN("starmath", "EOF");
- bRet = false;
- }
return bRet;
}