summaryrefslogtreecommitdiff
path: root/include/editeng
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 /include/editeng
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 'include/editeng')
-rw-r--r--include/editeng/editdata.hxx18
1 files changed, 6 insertions, 12 deletions
diff --git a/include/editeng/editdata.hxx b/include/editeng/editdata.hxx
index 0985e53a1b96..799b29bf5acb 100644
--- a/include/editeng/editdata.hxx
+++ b/include/editeng/editdata.hxx
@@ -158,21 +158,15 @@ struct ParagraphInfos
struct ScalingParameters
{
- double fFontX = 100.0;
- double fFontY = 100.0;
- double fSpacingX = 100.0;
- double fSpacingY = 100.0;
+ double fFontX = 1.0;
+ double fFontY = 1.0;
+ double fSpacingX = 1.0;
+ double fSpacingY = 1.0;
- bool operator==(const ScalingParameters& rOther) const
- {
- return fFontX == rOther.fFontX
- && fFontY == rOther.fFontY
- && fSpacingX == rOther.fSpacingX
- && fSpacingY == rOther.fSpacingY;
- }
+ bool operator==(const ScalingParameters& rOther) const = default;
bool areValuesDefault()
{
- return fFontX == 100.0 && fFontY == 100.0 && fSpacingX == 100.0 && fSpacingY == 100.0;
+ return fFontX == 1.0 && fFontY == 1.0 && fSpacingX == 1.0 && fSpacingY == 1.0;
}
};