diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-11-29 16:22:13 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-11-29 21:20:26 +0100 |
commit | 020eddb20aa6fe68851dbc05aafeaf1eca0f8c11 (patch) | |
tree | 838a9203d2d57998ba63b13b5e055e92896fce10 | |
parent | 7bdccfdc1d3dc070a19a604c4c76b28428cc5a0e (diff) |
try to avoid unnecessary space in created formula
-rw-r--r-- | starmath/source/ooxmlimport.cxx | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx index 2394fa54bf11..71d21894815d 100644 --- a/starmath/source/ooxmlimport.cxx +++ b/starmath/source/ooxmlimport.cxx @@ -74,22 +74,24 @@ OUString SmOoxmlImport::handleStream() XmlStream::Tag tag = stream.currentTag(); if( tag.token == CLOSING( M_TOKEN( oMath ))) break; + if( !ret.isEmpty()) + ret += STR( " " ); switch( tag.token ) { case OPENING( M_TOKEN( acc )): - ret += STR( " " ) + handleAcc(); + ret += handleAcc(); break; case OPENING( M_TOKEN( bar )): - ret += STR( " " ) + handleBar(); + ret += handleBar(); break; case OPENING( M_TOKEN( borderBox )): - ret += STR( " " ) + handleBorderBox(); + ret += handleBorderBox(); break; case OPENING( M_TOKEN( d )): - ret += STR( " " ) + handleD(); + ret += handleD(); break; case OPENING( M_TOKEN( f )): - ret += STR( " " ) + handleF(); + ret += handleF(); break; default: stream.handleUnexpectedTag(); @@ -266,16 +268,18 @@ OUString SmOoxmlImport::readOMathArg( int endtoken ) XmlStream::Tag tag = stream.currentTag(); if( tag.token == CLOSING( endtoken )) break; + if( !ret.isEmpty()) + ret += STR( " " ); switch( tag.token ) { case OPENING( M_TOKEN( acc )): - ret += STR( " " ) + handleAcc(); + ret += handleAcc(); break; case OPENING( M_TOKEN( f )): - ret += STR( " " ) + handleF(); + ret += handleF(); break; case OPENING( M_TOKEN( r )): - ret += STR( " " ) + handleR(); + ret += handleR(); break; default: stream.handleUnexpectedTag(); |