summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/transfrm.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-05-29 13:53:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-05-29 22:34:13 +0200
commit7725eff80a7bc3f3e422e56e1cd7bfa531f19a70 (patch)
treea588617bd05c77240a035c0bbb63f1646acdd155 /cui/source/tabpages/transfrm.cxx
parentee4bbc3e9d8cca49eea89b99ea8e3836f7a4e224 (diff)
fix pow by digits
Change-Id: I715b85fa1c1e3f6c391c742f861e3791a505a570 Reviewed-on: https://gerrit.libreoffice.org/55006 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/tabpages/transfrm.cxx')
-rw-r--r--cui/source/tabpages/transfrm.cxx4
1 files changed, 4 insertions, 0 deletions
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);
}