diff options
author | Neil Voss (fourier) <vossman77@yahoo.com> | 2013-05-24 08:19:03 -0500 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2013-06-22 04:03:01 +0200 |
commit | aaa8271292afd913b9aef20f444ef261928943df (patch) | |
tree | 5af9f3bbd2b542e292a5ac97e68596bfac231a3a /svx/source | |
parent | 21d5c3de928eb3c7cad4aeb3a3f261d30660938e (diff) |
fdo#42134 FORMATTING: Autofit does not work properly on long texts
Change-Id: I18e314913122ffbc15659ced9d1b746d10ccc17c
(cherry picked from commit bddf3bba1fa13b57a69f2bd5f7c7f96bb945066d)
Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index efb522796697..387a561b77ab 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); |