[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/source
Caolán McNamara
caolanm at redhat.com
Tue May 29 19:48:05 UTC 2018
cui/source/tabpages/transfrm.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 91ea25d7579ac1830e428fcefbf522c0b4da2a97
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/55013
Tested-by: Jenkins <ci at libreoffice.org>
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 cf3bc446a78e..0f5894d8d550 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -1071,6 +1071,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);
}
@@ -1078,6 +1080,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