From 9fefa504be3e5ef28a5ef9a0dab7be7044def3c0 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Fri, 7 Jul 2023 11:54:02 +0200 Subject: 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 Reviewed-by: Mike Kaganski --- starmath/source/document.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) + -- cgit v1.2.3