connectivity/source/drivers/mork/MorkParser.cxx | 4 +- cui/source/tabpages/tpbitmap.cxx | 2 - cui/source/tabpages/tpgradnt.cxx | 2 - cui/source/tabpages/tphatch.cxx | 2 - cui/source/tabpages/tpline.cxx | 2 - cui/source/tabpages/tplnedef.cxx | 2 - cui/source/tabpages/tppattern.cxx | 2 - cui/source/tabpages/tpshadow.cxx | 4 +- editeng/source/editeng/editview.cxx | 2 - editeng/source/items/frmitems.cxx | 8 ++--- editeng/source/items/writingmodeitem.cxx | 2 - filter/source/msfilter/svdfppt.cxx | 2 - forms/source/component/formcontrolfont.cxx | 2 - framework/source/layoutmanager/toolbarlayoutmanager.cxx | 10 +++---- include/svx/sdrpaintwindow.hxx | 2 - include/tools/bigint.hxx | 2 - include/vcl/field.hxx | 2 - pyuno/source/module/pyuno_runtime.cxx | 2 - sc/source/core/data/dpoutput.cxx | 8 ++--- sc/source/core/data/dpsave.cxx | 2 - sc/source/filter/xml/XMLExportDataPilot.cxx | 2 - sd/source/ui/func/fupage.cxx | 2 - sd/source/ui/view/drviews7.cxx | 2 - slideshow/source/engine/screenupdater.cxx | 2 - svx/source/engine3d/float3d.cxx | 2 - svx/source/engine3d/view3d.cxx | 2 - svx/source/form/dataaccessdescriptor.cxx | 2 - svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 16 +++++------ svx/source/sidebar/line/LinePropertyPanelBase.cxx | 2 - svx/source/svdraw/svdattr.cxx | 6 ++-- svx/source/svdraw/svdobj.cxx | 2 - svx/source/tbxctrls/colrctrl.cxx | 2 - svx/source/tbxctrls/fillctrl.cxx | 22 ++++++++-------- svx/source/tbxctrls/linectrl.cxx | 2 - svx/source/unodraw/XPropertyTable.cxx | 8 ++--- svx/source/xoutdev/xattr.cxx | 22 ++++++++-------- svx/source/xoutdev/xattr2.cxx | 2 - sw/source/core/fields/cellfml.cxx | 4 +- sw/source/core/fields/usrfld.cxx | 2 - sw/source/core/unocore/unosett.cxx | 2 - sw/source/ui/vba/vbaparagraphformat.cxx | 2 - sw/source/uibase/app/docst.cxx | 4 +- sw/source/uibase/docvw/edtwin.cxx | 2 - sw/source/uibase/shells/drwtxtex.cxx | 2 - sw/source/uibase/sidebar/PageMarginControl.cxx | 4 +- sw/source/uibase/uiview/viewtab.cxx | 3 -- sw/source/uibase/utlui/attrdesc.cxx | 2 - unotools/source/i18n/localedatawrapper.cxx | 4 +- vcl/source/control/field2.cxx | 2 - vcl/source/gdi/animate.cxx | 2 - vcl/unx/gtk/salnativewidgets-gtk.cxx | 2 - xmloff/source/draw/ximpshap.cxx | 4 +- 52 files changed, 101 insertions(+), 102 deletions(-)
New commits: commit 28270d93c029091805c3c169294b6ce6ae2067f0 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:38:37 2018 +0100 loplugin:redundantcast: connectivity (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: I43a148a0d192f85bbad95696c7c3c3e717c5b00a diff --git a/connectivity/source/drivers/mork/MorkParser.cxx b/connectivity/source/drivers/mork/MorkParser.cxx index 78f1f417e4c4..62167e1614a2 100644 --- a/connectivity/source/drivers/mork/MorkParser.cxx +++ b/connectivity/source/drivers/mork/MorkParser.cxx @@ -739,7 +739,7 @@ void MorkParser::dump() TableIter != iter->second.map.end(); ++TableIter ) { std::cout << "\t Table:" - << ( ( int ) TableIter->first < 0 ? "-" : " " ) + << ( TableIter->first < 0 ? "-" : " " ) << TableIter->first << std::endl; for (RowScopeMap::Map::const_iterator RowScopeIter = TableIter->second.map.begin(); @@ -752,7 +752,7 @@ void MorkParser::dump() RowIter != RowScopeIter->second.map.end(); ++RowIter ) { std::cout << "\t\t\t Row Id:" - << ((int) RowIter->first < 0 ? "-" : " ") + << (RowIter->first < 0 ? "-" : " ") << RowIter->first << std::endl; std::cout << "\t\t\t\t Cells:" << std::endl; commit e84c8b27dd1460ad6abec406037f06a3b00a97ac Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:38:25 2018 +0100 loplugin:redundantcast: cui (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: I3742417cde8a35653b336cc2801dc43a06cfb45e diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 00897f4848b9..b74041e211c0 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -505,7 +505,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapHdl, ValueSet*, void) if(SfxItemState::SET == m_rOutAttrs.GetItemState(GetWhich(XATTR_FILLSTYLE), true, &pPoolItem)) { - const drawing::FillStyle eXFS((drawing::FillStyle)static_cast<const XFillStyleItem*>(pPoolItem)->GetValue()); + const drawing::FillStyle eXFS(static_cast<const XFillStyleItem*>(pPoolItem)->GetValue()); if((drawing::FillStyle_BITMAP == eXFS) && (SfxItemState::SET == m_rOutAttrs.GetItemState(GetWhich(XATTR_FILLBITMAP), true, &pPoolItem))) { diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 86cb408c1a01..b7274fd379f9 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -558,7 +558,7 @@ void SvxGradientTabPage::ChangeGradientHdl_Impl() const SfxPoolItem* pPoolItem = nullptr; if( SfxItemState::SET == m_rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), true, &pPoolItem ) ) { - if( ( drawing::FillStyle_GRADIENT == (drawing::FillStyle) static_cast<const XFillStyleItem*>( pPoolItem )->GetValue() ) && + if( ( drawing::FillStyle_GRADIENT == static_cast<const XFillStyleItem*>( pPoolItem )->GetValue() ) && ( SfxItemState::SET == m_rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), true, &pPoolItem ) ) ) { pGradient.reset(new XGradient( static_cast<const XFillGradientItem*>( pPoolItem )->GetGradientValue() )); diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index c3e5097fc916..d03df82bfe65 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -389,7 +389,7 @@ void SvxHatchTabPage::ChangeHatchHdl_Impl() const SfxPoolItem* pPoolItem = nullptr; if( SfxItemState::SET == m_rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), true, &pPoolItem ) ) { - if( ( drawing::FillStyle_HATCH == (drawing::FillStyle) static_cast<const XFillStyleItem*>( pPoolItem )->GetValue() ) && + if( ( drawing::FillStyle_HATCH == static_cast<const XFillStyleItem*>( pPoolItem )->GetValue() ) && ( SfxItemState::SET == m_rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), true, &pPoolItem ) ) ) { pHatch.reset(new XHatch( static_cast<const XFillHatchItem*>( pPoolItem )->GetHatchValue() )); diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index c2da4dcca633..3a0b2fb45df9 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -1209,7 +1209,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) if( rAttrs->GetItemState( XATTR_LINESTYLE ) != SfxItemState::DONTCARE ) { - eXLS = (drawing::LineStyle) rAttrs->Get( XATTR_LINESTYLE ).GetValue(); + eXLS = rAttrs->Get( XATTR_LINESTYLE ).GetValue(); switch( eXLS ) { diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index dd2936a3acae..330ee686e6ed 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -299,7 +299,7 @@ void SvxLineDefTabPage::Reset( const SfxItemSet* rAttrs ) { if( rAttrs->GetItemState( GetWhich( XATTR_LINESTYLE ) ) != SfxItemState::DONTCARE ) { - drawing::LineStyle eXLS = (drawing::LineStyle) static_cast<const XLineStyleItem&>( rAttrs->Get( GetWhich( XATTR_LINESTYLE ) ) ).GetValue(); + drawing::LineStyle eXLS = static_cast<const XLineStyleItem&>( rAttrs->Get( GetWhich( XATTR_LINESTYLE ) ) ).GetValue(); switch( eXLS ) { diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx index c974cc605c97..e28f5e304076 100644 --- a/cui/source/tabpages/tppattern.cxx +++ b/cui/source/tabpages/tppattern.cxx @@ -276,7 +276,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, ValueSet*, void) if(SfxItemState::SET == m_rOutAttrs.GetItemState(GetWhich(XATTR_FILLSTYLE), true, &pPoolItem)) { - const drawing::FillStyle eXFS((drawing::FillStyle)static_cast<const XFillStyleItem*>(pPoolItem)->GetValue()); + const drawing::FillStyle eXFS(static_cast<const XFillStyleItem*>(pPoolItem)->GetValue()); if((drawing::FillStyle_BITMAP == eXFS) && (SfxItemState::SET == m_rOutAttrs.GetItemState(GetWhich(XATTR_FILLBITMAP), true, &pPoolItem))) { diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 70a9c5b95208..ded82ed5134b 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -92,8 +92,8 @@ SvxShadowTabPage::SvxShadowTabPage( vcl::Window* pParent, const SfxItemSet& rInA drawing::FillStyle eXFS = drawing::FillStyle_SOLID; if( m_rOutAttrs.GetItemState( XATTR_FILLSTYLE ) != SfxItemState::DONTCARE ) { - eXFS = (drawing::FillStyle) ( static_cast<const XFillStyleItem&>( m_rOutAttrs. - Get( GetWhich( XATTR_FILLSTYLE ) ) ).GetValue() ); + eXFS = static_cast<const XFillStyleItem&>( m_rOutAttrs. + Get( GetWhich( XATTR_FILLSTYLE ) ) ).GetValue(); switch( eXFS ) { case drawing::FillStyle_SOLID: commit df5dbfbc6424dc23dc50547473d3767b5d5340f8 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:38:14 2018 +0100 loplugin:redundantcast: editeng (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: I44210b93101c128a7f931816e4d2c71335117df3 diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index a7000ce5e5a9..7b1b123ddcf4 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -1375,7 +1375,7 @@ bool EditView::ChangeFontSize( bool bGrow, SfxItemSet& rSet, const FontList* pFo if( (nHeight >= 2) && (nHeight <= 9999 ) ) { - nHeight = OutputDevice::LogicToLogic( nHeight, MapUnit::MapPoint, (MapUnit)eUnit ) / 10; + nHeight = OutputDevice::LogicToLogic( nHeight, MapUnit::MapPoint, eUnit ) / 10; if( nHeight != (long)aFontHeightItem.GetHeight() ) { diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 3237029caa93..cb46bec99858 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -573,7 +573,7 @@ bool SvxLRSpaceItem::GetPresentation Application::GetSettings().GetUILanguageTag()); } else - rText = GetMetricText( (long)nLeftMargin, + rText = GetMetricText( nLeftMargin, eCoreUnit, ePresUnit, &rIntl ); rText += OUString(cpDelim); if ( 100 != nPropFirstLineOfst ) @@ -591,7 +591,7 @@ bool SvxLRSpaceItem::GetPresentation Application::GetSettings().GetUILanguageTag()); } else - rText += GetMetricText( (long)nRightMargin, + rText += GetMetricText( nRightMargin, eCoreUnit, ePresUnit, &rIntl ); return true; } @@ -604,7 +604,7 @@ bool SvxLRSpaceItem::GetPresentation else { rText = rText + - GetMetricText( (long)nLeftMargin, eCoreUnit, ePresUnit, &rIntl ) + + GetMetricText( nLeftMargin, eCoreUnit, ePresUnit, &rIntl ) + " " + EditResId(GetMetricId(ePresUnit)); } rText += OUString(cpDelim); @@ -630,7 +630,7 @@ bool SvxLRSpaceItem::GetPresentation else { rText = rText + - GetMetricText( (long)nRightMargin, + GetMetricText( nRightMargin, eCoreUnit, ePresUnit, &rIntl ) + " " + EditResId(GetMetricId(ePresUnit)); } diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx index 749eac131e05..00410af6ed71 100644 --- a/editeng/source/items/writingmodeitem.cxx +++ b/editeng/source/items/writingmodeitem.cxx @@ -101,7 +101,7 @@ bool SvxWritingModeItem::PutValue( const css::uno::Any& rVal, sal_uInt8 ) bool SvxWritingModeItem::QueryValue( css::uno::Any& rVal, sal_uInt8 ) const { - rVal <<= (WritingMode)GetValue(); + rVal <<= GetValue(); return true; } commit d93f6b0a531a3586da85a79fbced26a18010958b Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:38:03 2018 +0100 loplugin:redundantcast: filter (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: I3ee7efc614502332b28a8ca7f33f835b523143ee diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index ad52f219c4c3..d8e2cd1ea322 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -7431,7 +7431,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel XGradient aXGradient(pObj->GetMergedItem(XATTR_FILLGRADIENT).GetGradientValue()); css::awt::Gradient aGradient; - aGradient.Style = (awt::GradientStyle) aXGradient.GetGradientStyle(); + aGradient.Style = aXGradient.GetGradientStyle(); aGradient.StartColor = (sal_Int32)aXGradient.GetStartColor().GetColor(); aGradient.EndColor = (sal_Int32)aXGradient.GetEndColor().GetColor(); aGradient.Angle = (short)aXGradient.GetAngle(); commit c45f9bc43d00a8957462807aee41c878fe48036f Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:37:53 2018 +0100 loplugin:redundantcast: forms (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: Ife5e10c33c8e6abefd303445b8820c0d6f2d3307 diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx index 3742c7a1a959..e65d6b0592f6 100644 --- a/forms/source/component/formcontrolfont.cxx +++ b/forms/source/component/formcontrolfont.cxx @@ -92,7 +92,7 @@ namespace frm break; case PROPERTY_ID_FONT_WEIGHT: - aValue <<= (float)_rFont.Weight; + aValue <<= _rFont.Weight; break; case PROPERTY_ID_FONT_SLANT: commit 70a2cfc091f9cc9c4421640bf7c925d1e7336485 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:37:42 2018 +0100 loplugin:redundantcast: framework (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: I726159d62e748678f8d739db2d3f97c80a5181c3 diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 2ed63c36af8f..e47ed65c040b 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -855,7 +855,7 @@ bool ToolbarLayoutManager::dockToolbar( const OUString& rResourceURL, ui::Dockin ::Point aPixelPos; awt::Point aDockPos; - implts_findNextDockingPos((ui::DockingArea)aUIElement.m_aDockedData.m_nDockedArea, aSize, aDockPos, aPixelPos ); + implts_findNextDockingPos(aUIElement.m_aDockedData.m_nDockedArea, aSize, aDockPos, aPixelPos ); aUIElement.m_aDockedData.m_aPos = aDockPos; } } @@ -1510,7 +1510,7 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno if ( isDefaultPos( rElement.m_aDockedData.m_aPos )) { - implts_findNextDockingPos( (ui::DockingArea)rElement.m_aDockedData.m_nDockedArea, aSize, aDockPos, aPixelPos ); + implts_findNextDockingPos( rElement.m_aDockedData.m_nDockedArea, aSize, aDockPos, aPixelPos ); rElement.m_aDockedData.m_aPos = aDockPos; } } @@ -2616,7 +2616,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( uno::Reference< awt::XWindow > xWindow( rUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); uno::Reference< awt::XWindow > xDockingAreaWindow; ::tools::Rectangle aTrackingRect( rTrackingRect ); - ui::DockingArea eDockedArea( (ui::DockingArea)rUIElement.m_aDockedData.m_nDockedArea ); + ui::DockingArea eDockedArea( rUIElement.m_aDockedData.m_nDockedArea ); sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); bool bHorizontalDockArea(( eDockedArea == ui::DockingArea_DOCKINGAREA_TOP ) || @@ -3507,7 +3507,7 @@ void SAL_CALL ToolbarLayoutManager::endDocking( const awt::EndDockingEvent& e ) if ( m_eDockOperation != DOCKOP_ON_COLROW ) { // we have to renumber our row/column data to insert a new row/column - implts_renumberRowColumnData((ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, aUIDockingElement ); + implts_renumberRowColumnData(aUIDockingElement.m_aDockedData.m_nDockedArea, aUIDockingElement ); } } @@ -3691,7 +3691,7 @@ void SAL_CALL ToolbarLayoutManager::toggleFloatingMode( const lang::EventObject& aSize = pWindow->GetSizePixel(); } - implts_findNextDockingPos((ui::DockingArea)aUIDockingElement.m_aDockedData.m_nDockedArea, aSize, aDockPos, aPixelPos ); + implts_findNextDockingPos(aUIDockingElement.m_aDockedData.m_nDockedArea, aSize, aDockPos, aPixelPos ); aUIDockingElement.m_aDockedData.m_aPos = aDockPos; } commit 96d6ccb2e29b8f88101ebbc6ea2217fc8d06e022 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:37:29 2018 +0100 loplugin:redundantcast: pyuno (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: If46940b66accb95d82ce9f129b274940086d906e diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 947747efb104..ad1f1985a635 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -434,7 +434,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const OString o = OUStringToOString( t.getTypeName(), RTL_TEXTENCODING_ASCII_US ); return PyRef( PyUNO_Type_new ( - o.getStr(), (css::uno::TypeClass)t.getTypeClass(), *this), + o.getStr(), t.getTypeClass(), *this), SAL_NO_ACQUIRE); } case css::uno::TypeClass_ANY: commit 4009d28ec3ab11c65185ba27a60990bcd9153461 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:37:19 2018 +0100 loplugin:redundantcast: sc (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: Ia9e3cf3d5483d1d77227db67dbfa304fa6060398 diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 464c77d89166..ae9f5a6e0314 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -359,7 +359,7 @@ void lcl_FillNumberFormats( std::unique_ptr<sal_uInt32[]>& rFormats, long& rCoun if ( xDimProp.is() && xDimName.is() ) { sheet::DataPilotFieldOrientation eDimOrient = - (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty( + ScUnoHelpFunctions::GetEnumProperty( xDimProp, SC_UNO_DP_ORIENTATION, sheet::DataPilotFieldOrientation_HIDDEN ); if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA ) @@ -422,7 +422,7 @@ sal_uInt32 lcl_GetFirstNumberFormat( const uno::Reference<container::XIndexAcces if ( xDimProp.is() ) { sheet::DataPilotFieldOrientation eDimOrient = - (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty( + ScUnoHelpFunctions::GetEnumProperty( xDimProp, SC_UNO_DP_ORIENTATION, sheet::DataPilotFieldOrientation_HIDDEN ); if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA ) @@ -543,7 +543,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS if ( xDimProp.is() && xDimSupp.is() ) { sheet::DataPilotFieldOrientation eDimOrient = - (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty( + ScUnoHelpFunctions::GetEnumProperty( xDimProp, SC_UNO_DP_ORIENTATION, sheet::DataPilotFieldOrientation_HIDDEN ); long nDimPos = ScUnoHelpFunctions::GetLongProperty( xDimProp, @@ -1254,7 +1254,7 @@ void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, s if ( xDimProp.is() ) { sheet::DataPilotFieldOrientation eDimOrient = - (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty( + ScUnoHelpFunctions::GetEnumProperty( xDimProp, SC_UNO_DP_ORIENTATION, sheet::DataPilotFieldOrientation_HIDDEN ); if ( ScUnoHelpFunctions::GetBoolProperty( xDimProp, diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index 7e34c64cc3d5..cfb9b6dbbada 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -530,7 +530,7 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD { // exceptions are caught at ScDPSaveData::WriteToSource - sheet::DataPilotFieldOrientation eOrient = (sheet::DataPilotFieldOrientation)nOrientation; + sheet::DataPilotFieldOrientation eOrient = nOrientation; xDimProp->setPropertyValue( SC_UNO_DP_ORIENTATION, uno::Any(eOrient) ); sal_Int16 eFunc = static_cast<sal_Int16>(nFunction); diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx index fc8e2d537dc3..4b8bf5213fc6 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.cxx +++ b/sc/source/filter/xml/XMLExportDataPilot.cxx @@ -685,7 +685,7 @@ void ScXMLExportDataPilot::WriteDimension(const ScDPSaveDimension* pDim, const S if (pDim->IsDataLayout()) rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_IS_DATA_LAYOUT_FIELD, XML_TRUE); OUString sValueStr; - sheet::DataPilotFieldOrientation eOrientation = (sheet::DataPilotFieldOrientation) pDim->GetOrientation(); + sheet::DataPilotFieldOrientation eOrientation = pDim->GetOrientation(); ScXMLConverter::GetStringFromOrientation( sValueStr, eOrientation); if( !sValueStr.isEmpty() ) commit 6bb80bf6e64c436820421ca415755cbe9cd6178c Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:37:09 2018 +0100 loplugin:redundantcast: sd (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: I1dc10a2acaf134a3cff142a4ec4afc906b88c260 diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 30a3f95b153e..462146c6196e 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -293,7 +293,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window const * pParent ) if (nId == SID_SAVE_BACKGROUND) { const XFillStyleItem& rStyleItem = aMergedAttr.Get(XATTR_FILLSTYLE); - if (drawing::FillStyle_BITMAP == (drawing::FillStyle)rStyleItem.GetValue()) + if (drawing::FillStyle_BITMAP == rStyleItem.GetValue()) { const XFillBitmapItem& rBitmap = aMergedAttr.Get(XATTR_FILLBITMAP); const GraphicObject& rGraphicObj = rBitmap.GetGraphicObject(); diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index f7cdadca4563..2abf0aae8aa3 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1696,7 +1696,7 @@ void DrawViewShell::GetPageProperties( SfxItemSet &rSet ) rSet.Put(aPageItem); const SfxItemSet &rPageAttr = pPage->getSdrPageProperties().GetItemSet(); - drawing::FillStyle eXFS = (drawing::FillStyle) rPageAttr.GetItem( XATTR_FILLSTYLE )->GetValue(); + drawing::FillStyle eXFS = rPageAttr.GetItem( XATTR_FILLSTYLE )->GetValue(); XFillStyleItem aFillStyleItem( eXFS ); aFillStyleItem.SetWhich( SID_ATTR_PAGE_FILLSTYLE ); rSet.Put(aFillStyleItem); commit c00cb49614233c6177c5daa7e271be0dc9b573b3 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:37:00 2018 +0100 loplugin:redundantcast: slideshow (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: I6a9f02665b8680f2fc51bff0b5a5ee60a77e780e diff --git a/slideshow/source/engine/screenupdater.cxx b/slideshow/source/engine/screenupdater.cxx index 7a950e031cd5..cc609fecf97d 100644 --- a/slideshow/source/engine/screenupdater.cxx +++ b/slideshow/source/engine/screenupdater.cxx @@ -129,7 +129,7 @@ namespace internal if( bViewUpdatesNeeded ) { mpImpl->maUpdaters.applyAll( - std::mem_fn((bool (ViewUpdate::*)())&ViewUpdate::update) ); + std::mem_fn(&ViewUpdate::update) ); } if( bViewUpdatesNeeded || commit 4c799fa83a5a51f27301110ae165855ffbc7a596 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:36:44 2018 +0100 loplugin:redundantcast: svx (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: Icd1f084d4ffab286fd3c7c02693444eaf7799354 diff --git a/include/svx/sdrpaintwindow.hxx b/include/svx/sdrpaintwindow.hxx index 691837b2a5d5..f36f5c8089a4 100644 --- a/include/svx/sdrpaintwindow.hxx +++ b/include/svx/sdrpaintwindow.hxx @@ -130,7 +130,7 @@ public: void SetRedrawRegion(const vcl::Region& rNew); // #i72889# read/write access to TemporaryTarget - bool getTemporaryTarget() const { return (bool)mbTemporaryTarget; } + bool getTemporaryTarget() const { return mbTemporaryTarget; } void setTemporaryTarget(bool bNew) { mbTemporaryTarget = bNew; } // #i72889# get target output device, take into account output buffering diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index e8e025c7493c..7d1664cc7b8e 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -567,7 +567,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) eState = rAttrs.GetItemState(XATTR_FILLSTYLE); if(eState != SfxItemState::DONTCARE) { - drawing::FillStyle eXFS = (drawing::FillStyle)rAttrs.Get(XATTR_FILLSTYLE).GetValue(); + drawing::FillStyle eXFS = rAttrs.Get(XATTR_FILLSTYLE).GetValue(); bBitmap = (eXFS == drawing::FillStyle_BITMAP || eXFS == drawing::FillStyle_GRADIENT || eXFS == drawing::FillStyle_HATCH); } diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index 797588a097fe..f880ad4b854b 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -676,7 +676,7 @@ void E3dView::ImpChangeSomeAttributesFor3DConversion2(SdrObject* pObj) { const SfxItemSet& rSet = pObj->GetMergedItemSet(); sal_Int32 nLineWidth = rSet.Get(XATTR_LINEWIDTH).GetValue(); - drawing::LineStyle eLineStyle = (drawing::LineStyle)rSet.Get(XATTR_LINESTYLE).GetValue(); + drawing::LineStyle eLineStyle = rSet.Get(XATTR_LINESTYLE).GetValue(); drawing::FillStyle eFillStyle = rSet.Get(XATTR_FILLSTYLE).GetValue(); if(static_cast<SdrPathObj*>(pObj)->IsClosed() diff --git a/svx/source/form/dataaccessdescriptor.cxx b/svx/source/form/dataaccessdescriptor.cxx index 974c40334b9a..d3b94afe6f04 100644 --- a/svx/source/form/dataaccessdescriptor.cxx +++ b/svx/source/form/dataaccessdescriptor.cxx @@ -110,7 +110,7 @@ namespace svx MapString2PropertyEntry::const_iterator aPropPos = rProperties.find( pValues->Name ); if ( aPropPos != rProperties.end() ) { - DataAccessDescriptorProperty eProperty = (DataAccessDescriptorProperty)aPropPos->second->mnHandle; + DataAccessDescriptorProperty eProperty = aPropPos->second->mnHandle; m_aValues[eProperty] = pValues->Value; } else diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index 6238a607f2f7..9e74d3315f07 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -812,7 +812,7 @@ void AreaPropertyPanelBase::updateFillStyle(bool bDisabled, bool bDefaultOrSet, mpStyleItem.reset(dynamic_cast< XFillStyleItem* >(pItem->Clone())); mpLbFillType->Enable(); mpColorTextFT->Enable(); - drawing::FillStyle eXFS = (drawing::FillStyle)mpStyleItem->GetValue(); + drawing::FillStyle eXFS = mpStyleItem->GetValue(); eFillStyle nPos = NONE; switch(eXFS) { @@ -870,7 +870,7 @@ void AreaPropertyPanelBase::updateFillGradient(bool bDisabled, bool bDefaultOrSe mpFillGradientItem.reset(pItem ? static_cast<XFillGradientItem*>(pItem->Clone()) : nullptr); } - if(mpStyleItem && drawing::FillStyle_GRADIENT == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_GRADIENT == mpStyleItem->GetValue()) { mpLbFillAttr->Hide(); mpLbFillGradFrom->Show(); @@ -909,7 +909,7 @@ void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool bDefaultOrSet, mpHatchItem.reset(pItem ? static_cast<XFillHatchItem*>(pItem->Clone()) : nullptr); } - if(mpStyleItem && drawing::FillStyle_HATCH == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_HATCH == mpStyleItem->GetValue()) { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -940,7 +940,7 @@ void AreaPropertyPanelBase::updateFillColor(bool bDefaultOrSet, const SfxPoolIte mpColorItem.reset(pItem ? static_cast<XFillColorItem*>(pItem->Clone()) : nullptr); } - if(mpStyleItem && drawing::FillStyle_SOLID == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_SOLID == mpStyleItem->GetValue()) { mpLbFillAttr->Hide(); mpToolBoxColor->Show(); @@ -957,7 +957,7 @@ void AreaPropertyPanelBase::updateFillBitmap(bool bDisabled, bool bDefaultOrSet, mpBitmapItem.reset(pItem ? static_cast<XFillBitmapItem*>(pItem->Clone()) : nullptr); } - if(mpStyleItem && drawing::FillStyle_BITMAP == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_BITMAP == mpStyleItem->GetValue()) { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -1019,7 +1019,7 @@ void AreaPropertyPanelBase::NotifyItemUpdate( { if(bDefault) { - if(mpStyleItem && drawing::FillStyle_GRADIENT == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_GRADIENT == mpStyleItem->GetValue()) { if(mpFillGradientItem) { @@ -1044,7 +1044,7 @@ void AreaPropertyPanelBase::NotifyItemUpdate( { if(bDefault) { - if(mpStyleItem && drawing::FillStyle_HATCH == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_HATCH == mpStyleItem->GetValue()) { if(mpHatchItem) { @@ -1070,7 +1070,7 @@ void AreaPropertyPanelBase::NotifyItemUpdate( { if(bDefault) { - if(mpStyleItem && drawing::FillStyle_BITMAP == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_BITMAP == mpStyleItem->GetValue()) { if(mpBitmapItem) { diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index 43a1867ae3cf..6e98dcc87885 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -795,7 +795,7 @@ void LinePropertyPanelBase::SelectLineStyle() return; } - const drawing::LineStyle eXLS(mpStyleItem ? (drawing::LineStyle)mpStyleItem->GetValue() : drawing::LineStyle_NONE); + const drawing::LineStyle eXLS(mpStyleItem ? mpStyleItem->GetValue() : drawing::LineStyle_NONE); bool bSelected(false); switch(eXLS) diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index e7447041e23b..af28e4d9cafb 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -969,7 +969,7 @@ void SdrTextFitToSizeTypeItem::SetBoolValue(bool bVal) bool SdrTextFitToSizeTypeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { - drawing::TextFitToSizeType eFS = (drawing::TextFitToSizeType)GetValue(); + drawing::TextFitToSizeType eFS = GetValue(); rVal <<= eFS; return true; @@ -1530,7 +1530,7 @@ bool SdrMeasureTextHPosItem::GetPresentation(SfxItemPresentation ePres, bool SdrMeasureTextHPosItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { - rVal <<= (drawing::MeasureTextHorzPos)GetValue(); + rVal <<= GetValue(); return true; } @@ -1575,7 +1575,7 @@ bool SdrMeasureTextVPosItem::GetPresentation(SfxItemPresentation ePres, bool SdrMeasureTextVPosItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { - rVal <<= (drawing::MeasureTextVertPos)GetValue(); + rVal <<= GetValue(); return true; } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index b0587cfe4e97..a582eda43e54 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -927,7 +927,7 @@ void SdrObject::SingleObjectPainter(OutputDevice& rOut) const bool SdrObject::LineGeometryUsageIsNecessary() const { - drawing::LineStyle eXLS = (drawing::LineStyle)GetMergedItem(XATTR_LINESTYLE).GetValue(); + drawing::LineStyle eXLS = GetMergedItem(XATTR_LINESTYLE).GetValue(); return (eXLS != drawing::LineStyle_NONE); } diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 6571d3086eb3..032af70d3a6e 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -408,7 +408,7 @@ IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl, ValueSet*, void) pView->GetAttributes( aAttrSet ); if ( aAttrSet.GetItemState( XATTR_LINESTYLE ) != SfxItemState::DONTCARE ) { - drawing::LineStyle eXLS = (drawing::LineStyle) + drawing::LineStyle eXLS = aAttrSet.Get( XATTR_LINESTYLE ).GetValue(); if ( eXLS == drawing::LineStyle_NONE ) { diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index 661ce1700f76..3274fe577afb 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -114,7 +114,7 @@ void SvxFillToolBoxControl::StateChanged( { mpStyleItem.reset(dynamic_cast< XFillStyleItem* >(pItem->Clone())); mpLbFillType->Enable(); - drawing::FillStyle eXFS = (drawing::FillStyle)mpStyleItem->GetValue(); + drawing::FillStyle eXFS = mpStyleItem->GetValue(); meLastXFS = eXFS; mpLbFillType->SelectEntryPos(sal::static_int_cast< sal_Int32 >(eXFS)); @@ -145,7 +145,7 @@ void SvxFillToolBoxControl::StateChanged( mpColorItem.reset(pState ? static_cast<XFillColorItem*>(pState->Clone()) : nullptr); } - if(mpStyleItem && drawing::FillStyle_SOLID == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_SOLID == mpStyleItem->GetValue()) { mpLbFillAttr->Hide(); mpToolBoxColor->Show(); @@ -161,7 +161,7 @@ void SvxFillToolBoxControl::StateChanged( mpFillGradientItem.reset(pState ? static_cast<XFillGradientItem*>(pState->Clone()) : nullptr); } - if(mpStyleItem && drawing::FillStyle_GRADIENT == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_GRADIENT == mpStyleItem->GetValue()) { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -190,7 +190,7 @@ void SvxFillToolBoxControl::StateChanged( mpHatchItem.reset(pState ? static_cast<XFillHatchItem*>(pState->Clone()) : nullptr); } - if(mpStyleItem && drawing::FillStyle_HATCH == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_HATCH == mpStyleItem->GetValue()) { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -219,7 +219,7 @@ void SvxFillToolBoxControl::StateChanged( mpBitmapItem.reset(pState ? static_cast<XFillBitmapItem*>(pState->Clone()) : nullptr); } - if(mpStyleItem && drawing::FillStyle_BITMAP == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_BITMAP == mpStyleItem->GetValue()) { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -245,7 +245,7 @@ void SvxFillToolBoxControl::StateChanged( { if(SfxItemState::DEFAULT == eState) { - if(mpStyleItem && drawing::FillStyle_GRADIENT == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_GRADIENT == mpStyleItem->GetValue()) { if(mpFillGradientItem) { @@ -270,7 +270,7 @@ void SvxFillToolBoxControl::StateChanged( { if(SfxItemState::DEFAULT == eState) { - if(mpStyleItem && drawing::FillStyle_HATCH == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_HATCH == mpStyleItem->GetValue()) { if(mpHatchItem) { @@ -295,7 +295,7 @@ void SvxFillToolBoxControl::StateChanged( { if(SfxItemState::DEFAULT == eState) { - if(mpStyleItem && drawing::FillStyle_BITMAP == (drawing::FillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_BITMAP == mpStyleItem->GetValue()) { if(mpBitmapItem) { @@ -323,7 +323,7 @@ void SvxFillToolBoxControl::Update() { if(mpStyleItem) { - const drawing::FillStyle eXFS = (drawing::FillStyle)mpStyleItem->GetValue(); + const drawing::FillStyle eXFS = mpStyleItem->GetValue(); SfxObjectShell* pSh = SfxObjectShell::Current(); switch( eXFS ) @@ -572,7 +572,7 @@ IMPL_LINK_NOARG(SvxFillToolBoxControl, SelectFillTypeHdl, ListBox&, void) { const drawing::FillStyle eXFS = (drawing::FillStyle)mpLbFillType->GetSelectedEntryPos(); - if((drawing::FillStyle)meLastXFS != eXFS) + if(meLastXFS != eXFS) { mpLbFillAttr->Clear(); SfxObjectShell* pSh = SfxObjectShell::Current(); @@ -751,7 +751,7 @@ IMPL_LINK_NOARG(SvxFillToolBoxControl, SelectFillAttrHdl, ListBox&, void) // #i122676# dependent from bFillStyleChange, do execute a single or two // changes in one Execute call - const bool bFillStyleChange((drawing::FillStyle) meLastXFS != eXFS); + const bool bFillStyleChange(meLastXFS != eXFS); switch(eXFS) { diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index 54d30c89687c..1e1734ae331f 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -134,7 +134,7 @@ void SvxLineStyleToolBoxControl::Update( const SfxPoolItem* pState ) drawing::LineStyle eXLS; if ( pStyleItem ) - eXLS = ( drawing::LineStyle )pStyleItem->GetValue(); + eXLS = pStyleItem->GetValue(); else eXLS = drawing::LineStyle_NONE; diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx index c3361936613c..ce2134dbf3d0 100644 --- a/svx/source/unodraw/XPropertyTable.cxx +++ b/svx/source/unodraw/XPropertyTable.cxx @@ -461,7 +461,7 @@ uno::Any SvxUnoXHatchTable::getAny( const XPropertyEntry* pEntry ) const throw() drawing::Hatch aUnoHatch; - aUnoHatch.Style = (drawing::HatchStyle)aHatch.GetHatchStyle(); + aUnoHatch.Style = aHatch.GetHatchStyle(); aUnoHatch.Color = aHatch.GetColor().GetColor(); aUnoHatch.Distance = aHatch.GetDistance(); aUnoHatch.Angle = aHatch.GetAngle(); @@ -476,7 +476,7 @@ std::unique_ptr<XPropertyEntry> SvxUnoXHatchTable::createEntry(const OUString& r return std::unique_ptr<XHatchEntry>(); XHatch aXHatch; - aXHatch.SetHatchStyle( (css::drawing::HatchStyle)aUnoHatch.Style ); + aXHatch.SetHatchStyle( aUnoHatch.Style ); aXHatch.SetColor( aUnoHatch.Color ); aXHatch.SetDistance( aUnoHatch.Distance ); aXHatch.SetAngle( aUnoHatch.Angle ); @@ -532,7 +532,7 @@ uno::Any SvxUnoXGradientTable::getAny( const XPropertyEntry* pEntry ) const thro const XGradient& aXGradient = static_cast<const XGradientEntry*>(pEntry)->GetGradient(); awt::Gradient aGradient; - aGradient.Style = (awt::GradientStyle) aXGradient.GetGradientStyle(); + aGradient.Style = aXGradient.GetGradientStyle(); aGradient.StartColor = (sal_Int32)aXGradient.GetStartColor().GetColor(); aGradient.EndColor = (sal_Int32)aXGradient.GetEndColor().GetColor(); aGradient.Angle = (short)aXGradient.GetAngle(); @@ -554,7 +554,7 @@ std::unique_ptr<XPropertyEntry> SvxUnoXGradientTable::createEntry(const OUString XGradient aXGradient; - aXGradient.SetGradientStyle( (css::awt::GradientStyle) aGradient.Style ); + aXGradient.SetGradientStyle( aGradient.Style ); aXGradient.SetStartColor( aGradient.StartColor ); aXGradient.SetEndColor( aGradient.EndColor ); aXGradient.SetAngle( aGradient.Angle ); diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index f4f185de8ec3..024f41d93d2f 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -352,7 +352,7 @@ bool XLineStyleItem::GetPresentation bool XLineStyleItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { - css::drawing::LineStyle eLS = (css::drawing::LineStyle)GetValue(); + css::drawing::LineStyle eLS = GetValue(); rVal <<= eLS; return true; } @@ -1798,7 +1798,7 @@ sal_uInt16 XFillStyleItem::GetValueCount() const bool XFillStyleItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { - css::drawing::FillStyle eFS = (css::drawing::FillStyle)GetValue(); + css::drawing::FillStyle eFS = GetValue(); rVal <<= eFS; @@ -2045,7 +2045,7 @@ bool XFillGradientItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) c css::awt::Gradient aGradient2; const XGradient& aXGradient = GetGradientValue(); - aGradient2.Style = (css::awt::GradientStyle) aXGradient.GetGradientStyle(); + aGradient2.Style = aXGradient.GetGradientStyle(); aGradient2.StartColor = (sal_Int32)aXGradient.GetStartColor().GetColor(); aGradient2.EndColor = (sal_Int32)aXGradient.GetEndColor().GetColor(); aGradient2.Angle = (short)aXGradient.GetAngle(); @@ -2069,7 +2069,7 @@ bool XFillGradientItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) c const XGradient& aXGradient = GetGradientValue(); css::awt::Gradient aGradient2; - aGradient2.Style = (css::awt::GradientStyle) aXGradient.GetGradientStyle(); + aGradient2.Style = aXGradient.GetGradientStyle(); aGradient2.StartColor = (sal_Int32)aXGradient.GetStartColor().GetColor(); aGradient2.EndColor = (sal_Int32)aXGradient.GetEndColor().GetColor(); aGradient2.Angle = (short)aXGradient.GetAngle(); @@ -2138,7 +2138,7 @@ bool XFillGradientItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId { XGradient aXGradient; - aXGradient.SetGradientStyle( (css::awt::GradientStyle) aGradient2.Style ); + aXGradient.SetGradientStyle( aGradient2.Style ); aXGradient.SetStartColor( aGradient2.StartColor ); aXGradient.SetEndColor( aGradient2.EndColor ); aXGradient.SetAngle( aGradient2.Angle ); @@ -2175,7 +2175,7 @@ bool XFillGradientItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId XGradient aXGradient; - aXGradient.SetGradientStyle( (css::awt::GradientStyle) aGradient2.Style ); + aXGradient.SetGradientStyle( aGradient2.Style ); aXGradient.SetStartColor( aGradient2.StartColor ); aXGradient.SetEndColor( aGradient2.EndColor ); aXGradient.SetAngle( aGradient2.Angle ); @@ -2462,7 +2462,7 @@ bool XFillHatchItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) cons css::drawing::Hatch aUnoHatch; - aUnoHatch.Style = (css::drawing::HatchStyle)aHatch.GetHatchStyle(); + aUnoHatch.Style = aHatch.GetHatchStyle(); aUnoHatch.Color = aHatch.GetColor().GetColor(); aUnoHatch.Distance = aHatch.GetDistance(); aUnoHatch.Angle = aHatch.GetAngle(); @@ -2479,7 +2479,7 @@ bool XFillHatchItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) cons { css::drawing::Hatch aUnoHatch; - aUnoHatch.Style = (css::drawing::HatchStyle)aHatch.GetHatchStyle(); + aUnoHatch.Style = aHatch.GetHatchStyle(); aUnoHatch.Color = aHatch.GetColor().GetColor(); aUnoHatch.Distance = aHatch.GetDistance(); aUnoHatch.Angle = aHatch.GetAngle(); @@ -2494,7 +2494,7 @@ bool XFillHatchItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) cons } case MID_HATCH_STYLE: - rVal <<= (css::drawing::HatchStyle)aHatch.GetHatchStyle(); break; + rVal <<= aHatch.GetHatchStyle(); break; case MID_HATCH_COLOR: rVal <<= (sal_Int32)aHatch.GetColor().GetColor(); break; case MID_HATCH_DISTANCE: @@ -2536,7 +2536,7 @@ bool XFillHatchItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) SetName( aName ); if ( bHatch ) { - aHatch.SetHatchStyle( (css::drawing::HatchStyle)aUnoHatch.Style ); + aHatch.SetHatchStyle( aUnoHatch.Style ); aHatch.SetColor( aUnoHatch.Color ); aHatch.SetDistance( aUnoHatch.Distance ); aHatch.SetAngle( aUnoHatch.Angle ); @@ -2554,7 +2554,7 @@ bool XFillHatchItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) if(!(rVal >>= aUnoHatch)) return false; - aHatch.SetHatchStyle( (css::drawing::HatchStyle)aUnoHatch.Style ); + aHatch.SetHatchStyle( aUnoHatch.Style ); aHatch.SetColor( aUnoHatch.Color ); aHatch.SetDistance( aUnoHatch.Distance ); aHatch.SetAngle( aUnoHatch.Angle ); diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx index 3a1fd0404a0c..86b1188e7be9 100644 --- a/svx/source/xoutdev/xattr2.cxx +++ b/svx/source/xoutdev/xattr2.cxx @@ -318,7 +318,7 @@ sal_uInt16 XLineCapItem::GetValueCount() const css::drawing::LineCap XLineCapItem::GetValue() const { - const css::drawing::LineCap eRetval((css::drawing::LineCap)SfxEnumItem::GetValue()); + const css::drawing::LineCap eRetval(SfxEnumItem::GetValue()); OSL_ENSURE(css::drawing::LineCap_BUTT == eRetval || css::drawing::LineCap_ROUND == eRetval || css::drawing::LineCap_SQUARE == eRetval, "Unknown enum value in XATTR_LINECAP (!)"); commit a31b7a941eee06efaa92a54a49c955c914fd20aa Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:36:30 2018 +0100 loplugin:redundantcast: sw (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: If1bdd1a1b03fd0f705e1167c3ca8139799350f20 diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index f4a30868686b..ea2a4eaef9ca 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -649,7 +649,7 @@ OUString SwTableFormula::ScanString( FnScanFormula fnFormula, const SwTable& rTa // JP 16.02.99: SplitMergeBoxNm take care of the name themself // JP 22.02.99: Linux compiler needs cast // JP 28.06.99: rel. BoxName has no preceding tablename! - if( fnFormula != (FnScanFormula)&SwTableFormula::SplitMergeBoxNm_ && + if( fnFormula != &SwTableFormula::SplitMergeBoxNm_ && m_sFormula.getLength()>(nStt+1) && cRelIdentifier != m_sFormula[nStt+1] && (nSeparator = m_sFormula.indexOf( '.', nStt ))>=0 && nSeparator < nEnd ) @@ -662,7 +662,7 @@ OUString SwTableFormula::ScanString( FnScanFormula fnFormula, const SwTable& rTa sTableNm = sTableNm.copy( 0, nSeparator - nStt ); // when creating a formula the table name is unwanted - if( fnFormula != (FnScanFormula)&SwTableFormula::MakeFormula_ ) + if( fnFormula != &SwTableFormula::MakeFormula_ ) aStr += sTableNm; nStt = nSeparator; diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx index 845d02de6582..061bb5cbb72c 100644 --- a/sw/source/core/fields/usrfld.cxx +++ b/sw/source/core/fields/usrfld.cxx @@ -280,7 +280,7 @@ bool SwUserFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const switch( nWhichId ) { case FIELD_PROP_DOUBLE: - rAny <<= (double) nValue; + rAny <<= nValue; break; case FIELD_PROP_PAR2: rAny <<= aContent; diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 5aefbf9acb11..ffadc4a88d86 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -2497,7 +2497,7 @@ Any SwXTextColumns::getPropertyValue( const OUString& rPropertyName ) aRet <<= nSepLineHeightRelative; break; case WID_TXTCOL_LINE_ALIGN: - aRet <<= (style::VerticalAlignment)nSepLineVertAlign; + aRet <<= nSepLineVertAlign; break; case WID_TXTCOL_LINE_IS_ON: aRet <<= bSepLineIsOn; diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index 0e5c8f50ef64..33df1d9bff40 100644 --- a/sw/source/ui/vba/vbaparagraphformat.cxx +++ b/sw/source/ui/vba/vbaparagraphformat.cxx @@ -54,7 +54,7 @@ sal_Int32 SAL_CALL SwVbaParagraphFormat::getAlignment() void SAL_CALL SwVbaParagraphFormat::setAlignment( sal_Int32 _alignment ) { - style::ParagraphAdjust aParaAdjust = ( style::ParagraphAdjust ) getOOoAlignment( _alignment ); + style::ParagraphAdjust aParaAdjust = getOOoAlignment( _alignment ); mxParaProps->setPropertyValue("ParaAdjust", uno::makeAny( aParaAdjust ) ); } diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index c414b3c05368..48fca81e24ec 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -689,7 +689,7 @@ sal_uInt16 SwDocShell::Edit( else nMask = SFXSTYLEBIT_USERDEF; - pStyle = &m_xBasePool->Make( rName, (SfxStyleFamily)nFamily, nMask ); + pStyle = &m_xBasePool->Make( rName, nFamily, nMask ); // set the current one as Parent SwDocStyleSheet* pDStyle = static_cast<SwDocStyleSheet*>(pStyle); @@ -781,7 +781,7 @@ sal_uInt16 SwDocShell::Edit( } else { - pStyle = m_xBasePool->Find( rName, (SfxStyleFamily)nFamily ); + pStyle = m_xBasePool->Find( rName, nFamily ); SAL_WARN_IF( !pStyle, "sw.ui", "Style not found" ); } diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 748c4b2136fe..872ad7b79653 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -824,7 +824,7 @@ static sal_uInt16 lcl_isNonDefaultLanguage(LanguageType eBufferLanguage, SwView // to the OOo setting or the system setting explicitly // and/or a better handling of the script type. i18n::UnicodeScript eType = !rInBuffer.isEmpty() ? - (i18n::UnicodeScript)GetAppCharClass().getScript( rInBuffer, 0 ) : + GetAppCharClass().getScript( rInBuffer, 0 ) : i18n::UnicodeScript_kScriptCount; bool bSystemIsNonLatin = false; diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 6275fc7f9421..dd62e7aff9ff 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -803,7 +803,7 @@ ASK_ESCAPE: (SID_TEXTDIRECTION_TOP_TO_BOTTOM == nSlotId); else { - text::WritingMode eMode = (text::WritingMode) + text::WritingMode eMode = aEditAttr.Get( SDRATTR_TEXTDIRECTION ).GetValue(); if( nSlotId == SID_TEXTDIRECTION_LEFT_TO_RIGHT ) diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx index 11449958ec52..ac6f5556e6db 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.cxx +++ b/sw/source/uibase/sidebar/PageMarginControl.cxx @@ -262,8 +262,8 @@ void PageMarginControl::SetMetricFieldMaxValues( const Size& rPageSize ) const long nMT = m_pTopMarginEdit->Denormalize( m_pTopMarginEdit->GetValue( FUNIT_TWIP ) ); const long nMB = m_pBottomMarginEdit->Denormalize( m_pBottomMarginEdit->GetValue( FUNIT_TWIP ) ); - const long nPH = LogicToLogic( rPageSize.Height(), (MapUnit)m_eUnit, MapUnit::MapTwip ); - const long nPW = LogicToLogic( rPageSize.Width(), (MapUnit)m_eUnit, MapUnit::MapTwip ); + const long nPH = LogicToLogic( rPageSize.Height(), m_eUnit, MapUnit::MapTwip ); + const long nPW = LogicToLogic( rPageSize.Width(), m_eUnit, MapUnit::MapTwip ); // Left long nMax = nPW - nMR - MINBODY; diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index 7a53443d5d2a..8bdf70217905 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -2305,8 +2305,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_ATTR_PAGE_BITMAP: { SfxItemSet aSet = rDesc.GetMaster().GetAttrSet(); - drawing::FillStyle eXFS = (drawing::FillStyle) - aSet.GetItem(XATTR_FILLSTYLE)->GetValue(); + drawing::FillStyle eXFS = aSet.GetItem(XATTR_FILLSTYLE)->GetValue(); XFillStyleItem aFillStyleItem( eXFS ); aFillStyleItem.SetWhich( SID_ATTR_PAGE_FILLSTYLE ); rSet.Put(aFillStyleItem); diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx index a2d027240a4e..5f9cbf1369a1 100644 --- a/sw/source/uibase/utlui/attrdesc.cxx +++ b/sw/source/uibase/utlui/attrdesc.cxx @@ -302,7 +302,7 @@ bool SwFormatSurround::GetPresentation ) const { const char* pId = nullptr; - switch ( (css::text::WrapTextMode)GetValue() ) + switch ( GetValue() ) { case css::text::WrapTextMode_NONE: pId = STR_SURROUND_NONE; commit eaa9142fa7a107f5f47d547f4807caa7e4c99b1e Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:36:19 2018 +0100 loplugin:redundantcast: tools (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: I20c94335b3ddeeea40af1f2b0d3777f139186a01 diff --git a/include/tools/bigint.hxx b/include/tools/bigint.hxx index 8692bd2e7787..928ee7b77746 100644 --- a/include/tools/bigint.hxx +++ b/include/tools/bigint.hxx @@ -186,7 +186,7 @@ inline bool BigInt::IsNeg() const if ( !bIsBig ) return (nVal < 0); else - return (bool)bIsNeg; + return bIsNeg; } inline bool BigInt::IsZero() const commit 83f69a1213f296e1f27748bae9b0baf9324fe517 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:36:02 2018 +0100 loplugin:redundantcast: unotools (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: If48db3f54130f3f9a57e4fdc90cd5023a6047cc7 diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx index 411c650dc74f..12140033ab4a 100644 --- a/unotools/source/i18n/localedatawrapper.cxx +++ b/unotools/source/i18n/localedatawrapper.cxx @@ -891,7 +891,7 @@ DateOrder LocaleDataWrapper::getDateOrder() const aGuard.changeReadToWrite(); const_cast<LocaleDataWrapper*>(this)->getDateOrdersImpl(); } - return (DateOrder) nDateOrder; + return nDateOrder; } DateOrder LocaleDataWrapper::getLongDateOrder() const @@ -902,7 +902,7 @@ DateOrder LocaleDataWrapper::getLongDateOrder() const aGuard.changeReadToWrite(); const_cast<LocaleDataWrapper*>(this)->getDateOrdersImpl(); } - return (DateOrder) nLongDateOrder; + return nLongDateOrder; } DateOrder LocaleDataWrapper::scanDateOrderImpl( const OUString& rCode ) const commit 6dc2d2573dbfcbe67e65476e8b25470f0a2312d0 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:35:43 2018 +0100 loplugin:redundantcast: vcl (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: I5e515738a29c6d79154560d69c8b86885800ba88 diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx index 3fb0633fe3a6..c4139bb7d2d7 100644 --- a/include/vcl/field.hxx +++ b/include/vcl/field.hxx @@ -390,7 +390,7 @@ public: const tools::Time& GetMax() const { return maMax; } void SetTimeFormat( TimeFormat eNewFormat ); - TimeFormat GetTimeFormat() const { return (TimeFormat)mnTimeFormat;} + TimeFormat GetTimeFormat() const { return mnTimeFormat;} void SetFormat( TimeFieldFormat eNewFormat ); TimeFieldFormat GetFormat() const { return meFormat; } diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 1c0268b09869..ce8aa460484d 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -1451,7 +1451,7 @@ void DateFormatter::SetExtDateFormat( ExtDateFieldFormat eFormat ) ExtDateFieldFormat DateFormatter::GetExtDateFormat( bool bResolveSystemFormat ) const { - ExtDateFieldFormat eDateFormat = (ExtDateFieldFormat)mnExtDateFormat; + ExtDateFieldFormat eDateFormat = mnExtDateFormat; if ( bResolveSystemFormat && ( eDateFormat <= ExtDateFieldFormat::SystemShortYYYY ) ) { diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx index 3e2dae464d7e..9281fc101ddb 100644 --- a/vcl/source/gdi/animate.cxx +++ b/vcl/source/gdi/animate.cxx @@ -48,7 +48,7 @@ BitmapChecksum AnimationBitmap::GetChecksum() const UInt32ToSVBT32( aSizePix.Height(), aBT32 ); nCrc = vcl_get_checksum( nCrc, aBT32, 4 ); - UInt32ToSVBT32( (long) nWait, aBT32 ); + UInt32ToSVBT32( nWait, aBT32 ); nCrc = vcl_get_checksum( nCrc, aBT32, 4 ); UInt32ToSVBT32( (long) eDisposal, aBT32 ); diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx index 640bfe5eab6b..61aff29038ef 100644 --- a/vcl/unx/gtk/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx @@ -2983,7 +2983,7 @@ bool GtkSalGraphics::NWPaintGTKToolbar( { gtk_paint_flat_box( gWidgetData[m_nXScreen].gToolbarWidget->style, gdkDrawable, - (GtkStateType)GTK_STATE_NORMAL, + GTK_STATE_NORMAL, GTK_SHADOW_NONE, &clipRect, gWidgetData[m_nXScreen].gToolbarWidget, commit 8b614e7b98ea434c496721052007349656bd33dd Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jan 11 17:35:24 2018 +0100 loplugin:redundantcast: xmloff (after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: I4697e7f56d700b360dbdf2ab91ec7932e91244ad diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 9061d9f2583e..2ae08aa8b340 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -1217,7 +1217,7 @@ void SdXMLEllipseShapeContext::StartElement(const uno::Reference< xml::sax::XAtt uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY ); if( xPropSet.is() ) { - xPropSet->setPropertyValue("CircleKind", Any( (drawing::CircleKind)meKind) ); + xPropSet->setPropertyValue("CircleKind", Any( meKind) ); xPropSet->setPropertyValue("CircleStartAngle", Any(mnStartAngle) ); xPropSet->setPropertyValue("CircleEndAngle", Any(mnEndAngle) ); } @@ -1945,7 +1945,7 @@ void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XA { xProps->setPropertyValue("StartPosition", Any(maStart)); xProps->setPropertyValue("EndPosition", Any(maEnd) ); - xProps->setPropertyValue("EdgeKind", Any((drawing::ConnectorType)mnType) ); + xProps->setPropertyValue("EdgeKind", Any(mnType) ); xProps->setPropertyValue("EdgeLine1Delta", Any(mnDelta1) ); xProps->setPropertyValue("EdgeLine2Delta", Any(mnDelta2) ); xProps->setPropertyValue("EdgeLine3Delta", Any(mnDelta3) ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits