summaryrefslogtreecommitdiff
path: root/editeng/source/outliner/outliner.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-04-02 11:16:30 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-04-03 16:41:59 +0200
commita3daf52dd21ae03a8b04e1f9132a6713c9cc414f (patch)
tree3da8eac339f92e9a22feb1449db9115e6bf02413 /editeng/source/outliner/outliner.cxx
parent387a9c445793e8377f85e508d935dc070fd8ab74 (diff)
Base scale on 1.0, not on 100.0
Simplifies things by avoiding many repeated multiplications / divisions by 100 during calculations. Change-Id: Ib063d343549139c8d83e5b06570dc61f39ea0df6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165666 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'editeng/source/outliner/outliner.cxx')
-rw-r--r--editeng/source/outliner/outliner.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index b6f715da52d0..2e8541e72051 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -846,10 +846,8 @@ vcl::Font Outliner::ImpCalcBulletFont( sal_Int32 nPara ) const
// Use original scale...
- double fFontScaleY = pFmt->GetBulletRelSize() * (getScalingParameters().fFontY / 100.0);
- double fScaledLineHeight = aStdFont.GetFontSize().Height();
- fScaledLineHeight *= fFontScaleY * 10;
- fScaledLineHeight /= 1000.0;
+ double fFontScaleY = pFmt->GetBulletRelSize() / 100.0 * getScalingParameters().fFontY;
+ double fScaledLineHeight = aStdFont.GetFontSize().Height() * fFontScaleY;
aBulletFont.SetAlignment( ALIGN_BOTTOM );
aBulletFont.SetFontSize(Size(0, basegfx::fround(fScaledLineHeight)));
@@ -891,7 +889,7 @@ void Outliner::PaintBullet(sal_Int32 nPara, const Point& rStartPos, const Point&
tools::Rectangle aBulletArea( ImpCalcBulletArea( nPara, true, false ) );
- double fSpacingFactorX = getScalingParameters().fSpacingX / 100.0;
+ double fSpacingFactorX = getScalingParameters().fSpacingX;
tools::Long nStretchBulletX = basegfx::fround(double(aBulletArea.Left()) * fSpacingFactorX);
tools::Long nStretchBulletWidth = basegfx::fround(double(aBulletArea.GetWidth()) * fSpacingFactorX);