[Libreoffice-commits] .: Branch 'libreoffice-3-5' - starmath/source

Lubos Lunak llunak at kemper.freedesktop.org
Fri Jan 6 03:26:25 PST 2012


 starmath/source/ooxmlexport.cxx |    2 +-
 starmath/source/ooxmlimport.cxx |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit cedaffbc1323f7ae3dd0ba9426385e205ff513a7
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Fri Jan 6 12:20:54 2012 +0100

    write TBAR rather as an accent, use over/underline for m:bar
    
    seems to match the docx semantics better, despite the names

diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx
index a7740da..fd12301 100644
--- a/starmath/source/ooxmlexport.cxx
+++ b/starmath/source/ooxmlexport.cxx
@@ -324,6 +324,7 @@ void SmOoxmlExport::HandleAttribute( const SmAttributNode* pNode, int nLevel )
         case TWIDETILDE:
         case TWIDEHAT:
         case TWIDEVEC:
+        case TBAR:
         {
             m_pSerializer->startElementNS( XML_m, XML_acc, FSEND );
             m_pSerializer->startElementNS( XML_m, XML_accPr, FSEND );
@@ -337,7 +338,6 @@ void SmOoxmlExport::HandleAttribute( const SmAttributNode* pNode, int nLevel )
             m_pSerializer->endElementNS( XML_m, XML_acc );
             break;
         }
-        case TBAR:
         case TOVERLINE:
         case TUNDERLINE:
             m_pSerializer->startElementNS( XML_m, XML_bar, FSEND );
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 1cdee7f..34c6831 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -191,6 +191,9 @@ OUString SmOoxmlImport::handleAcc()
     OUString acc;
     switch( accChr )
     {
+        case MS_BAR:
+            acc = STR( "bar" );
+            break;
         case MS_CHECK:
             acc = STR( "check" );
             break;
@@ -256,7 +259,7 @@ OUString SmOoxmlImport::handleBar()
     OUString e = readOMathArgInElement( M_TOKEN( e ));
     stream.ensureClosingTag( M_TOKEN( bar ));
     if( topbot == top )
-        return STR( "bar {" ) + e + STR( "}" );
+        return STR( "overline {" ) + e + STR( "}" );
     else
         return STR( "underline {" ) + e + STR( "}" );
 }


More information about the Libreoffice-commits mailing list