chart2/source/controller/main/ControllerCommandDispatch.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
New commits: commit d9fa87d68b17b74d80efbffb1827c51cf8d1d6a9 Author: Mike Kaganski <[email protected]> AuthorDate: Sun Jul 6 17:27:11 2025 +0500 Commit: Miklos Vajna <[email protected]> CommitDate: Wed Jul 9 13:56:00 2025 +0200 Simplify ControllerCommandDispatch::fireStatusEvent Check m_aCommandAvailability.contains to decide if we need to call fireStatusEventForURLImpl for the given command. This also avoids an extra event for .uno:StatusBarVisible (explicitly handled below). Change-Id: If5a74e0631759bd2ace0aebc60670b70bf43aa08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187444 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187520 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index ec4bf7816cc9..8168966d5e46 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -985,8 +985,7 @@ void ControllerCommandDispatch::fireStatusEvent( const OUString & rURL, const Reference< frame::XStatusListener > & xSingleListener /* = 0 */ ) { - bool bIsChartSelectorURL = rURL == ".uno:ChartElementSelector"; - if( rURL.isEmpty() || bIsChartSelectorURL ) + if (rURL.isEmpty() || rURL == ".uno:ChartElementSelector") { uno::Any aArg; aArg <<= Reference< frame::XController >(m_xChartController); @@ -998,7 +997,7 @@ void ControllerCommandDispatch::fireStatusEvent( for (auto const& elem : m_aCommandAvailability) fireStatusEventForURLImpl( elem.first, xSingleListener ); } - else if( !bIsChartSelectorURL ) + else if (m_aCommandAvailability.contains(rURL)) fireStatusEventForURLImpl( rURL, xSingleListener ); // statusbar. Should be handled by base implementation
