Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


From: "Neil Voss (fourier)" <vossman77@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


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.