diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-22 15:55:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-30 08:50:31 +0200 |
commit | 2ccde70d60d3a5074faf49260e8fe0ccdb91ff26 (patch) | |
tree | 82555c2aac7ca37c30e1084a7a8069c71fc11fbc /svx | |
parent | 61ff1d919e317947c769e61eeda7f1bb8132f273 (diff) |
teach redundantcast plugin about functional casts
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0
Reviewed-on: https://gerrit.libreoffice.org/37910
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/imapwnd.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/langbox.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/datanavi.cxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 2 | ||||
-rw-r--r-- | svx/source/inc/datanavi.hxx | 2 | ||||
-rw-r--r-- | svx/source/styles/CommonStylePreviewRenderer.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdogrp.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxtr.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdovirt.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/textchainflow.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 2 | ||||
-rw-r--r-- | svx/source/unogallery/unogalitem.cxx | 2 |
14 files changed, 15 insertions, 15 deletions
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 503e2bc5f902..a73ff87da1ed 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -313,7 +313,7 @@ void IMapWindow::SdrObjCreated( const SdrObject& rObj ) tools::Polygon aPoly(pPathObj->GetPathPoly().getB2DPolygon(0L)); delete pPathObj; - IMapPolygonObject* pObj = new IMapPolygonObject( tools::Polygon(aPoly), "", "", "", "", "", true, false ); + IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, "", "", "", "", "", true, false ); pObj->SetExtraEllipse( aPoly.GetBoundRect() ); pCircObj->AppendUserData( new IMapUserData( IMapObjectPtr(pObj) ) ); } diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 1bb997084716..f6ee80824c03 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -453,7 +453,7 @@ LanguageType SvxLanguageBoxBase::GetSelectLanguage() const if ( nPos != LISTBOX_ENTRY_NOTFOUND ) return LanguageType( reinterpret_cast<sal_uIntPtr>(ImplGetEntryData(nPos)) ); else - return LanguageType( LANGUAGE_DONTKNOW ); + return LANGUAGE_DONTKNOW; } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 34ef5f81b31b..cb9cb26a4d1e 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -1558,7 +1558,7 @@ namespace svxform if ( aDlg->Execute() == RET_OK ) { - if ( aDlg->GetModifyDoc() != bool( bDocumentData ) ) + if ( aDlg->GetModifyDoc() != bDocumentData ) { bDocumentData = aDlg->GetModifyDoc(); try diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 1f4626a2d048..83fdc6285cb6 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -1085,7 +1085,7 @@ bool GalleryTheme::GetURL( sal_uIntPtr nPos, INetURLObject& rURL ) if( pObject ) { - rURL = INetURLObject( ImplGetURL( pObject ) ); + rURL = ImplGetURL( pObject ); bRet = true; } diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx index 34e791ab2cee..0c6793f5bd7c 100644 --- a/svx/source/inc/datanavi.hxx +++ b/svx/source/inc/datanavi.hxx @@ -599,7 +599,7 @@ namespace svxform OUString GetName() const { return m_pNameED->GetText(); } void SetName( const OUString& _rName ) { m_pNameED->SetText( _rName );} - bool GetModifyDoc() const { return bool( m_pModifyCB->IsChecked() ); } + bool GetModifyDoc() const { return m_pModifyCB->IsChecked(); } void SetModifyDoc( const bool bModify ) { m_pModifyCB->Check( bModify ); } }; diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx index 45360ba89eb9..7de7eef58342 100644 --- a/svx/source/styles/CommonStylePreviewRenderer.cxx +++ b/svx/source/styles/CommonStylePreviewRenderer.cxx @@ -146,7 +146,7 @@ bool CommonStylePreviewRenderer::recalculate() { const SvxFontHeightItem* pFontHeightItem = static_cast<const SvxFontHeightItem*>(pItem); Size aFontSize(0, pFontHeightItem->GetHeight()); - maPixelSize = Size(mrOutputDev.LogicToPixel(aFontSize, mrShell.GetMapUnit())); + maPixelSize = mrOutputDev.LogicToPixel(aFontSize, mrShell.GetMapUnit()); pFont->SetFontSize(maPixelSize); vcl::Font aOldFont(mrOutputDev.GetFont()); diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index 02d6c50f0797..a469144b4319 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -146,7 +146,7 @@ sal_uInt16 SdrObjGroup::GetObjIdentifier() const SdrLayerID SdrObjGroup::GetLayer() const { bool b1st = true; - SdrLayerID nLay=SdrLayerID(SdrObject::GetLayer()); + SdrLayerID nLay = SdrObject::GetLayer(); SdrObjList* pOL=pSub.get(); const size_t nObjCount = pOL->GetObjCount(); for (size_t i=0; i<nObjCount; ++i) { diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index a64c35ab1034..c76f138caba3 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -442,7 +442,7 @@ SdrObject* SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPol } pPathObj->ImpSetAnchorPos(aAnchor); - pPathObj->NbcSetLayer(SdrLayerID(GetLayer())); + pPathObj->NbcSetLayer(GetLayer()); if(pModel) { diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx index 00ee676799b3..5f6f21368805 100644 --- a/svx/source/svdraw/svdovirt.cxx +++ b/svx/source/svdraw/svdovirt.cxx @@ -510,7 +510,7 @@ sal_uInt32 SdrVirtObj::GetPointCount() const Point SdrVirtObj::GetPoint(sal_uInt32 i) const { - return Point(rRefObj.GetPoint(i) + aAnchor); + return rRefObj.GetPoint(i) + aAnchor; } void SdrVirtObj::NbcSetPoint(const Point& rPnt, sal_uInt32 i) diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx index 98a77d90bdca..3f0f07dea1b8 100644 --- a/svx/source/svdraw/textchainflow.cxx +++ b/svx/source/svdraw/textchainflow.cxx @@ -121,7 +121,7 @@ void TextChainFlow::impUpdateCursorInfo() mbPossiblyCursorOut = bOverflow; if(mbPossiblyCursorOut ) { - maOverflowPosSel = ESelection(mpOverflChText->GetOverflowPointSel()); + maOverflowPosSel = mpOverflChText->GetOverflowPointSel(); ESelection aSelAtUFTime = GetTextChain()->GetPreChainingSel(GetLinkTarget()); // Might be an invalid selection if the cursor at UF time was before // the (possibly UF-induced) Overflowing point but we don't use it in that case diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 19a41f4e6f2d..2a20d011028e 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -688,8 +688,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) aCropDlgAttr.Put( SvxBrushItem( pObj->GetGraphic(), GPOS_MM, SID_ATTR_GRAF_GRAPHIC ) ); aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_PAGE_SIZE, - Size( OutputDevice::LogicToLogic( - Size( 200000, 200000 ), aMap100, aMapTwip ) ) ) ); + OutputDevice::LogicToLogic( + Size( 200000, 200000 ), aMap100, aMapTwip ) ) ); aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_GRAF_FRMSIZE, OutputDevice::LogicToLogic( pObj->GetLogicRect().GetSize(), aMap100, aMapTwip ) ) ); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index b90927a7326e..4c4b7305b147 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2127,7 +2127,7 @@ IMPL_LINK_NOARG(SvxLineWindow_Impl, SelectHdl, ListBox&, void) VclPtr<SvxLineWindow_Impl> xThis(this); SvxLineItem aLineItem( SID_FRAME_LINESTYLE ); - SvxBorderLineStyle nStyle = SvxBorderLineStyle( m_aLineStyleLb->GetSelectEntryStyle() ); + SvxBorderLineStyle nStyle = m_aLineStyleLb->GetSelectEntryStyle(); if ( m_aLineStyleLb->GetSelectEntryPos( ) > 0 ) { diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index b00726280c67..906b21a25e58 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -572,7 +572,7 @@ void ChineseDictionaryDialog::dispose() void ChineseDictionaryDialog::setDirectionAndTextConversionOptions( bool bDirectionToSimplified, sal_Int32 nTextConversionOptions /*i18n::TextConversionOption*/ ) { - if( bDirectionToSimplified == bool(m_pRB_To_Simplified->IsChecked()) + if( bDirectionToSimplified == m_pRB_To_Simplified->IsChecked() && nTextConversionOptions == m_nTextConversionOptions ) return; diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx index 4a71280cd9ec..6de4a988eb41 100644 --- a/svx/source/unogallery/unogalitem.cxx +++ b/svx/source/unogallery/unogalitem.cxx @@ -261,7 +261,7 @@ void GalleryItem::_getPropertyValues( const comphelper::PropertyMapEntry** ppEnt { case UNOGALLERY_GALLERYITEMTYPE: { - *pValue <<= sal_Int8( getType() ); + *pValue <<= getType(); } break; |