diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-15 09:02:31 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-15 09:02:31 +0100 |
commit | d9d92d20fdc414c5956290c10c4d473dcb836ceb (patch) | |
tree | 02c6079b0fbbae106e51dd307202ec2415f3340f /svx/source/unodraw | |
parent | a5eddfbf45277eea21dd2271b36e9668313eadf3 (diff) |
More loplugin:cstylecast: svx
Change-Id: If370ad12d2885ea9a6348736a3bcab618bc2e6ec
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r-- | svx/source/unodraw/XPropertyTable.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unopool.cxx | 2 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap2.cxx | 12 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx index 24093e8ba0de..55ca9a09cc90 100644 --- a/svx/source/unodraw/XPropertyTable.cxx +++ b/svx/source/unodraw/XPropertyTable.cxx @@ -384,7 +384,7 @@ uno::Any SvxUnoXDashTable::getAny( const XPropertyEntry* pEntry ) const throw() drawing::LineDash aLineDash; - aLineDash.Style = (css::drawing::DashStyle)((sal_uInt16)rXD.GetDashStyle()); + aLineDash.Style = static_cast<css::drawing::DashStyle>(static_cast<sal_uInt16>(rXD.GetDashStyle())); aLineDash.Dots = rXD.GetDots(); aLineDash.DotLen = rXD.GetDotLen(); aLineDash.Dashes = rXD.GetDashes(); @@ -402,7 +402,7 @@ std::unique_ptr<XPropertyEntry> SvxUnoXDashTable::createEntry(const OUString& rN XDash aXDash; - aXDash.SetDashStyle((css::drawing::DashStyle)((sal_uInt16)(aLineDash.Style))); + aXDash.SetDashStyle(static_cast<css::drawing::DashStyle>(static_cast<sal_uInt16>(aLineDash.Style))); aXDash.SetDots(aLineDash.Dots); aXDash.SetDotLen(aLineDash.DotLen); aXDash.SetDashes(aLineDash.Dashes); diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index a3d0a4cbe479..9261a71bb830 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -171,7 +171,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEn if(!(aValue >>= nMode)) throw lang::IllegalArgumentException(); - eMode = (drawing::BitmapMode)nMode; + eMode = static_cast<drawing::BitmapMode>(nMode); } pPool->SetPoolDefaultItem( XFillBmpStretchItem( eMode == drawing::BitmapMode_STRETCH ) ); diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 35a07a496348..b8500ac7643b 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -670,7 +670,7 @@ namespace {style::ParagraphAdjust_RIGHT, sal_Int16(awt::TextAlign::RIGHT)}, {style::ParagraphAdjust_BLOCK, sal_Int16(awt::TextAlign::RIGHT)}, {style::ParagraphAdjust_STRETCH, sal_Int16(awt::TextAlign::LEFT)}, - {(style::ParagraphAdjust)-1,-1} + {style::ParagraphAdjust(-1),-1} }; void lcl_convertTextAlignmentToParaAdjustment( Any& _rValue ) @@ -681,7 +681,7 @@ namespace for ( auto const & rEntry : aMapAdjustToAlign ) if ( nValue == rEntry.nFormValue ) { - _rValue <<= (sal_uInt16)rEntry.nAPIValue; + _rValue <<= static_cast<sal_uInt16>(rEntry.nAPIValue); return; } } @@ -692,7 +692,7 @@ namespace OSL_VERIFY( _rValue >>= nValue ); for ( auto const & rEntry : aMapAdjustToAlign ) - if ( (style::ParagraphAdjust)nValue == rEntry.nAPIValue ) + if ( static_cast<style::ParagraphAdjust>(nValue) == rEntry.nAPIValue ) { _rValue <<= rEntry.nFormValue; return; @@ -751,7 +751,7 @@ void SAL_CALL SvxShapeControl::setPropertyValue( const OUString& aPropertyName, awt::FontSlant nSlant; if( !(aValue >>= nSlant ) ) throw lang::IllegalArgumentException(); - aConvertedValue <<= (sal_Int16)nSlant; + aConvertedValue <<= static_cast<sal_Int16>(nSlant); } else if ( aFormsName == "Align" ) { @@ -792,7 +792,7 @@ uno::Any SAL_CALL SvxShapeControl::getPropertyValue( const OUString& aPropertyNa sal_Int16 nSlant = sal_Int16(); if ( aValue >>= nSlant ) { - eSlant = (awt::FontSlant)nSlant; + eSlant = static_cast<awt::FontSlant>(nSlant); } else { @@ -883,7 +883,7 @@ uno::Any SAL_CALL SvxShapeControl::getPropertyDefault( const OUString& aProperty { sal_Int16 nSlant( 0 ); aDefault >>= nSlant; - aDefault <<= (awt::FontSlant)nSlant; + aDefault <<= static_cast<awt::FontSlant>(nSlant); } else if ( aFormsName == "Align" ) { diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index c1b9c4cbc52a..14cc1a0f108f 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -2281,7 +2281,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl if(!(rValue >>= nMode)) break; - eMode = (drawing::BitmapMode)nMode; + eMode = static_cast<drawing::BitmapMode>(nMode); } mpObj->SetMergedItem( XFillBmpStretchItem( eMode == drawing::BitmapMode_STRETCH ) ); mpObj->SetMergedItem( XFillBmpTileItem( eMode == drawing::BitmapMode_REPEAT ) ); |