starmath/source/document.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9fefa504be3e5ef28a5ef9a0dab7be7044def3c0
Author:     Szymon Kłos <[email protected]>
AuthorDate: Fri Jul 7 11:54:02 2023 +0200
Commit:     Mike Kaganski <[email protected]>
CommitDate: Sun Jul 9 08:33:53 2023 +0200

    math: set initial formula width to non-zero
    
    After:
    commit 96de6dee60aaf2f0d332291fa3b0ad7bb8b7127c
    tdf#65067 Remove excessive spacing from Formula objects
    
    Initial size of formula object is 1 (width).
    This makes it ugly and hard to resize.
    
    Let's make it bigger when it is empty.
    
    Change-Id: I823de83b0f79a5a30c6ea6227f117daca3157e5f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154160
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 0593d26c268c..b92c024401d2 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -373,7 +373,7 @@ Size SmDocShell::GetSize()
         ArrangeFormula();
         aRet = mpTree->GetSize();
 
-        if ( !aRet.Width() )
+        if ( !aRet.Width() || aRet.Width() == 1 )
             aRet.setWidth( 2000 );
         else
             aRet.AdjustWidth(maFormat.GetDistance( DIS_LEFTSPACE ) +

Reply via email to