From a0709e3213a0494df56d56a77c67358fbe1ac5bd Mon Sep 17 00:00:00 2001 From: Marcos Paulo de Souza Date: Sun, 28 Jul 2013 11:57:22 -0300 Subject: [PATCH] Fix i#84002 by putting braces when needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the case of sqrt with more than 2 operands, like over, we need to put braces in the beginning and in the end of the element. Change-Id: I391db14cd2ddc37695fe0b1f590a89b9dd4369ef Reviewed-on: https://gerrit.libreoffice.org/5153 Reviewed-by: Luboš Luňák Tested-by: Luboš Luňák --- starmath/source/node.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 84571474d349..3f029bb31e8b 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -1105,7 +1105,14 @@ void SmRootNode::CreateTextFromNode(OUString &rText) } else rText += "sqrt "; + + if (!pExtra && GetSubNode(2)->GetNumSubNodes() > 1) + rText += "{ "; + GetSubNode(2)->CreateTextFromNode(rText); + + if (!pExtra && GetSubNode(2)->GetNumSubNodes() > 1) + rText += "} "; }