summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-22 13:11:34 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-23 07:54:51 +0100
commit9af8f190ed1bf3f76897ad0c078db16451d6fb69 (patch)
tree015089ee72a67eca7db999845cabb8104c8ce3aa /drawinglayer
parent9602e63c818722c3910343b7af53917d031861c8 (diff)
More loplugin:cstylecast on Windows
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index bfc9140e8d7c..66090ad2e34e 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -417,8 +417,8 @@ namespace drawinglayer
if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
{
- const double fScaleFactor((double)nWidth / (double)nHeight);
- const sal_uInt32 nScaledWidth(basegfx::fround((double)aUnscaledFontMetric.GetAverageFontWidth() * fScaleFactor));
+ const double fScaleFactor(static_cast<double>(nWidth) / static_cast<double>(nHeight));
+ const sal_uInt32 nScaledWidth(basegfx::fround(static_cast<double>(aUnscaledFontMetric.GetAverageFontWidth()) * fScaleFactor));
aRetval.SetAverageFontWidth(nScaledWidth);
}
}
@@ -470,7 +470,7 @@ namespace drawinglayer
if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
{
- const double fScaleFactor((double)rFont.GetFontSize().getWidth() / (double)aUnscaledFontMetric.GetAverageFontWidth());
+ const double fScaleFactor(static_cast<double>(rFont.GetFontSize().getWidth()) / static_cast<double>(aUnscaledFontMetric.GetAverageFontWidth()));
o_rSize.setX(fScaleFactor * o_rSize.getY());
}
}