summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2011-11-29 21:09:43 +0100
committerLuboš Luňák <l.lunak@suse.cz>2011-11-29 21:20:29 +0100
commit82c78e8790f341373c84f4b5bae5b3834b7b18ce (patch)
tree02af1f2c538d50b43f1199b7ef3568ec532a946d /starmath
parentad1a6c6d507f2480efa582ad8b864d65dede1314 (diff)
finish reading in while() also when end of stream, just in case
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/ooxmlimport.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 2a29d0aa20b2..530195c60607 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -89,7 +89,7 @@ OUString SmOoxmlImport::handleStream()
OUString SmOoxmlImport::readOMathArg()
{
OUString ret;
- while( stream.currentToken() != CLOSING( stream.currentToken()))
+ while( !stream.atEnd() && stream.currentToken() != CLOSING( stream.currentToken()))
{
if( !ret.isEmpty())
ret += STR( " " );
@@ -409,7 +409,7 @@ OUString SmOoxmlImport::handleR()
stream.ensureClosingTag( OOX_TOKEN( doc, rPr ));
}
OUString text;
- while( stream.currentToken() != CLOSING( stream.currentToken()))
+ while( !stream.atEnd() && stream.currentToken() != CLOSING( stream.currentToken()))
{
switch( stream.currentToken())
{