Kaydet (Commit) 7725eff8 authored tarafından Caolán McNamara's avatar Caolán McNamara

fix pow by digits

Change-Id: I715b85fa1c1e3f6c391c742f861e3791a505a570
Reviewed-on: https://gerrit.libreoffice.org/55006Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst ee4bbc3e
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment