summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorFrédéric Wang <fred.wang@free.fr>2013-06-22 20:03:59 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-06-28 09:45:59 +0000
commit6231979ce1b89ce36e0a68139c96c5c1c1e704bb (patch)
tree40c2e83c44c028dec1d71acb8413b929682f7df8 /starmath
parent74c5ed19f430327988194cdcd6bdff09591a93fa (diff)
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@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/types.hxx6
-rw-r--r--starmath/source/mathmlexport.cxx9
-rw-r--r--starmath/source/node.cxx6
-rw-r--r--starmath/source/ooxmlimport.cxx2
4 files changed, 19 insertions, 4 deletions
diff --git a/starmath/inc/types.hxx b/starmath/inc/types.hxx
index ca2bea9d4592..530736ba6b62 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 b2a9b387e840..8df9d28edb2a 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 e0c72822f305..d3ae70573602 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 a84419578bc8..cb355b721d08 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: