summaryrefslogtreecommitdiff
path: root/starmath/source/ooxmlimport.cxx
diff options
context:
space:
mode:
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()
{