[Libreoffice-commits] core.git: starmath/inc starmath/source
Frédéric Wang
fred.wang at free.fr
Fri Jun 28 02:46:19 PDT 2013
starmath/inc/types.hxx | 6 ++++--
starmath/source/mathmlexport.cxx | 9 +++++++++
starmath/source/node.cxx | 6 ++++--
starmath/source/ooxmlimport.cxx | 2 ++
4 files changed, 19 insertions(+), 4 deletions(-)
New commits:
commit 6231979ce1b89ce36e0a68139c96c5c1c1e704bb
Author: Frédéric Wang <fred.wang at free.fr>
Date: Sat Jun 22 20:03:59 2013 +0200
fdo#66024 - Formula Editor: make wide accents stretchy when exported to MathML
Change-Id: Ifd0adc51d79e0673661b5646d27f657768ea5b20
Reviewed-on: https://gerrit.libreoffice.org/4450
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/starmath/inc/types.hxx b/starmath/inc/types.hxx
index ca2bea9..530736b 100644
--- a/starmath/inc/types.hxx
+++ b/starmath/inc/types.hxx
@@ -139,8 +139,10 @@ enum MathSymbol
MS_GRAVE = (sal_Unicode) 0x0300,
MS_ACUTE = (sal_Unicode) 0x0301,
- MS_HAT = (sal_Unicode) 0x0302,
- MS_TILDE = (sal_Unicode) 0x0303,
+ MS_HAT = (sal_Unicode) 0x005E,
+ MS_COMBHAT = (sal_Unicode) 0x0302,
+ MS_TILDE = (sal_Unicode) 0x007E,
+ MS_COMBTILDE = (sal_Unicode) 0x0303,
MS_BAR = (sal_Unicode) 0x0304,
MS_BREVE = (sal_Unicode) 0x0306,
MS_CIRCLE = (sal_Unicode) 0x030A,
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index b2a9b38..8df9d28 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -1121,6 +1121,15 @@ void SmXMLExport::ExportAttributes(const SmNode *pNode, int nLevel)
break;
case TOVERSTRIKE:
break;
+ case TWIDETILDE:
+ case TWIDEHAT:
+ case TWIDEVEC:
+ {
+ // make these wide accents stretchy
+ AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_TRUE);
+ ExportNodes(pNode->GetSubNode(0), nLevel+1);
+ }
+ break;
default:
ExportNodes(pNode->GetSubNode(0), nLevel+1);
break;
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index e0c7282..d3ae705 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2820,10 +2820,12 @@ void SmAttributNode::CreateTextFromNode(String &rText)
case MS_VEC: // COMBINING RIGHT ARROW ABOVE
rText += "vec ";
break;
- case MS_TILDE: // COMBINING TILDE
+ case MS_TILDE: // TILDE
+ case MS_COMBTILDE: // COMBINING TILDE
rText += "tilde ";
break;
- case MS_HAT: // COMBINING CIRCUMFLEX ACCENT
+ case MS_HAT: // CIRCUMFLEX ACCENT
+ case MS_COMBHAT: // COMBINING CIRCUMFLEX ACCENT
rText += "hat ";
break;
case MS_BAR: // COMBINING MACRON
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index a844195..cb355b7 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -192,9 +192,11 @@ OUString SmOoxmlImport::handleAcc()
acc = "widevec";
break;
case MS_TILDE:
+ case MS_COMBTILDE:
acc = "widetilde";
break;
case MS_HAT:
+ case MS_COMBHAT:
acc = "widehat";
break;
case MS_DOT:
More information about the Libreoffice-commits
mailing list