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 <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
Xisco Fauli 2024-10-23 01:31:31 +02:00
parent fb8644e8e1
commit a8f7368b76

View file

@ -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();
}
bool bIsAction = m_pDrawViewWrapper->IsAction();
// pop-up menu
if(rCEvt.GetCommand() == CommandEventId::ContextMenu && !bIsAction)
{
{
if(pChartWindow)
pChartWindow->ReleaseMouse();
}
if( m_aSelection.isSelectionDifferentFromBeforeMouseDown() )
impl_notifySelectionChangeListeners();
@ -1006,7 +1000,6 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
Point aPos( rCEvt.GetMousePosPixel() );
if( !rCEvt.IsMouseEvent() )
{
if(pChartWindow)
aPos = pChartWindow->GetPointerState().maPos;
}