summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starmath/source/ooxmlimport.cxx26
-rw-r--r--starmath/source/ooxmlimport.hxx1
2 files changed, 27 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()
{
diff --git a/starmath/source/ooxmlimport.hxx b/starmath/source/ooxmlimport.hxx
index c0786bc5336f..05963d654ed4 100644
--- a/starmath/source/ooxmlimport.hxx
+++ b/starmath/source/ooxmlimport.hxx
@@ -54,6 +54,7 @@ private:
enum LimLowUpp_t { LimLow, LimUpp };
rtl::OUString handleLimLowUpp( LimLowUpp_t limlowupp );
rtl::OUString handleGroupChr();
+ rtl::OUString handleM();
rtl::OUString handleR();
rtl::OUString readOMathArg();
oox::formulaimport::XmlStream& stream;