From 966cbcaeea8d848b64eb59e980eac7cd543fcc5d Mon Sep 17 00:00:00 2001 From: Pranam Lashkari Date: Wed, 24 Dec 2025 18:06:09 +0530 Subject: [PATCH] tdf#170171 math: allow equestions to end without opening brackets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit problem: some user complained equation not rendering correctly if it ended with opening brackets while it worked fine in MSO i.e: [0;+∞[ Change-Id: Iccfbfd0782379985736cdc181479f167ca0beb95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196197 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara Tested-by: Jenkins CollaboraOffice (cherry picked from commit 7a4ea5e1e197798ec0c39c442bfc51397e00d1c4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196303 Tested-by: Jenkins --- starmath/source/ooxmlimport.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx index a829cb0a6367..6fe2e367f40f 100644 --- a/starmath/source/ooxmlimport.cxx +++ b/starmath/source/ooxmlimport.cxx @@ -347,9 +347,9 @@ OUString SmOoxmlImport::handleD() || closing == OUStringChar(MS_RMATHANGLE)) closing = " right rangle"; // use scalable brackets (the explicit "left" or "right") - if( opening == "(" || opening == "[" ) + if( opening == "(" || opening == "[" || opening == ")" || opening == "]" ) opening = "left " + opening; - if( closing == ")" || closing == "]" ) + if( closing == ")" || closing == "]" || closing == "(" || closing == "[") closing = " right " + closing; if( separator == "|" ) // plain "|" would be actually "V" (logical or) separator = " mline ";