From 8ce64dbb3d7875c00963ae257d53f2b7b58fc4ad Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 26 Jul 2017 14:11:32 +0200 Subject: loplugin:constparams in svx and fix a bug in the plugin itself when calling operator's like the one on std::function<> Change-Id: I1617607107eeff06785c1841f69e13ad2926218e Reviewed-on: https://gerrit.libreoffice.org/40446 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/core/frmedt/feshview.cxx | 5 ++--- sw/source/uibase/wrtsh/wrtsh1.cxx | 7 ++----- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'sw') diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 27786a816da9..3fca3c3782b7 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -1158,8 +1158,7 @@ bool SwFEShell::IsObjSelected( const SdrObject& rObj ) const if ( IsFrameSelected() || !Imp()->HasDrawView() ) return false; else - return Imp()->GetDrawView() - ->IsObjMarked( const_cast< SdrObject * >( &rObj ) ); + return Imp()->GetDrawView()->IsObjMarked( &rObj ); } bool SwFEShell::IsObjSameLevelWithMarked(const SdrObject* pObj) const @@ -1425,7 +1424,7 @@ namespace virtual bool includeObject( const SdrObject& i_rObject ) const override { - return m_pPV && m_pPV->GetView().IsObjMarkable( const_cast< SdrObject* >( &i_rObject ), m_pPV ); + return m_pPV && m_pPV->GetView().IsObjMarkable( &i_rObject, m_pPV ); } private: diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index d3575cbc1547..bfe720085d27 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1378,15 +1378,12 @@ SelectionType SwWrtShell::GetSelectionType() const else if( GetDrawView()->GetContext() == SdrViewContext::Media ) nCnt |= SelectionType::Media; - if (svx::checkForSelectedCustomShapes( - const_cast(GetDrawView()), - true /* bOnlyExtruded */ )) + if (svx::checkForSelectedCustomShapes( GetDrawView(), true /* bOnlyExtruded */ )) { nCnt |= SelectionType::ExtrudedCustomShape; } sal_uInt32 nCheckStatus = 0; - if (svx::checkForSelectedFontWork( - const_cast(GetDrawView()), nCheckStatus )) + if (svx::checkForSelectedFontWork( GetDrawView(), nCheckStatus )) { nCnt |= SelectionType::FontWork; } -- cgit