Kaydet (Commit) 82c78e87 authored tarafından Luboš Luňák's avatar Luboš Luňák

finish reading in while() also when end of stream, just in case

üst ad1a6c6d
...@@ -89,7 +89,7 @@ OUString SmOoxmlImport::handleStream() ...@@ -89,7 +89,7 @@ OUString SmOoxmlImport::handleStream()
OUString SmOoxmlImport::readOMathArg() OUString SmOoxmlImport::readOMathArg()
{ {
OUString ret; OUString ret;
while( stream.currentToken() != CLOSING( stream.currentToken())) while( !stream.atEnd() && stream.currentToken() != CLOSING( stream.currentToken()))
{ {
if( !ret.isEmpty()) if( !ret.isEmpty())
ret += STR( " " ); ret += STR( " " );
...@@ -409,7 +409,7 @@ OUString SmOoxmlImport::handleR() ...@@ -409,7 +409,7 @@ OUString SmOoxmlImport::handleR()
stream.ensureClosingTag( OOX_TOKEN( doc, rPr )); stream.ensureClosingTag( OOX_TOKEN( doc, rPr ));
} }
OUString text; OUString text;
while( stream.currentToken() != CLOSING( stream.currentToken())) while( !stream.atEnd() && stream.currentToken() != CLOSING( stream.currentToken()))
{ {
switch( stream.currentToken()) switch( stream.currentToken())
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment