Kaydet (Commit) 6231979c authored tarafından Frédéric Wang's avatar Frédéric Wang Kaydeden (comit) Fridrich Strba

fdo#66024 - Formula Editor: make wide accents stretchy when exported to MathML

Change-Id: Ifd0adc51d79e0673661b5646d27f657768ea5b20
Reviewed-on: https://gerrit.libreoffice.org/4450Reviewed-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
Tested-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
üst 74c5ed19
......@@ -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,
......
......@@ -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;
......
......@@ -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
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment