diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2016-11-13 21:06:55 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2016-11-15 00:27:30 +0000 |
commit | 074f0ab1d76f16fe92493868e2f2de75e67792ef (patch) | |
tree | 75e27850211fc1d12618b795eaa2d6e853f1f711 /starmath/source/visitors.cxx | |
parent | bb50b1609abe83265311613db4a18e992dc666c8 (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/visitors.cxx')
-rw-r--r-- | starmath/source/visitors.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx index d9de2bed20a2..0397c4e8a1f5 100644 --- a/starmath/source/visitors.cxx +++ b/starmath/source/visitors.cxx @@ -2293,7 +2293,16 @@ void SmNodeToTextVisitor::Visit( SmMathSymbolNode* pNode ) void SmNodeToTextVisitor::Visit( SmBlankNode* pNode ) { - Append( pNode->GetToken( ).aText ); + sal_uInt16 nNum = pNode->GetBlankNum(); + if (nNum <= 0) + return; + sal_uInt16 nWide = nNum / 4; + sal_uInt16 nNarrow = nNum % 4; + for (sal_uInt16 i = 0; i < nWide; i++) + Append( "~" ); + for (sal_uInt16 i = 0; i < nNarrow; i++) + Append( "`" ); + Append( " " ); } void SmNodeToTextVisitor::Visit( SmErrorNode* ) |