[Libreoffice-commits] core.git: cui/source
Caolán McNamara
caolanm at redhat.com
Tue May 29 20:34:36 UTC 2018
cui/source/tabpages/transfrm.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 7725eff80a7bc3f3e422e56e1cd7bfa531f19a70
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue May 29 13:53:35 2018 +0100
fix pow by digits
Change-Id: I715b85fa1c1e3f6c391c742f861e3791a505a570
Reviewed-on: https://gerrit.libreoffice.org/55006
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 6cfe85e3c0bf..fcd86eb7c082 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -1063,6 +1063,8 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet* )
pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_WIDTH );
mfOldWidth = std::max( pItem ? static_cast<double>(static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0.0, 1.0 );
double fTmpWidth((OutputDevice::LogicToLogic(static_cast<sal_Int32>(mfOldWidth), mePoolUnit, MapUnit::Map100thMM)) / fUIScale);
+ if (m_xMtrWidth->get_digits())
+ fTmpWidth *= pow(10.0, m_xMtrWidth->get_digits());
m_xMtrWidth->set_value(static_cast<int>(fTmpWidth), FUNIT_100TH_MM);
}
@@ -1070,6 +1072,8 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet* )
pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_HEIGHT );
mfOldHeight = std::max( pItem ? static_cast<double>(static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0.0, 1.0 );
double fTmpHeight((OutputDevice::LogicToLogic(static_cast<sal_Int32>(mfOldHeight), mePoolUnit, MapUnit::Map100thMM)) / fUIScale);
+ if (m_xMtrHeight->get_digits())
+ fTmpHeight *= pow(10.0, m_xMtrHeight->get_digits());
m_xMtrHeight->set_value(static_cast<int>(fTmpHeight), FUNIT_100TH_MM);
}
More information about the Libreoffice-commits
mailing list