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

2012-01-06 Thread Lubos Lunak
 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.lu...@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( } );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-01-06 Thread Lubos Lunak
 starmath/source/node.cxx |   36 
 1 file changed, 32 insertions(+), 4 deletions(-)

New commits:
commit c3e17714831bf80270a29a5e09194c8f141e42f3
Author: Joshua Cogliati jjcogliati...@yahoo.com
Date:   Fri Jan 6 10:48:01 2012 +

smath does not handle accents in MathML

diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 58010e7..d5866cd 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2821,23 +2821,51 @@ void SmAttributNode::CreateTextFromNode(String rText)
 nLast = aStr.GetChar(0);
 switch (nLast)
 {
-case 0xAF:
+case 0xAF: // MACRON
 APPEND(rText,overline );
 break;
-case 0x2d9:
+case 0x2d9: // DOT ABOVE
 APPEND(rText,dot );
 break;
-case 0x2dc:
+case 0x2dc: // SMALL TILDE
 APPEND(rText,widetilde );
 break;
-case 0xA8:
+case 0xA8: // DIAERESIS
 APPEND(rText,ddot );
 break;
 case 0xE082:
 break;
 case 0xE09B:
+case 0x20DB: // COMBINING THREE DOTS ABOVE
 APPEND(rText,dddot );
 break;
+case 0x301: // COMBINING ACUTE ACCENT
+APPEND(rText,acute );
+break;
+case 0x300: // COMBINING GRAVE ACCENT
+APPEND(rText,grave );
+break;
+case 0x30C: // COMBINING CARON
+APPEND(rText,check );
+break;
+case 0x306: // COMBINING BREVE
+APPEND(rText,breve );
+break;
+case 0x30A: // COMBINING RING ABOVE
+APPEND(rText,circle );
+break;
+case 0x20D7: // COMBINING RIGHT ARROW ABOVE
+APPEND(rText,vec );
+break;
+case 0x303: // COMBINING TILDE
+APPEND(rText,tilde );
+break;
+case 0x302: // COMBINING CIRCUMFLEX ACCENT
+APPEND(rText,hat );
+break;
+case 0x304: // COMBINING MACRON
+APPEND(rText,bar );
+break;
 default:
 rText.Append(nLast);
 break;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits