summaryrefslogtreecommitdiff
path: root/starmath/source/node.cxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-11-13 21:06:55 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2016-11-15 00:27:30 +0000
commit074f0ab1d76f16fe92493868e2f2de75e67792ef (patch)
tree75e27850211fc1d12618b795eaa2d6e853f1f711 /starmath/source/node.cxx
parentbb50b1609abe83265311613db4a18e992dc666c8 (diff)
tdf#76296 Import MathML's <mspace>
as possibly multiple "~" and/or "`" by honoring its width attribute. Change-Id: I17e361c3f8f5d061c856b72266332369497d16b9 Reviewed-on: https://gerrit.libreoffice.org/30809 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/source/node.cxx')
-rw-r--r--starmath/source/node.cxx14
1 files changed, 14 insertions, 0 deletions
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