starmath/source/ooxmlimport.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7a4ea5e1e197798ec0c39c442bfc51397e00d1c4
Author:     Pranam Lashkari <[email protected]>
AuthorDate: Wed Dec 24 18:06:09 2025 +0530
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sat Dec 27 17:43:11 2025 +0100

    math: allow equestions to end without opening brackets
    
    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 <[email protected]>
    Tested-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index dec486e6025b..f7821f67b4a3 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -346,9 +346,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 ";

Reply via email to