summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/unoshape.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 /svx/source/unodraw/unoshape.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 'svx/source/unodraw/unoshape.cxx')
-rw-r--r--svx/source/unodraw/unoshape.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 95d6ba37304c..de1590536d19 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2336,7 +2336,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertyMapEn
if (rValue >>= fScale)
{
SdrTextFitToSizeTypeItem aItem(pSdrObject->GetMergedItem(SDRATTR_TEXT_FITTOSIZE));
- aItem.setFontScale(fScale);
+ aItem.setFontScale(fScale / 100.0);
pSdrObject->SetMergedItem(aItem);
return true;
}
@@ -2349,7 +2349,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertyMapEn
if (rValue >>= fScale)
{
SdrTextFitToSizeTypeItem aItem(pSdrObject->GetMergedItem(SDRATTR_TEXT_FITTOSIZE));
- aItem.setSpacingScale(fScale);
+ aItem.setSpacingScale(fScale / 100.0);
pSdrObject->SetMergedItem(aItem);
return true;
}
@@ -2875,7 +2875,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertyMapEn
auto* pTextObject = getTextObjectWithFitToSize(GetSdrObject());
if (pTextObject)
{
- rValue <<= pTextObject->GetFontScale();
+ rValue <<= pTextObject->GetFontScale() * 100.0;
}
break;
}
@@ -2885,7 +2885,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertyMapEn
auto* pTextObject = getTextObjectWithFitToSize(GetSdrObject());
if (pTextObject)
{
- rValue <<= pTextObject->GetSpacingScale();
+ rValue <<= pTextObject->GetSpacingScale() * 100.0;
}
break;
}