chart2/source/controller/main/ChartController_Window.cxx | 19 ++++----------- 1 file changed, 6 insertions(+), 13 deletions(-)
New commits: commit a8f7368b76185b656b96755dde622715d08bb07b Author: Xisco Fauli <[email protected]> AuthorDate: Wed Oct 23 01:31:31 2024 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Wed Oct 23 09:27:03 2024 +0200 tdf#163486: PVS: Expression is always true V547 Expression 'pChartWindow' is always true. V547 Expression 'pChartWindow' is always true. Change-Id: I3edefe4392386397e5666420b31cc40096c6f3cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175465 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index b9d4a4372f15..a4e54a5fd13e 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -982,21 +982,15 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) { SolarMutexGuard aGuard; auto pChartWindow(GetChartWindow()); - bool bIsAction = false; - { - DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper.get(); - if(!pChartWindow || !pDrawViewWrapper) - return; - bIsAction = m_pDrawViewWrapper->IsAction(); - } + DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper.get(); + if(!pChartWindow || !pDrawViewWrapper) + return; + bool bIsAction = m_pDrawViewWrapper->IsAction(); // pop-up menu if(rCEvt.GetCommand() == CommandEventId::ContextMenu && !bIsAction) { - { - if(pChartWindow) - pChartWindow->ReleaseMouse(); - } + pChartWindow->ReleaseMouse(); if( m_aSelection.isSelectionDifferentFromBeforeMouseDown() ) impl_notifySelectionChangeListeners(); @@ -1006,8 +1000,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) Point aPos( rCEvt.GetMousePosPixel() ); if( !rCEvt.IsMouseEvent() ) { - if(pChartWindow) - aPos = pChartWindow->GetPointerState().maPos; + aPos = pChartWindow->GetPointerState().maPos; } OUString aMenuName;
