From 074f0ab1d76f16fe92493868e2f2de75e67792ef Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Sun, 13 Nov 2016 21:06:55 +0900 Subject: tdf#76296 Import MathML's as possibly multiple "~" and/or "`" by honoring its width attribute. Change-Id: I17e361c3f8f5d061c856b72266332369497d16b9 Reviewed-on: https://gerrit.libreoffice.org/30809 Tested-by: Jenkins Reviewed-by: Takeshi Abe --- starmath/source/node.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'starmath/source/node.cxx') diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index febddc2f4785..dfbc8196e723 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -2774,6 +2774,20 @@ void SmBlankNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) SetWidth(nSpace); } +void SmBlankNode::CreateTextFromNode(OUString &rText) +{ + if (mnNum <= 0) + return; + sal_uInt16 nWide = mnNum / 4; + sal_uInt16 nNarrow = mnNum % 4; + for (sal_uInt16 i = 0; i < nWide; i++) + rText += "~"; + for (sal_uInt16 i = 0; i < nNarrow; i++) + rText += "`"; + rText += " "; +} + + /**************************************************************************/ //Implementation of all accept methods for SmVisitor -- cgit