svx/source/svdraw/svdotext.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit bddf3bba1fa13b57a69f2bd5f7c7f96bb945066d Author: Neil Voss (fourier) <vossma...@yahoo.com> Date: Fri May 24 08:19:03 2013 -0500 fdo#42134 FORMATTING: Autofit does not work properly on long texts Change-Id: I18e314913122ffbc15659ced9d1b746d10ccc17c diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index efb5227..387a561 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1284,6 +1284,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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits