starmath/source/visitors.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit cb4c69121a7ca4db4748a78a16d87aaadb3aa9fa Author: Ivan Timofeev <timofeev....@gmail.com> Date: Sat Jul 21 12:37:19 2012 +0400 fdo#38887: SmNodeToTextVisitor: use braces for nested scripts Though it is unclear why everything is wrapped into SmExpressionNode. But still it is so, the patch will work. Change-Id: Ib62f1a148c737ad110f659f73181ed51e02b8594 diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx index 2722e4e..9c27970 100644 --- a/starmath/source/visitors.cxx +++ b/starmath/source/visitors.cxx @@ -2504,6 +2504,12 @@ void SmNodeToTextVisitor::Visit( SmLineNode* pNode ) void SmNodeToTextVisitor::Visit( SmExpressionNode* pNode ) { bool bracketsNeeded = pNode->GetNumSubNodes() != 1 || pNode->GetSubNode(0)->GetType() == NBINHOR; + // nested subsups + bracketsNeeded |= + pNode->GetParent()->GetType() == NSUBSUP && + pNode->GetNumSubNodes() == 1 && + pNode->GetSubNode(0)->GetType() == NSUBSUP; + if (bracketsNeeded) { Append( "{ " ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits