summaryrefslogtreecommitdiff
path: root/starmath/source/ooxmlimport.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2011-11-29 21:18:39 +0100
committerLuboš Luňák <l.lunak@suse.cz>2011-11-29 21:20:29 +0100
commita115442064c3c6a2ea398895159b62040d079cbb (patch)
tree7ec478071689c4019fdde1ed8b6abf44614261e9 /starmath/source/ooxmlimport.cxx
parent82c78e8790f341373c84f4b5bae5b3834b7b18ce (diff)
import docx m:m
Diffstat (limited to 'starmath/source/ooxmlimport.cxx')
-rw-r--r--starmath/source/ooxmlimport.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 530195c60607..c0d84abaf04c 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -122,6 +122,9 @@ OUString SmOoxmlImport::readOMathArg()
case OPENING( M_TOKEN( groupChr )):
ret += handleGroupChr();
break;
+ case OPENING( M_TOKEN( m )):
+ ret += handleM();
+ break;
case OPENING( M_TOKEN( r )):
ret += handleR();
break;
@@ -398,6 +401,29 @@ OUString SmOoxmlImport::handleGroupChr()
return ret;
}
+OUString SmOoxmlImport::handleM()
+{
+ stream.ensureOpeningTag( M_TOKEN( m ));
+ OUString allrows;
+ do // there must be at least one m:mr
+ {
+ stream.ensureOpeningTag( M_TOKEN( mr ));
+ OUString row;
+ do // there must be at least one m:e
+ {
+ if( !row.isEmpty())
+ row += STR( " # " );
+ row += handleE();
+ } while( !stream.atEnd() && stream.currentToken() == OPENING( M_TOKEN( e )));
+ if( !allrows.isEmpty())
+ allrows += STR( " ## " );
+ allrows += row;
+ stream.ensureClosingTag( M_TOKEN( mr ));
+ } while( !stream.atEnd() && stream.currentToken() == OPENING( M_TOKEN( mr )));
+ stream.ensureClosingTag( M_TOKEN( m ));
+ return STR( "matrix {" ) + allrows + STR( "}" );
+}
+
// NOT complete
OUString SmOoxmlImport::handleR()
{