[PATCH] autofit fix for MAB #42134
Neil Voss
vossman77 at yahoo.com
Fri May 24 06:35:09 PDT 2013
From: "Neil Voss (fourier)" <vossman77 at yahoo.com>
Change-Id: I7706bf5c05560d0f13f0a03304b975b8cb47005f
---
svx/source/svdraw/svdotext.cxx | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 7a662aa..667e40d 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1277,6 +1277,12 @@ void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner, const Size& rTextSize,
fFactor = double(rTextSize.Width())/aCurrTextSize.Width();
else
fFactor = double(rTextSize.Height())/aCurrTextSize.Height();
+ // fFactor scales in both x and y directions
+ // - this is fine for bulleted words
+ // - but it scales too much for a long paragraph
+ // - taking sqrt scales long paragraphs the best
+ // - bulleted words will have to go through more iterations
+ fFactor = std::sqrt(fFactor);
sal_uInt16 nCurrStretchX, nCurrStretchY;
rOutliner.GetGlobalCharStretching(nCurrStretchX, nCurrStretchY);
--
1.7.11.7
More information about the LibreOffice
mailing list