chart2/source/controller/main/ChartController.cxx | 2 +- chart2/source/controller/main/CommandDispatchContainer.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
New commits: commit cfc36b7ef65a56601bf59c6b6623f6d75f2f4178 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Jul 6 13:08:24 2025 +0500 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Jul 9 10:44:44 2025 +0200 Fix ChartController::queryDispatch In commit c6b95527d2e00ed3a4cf3bad3a328ca5b29a588a (INTEGRATION: CWS chart2mst3 (1.15.4); FILE MERGED, 2007-05-22), it was implemented to check that the target frame name is not empty and is equal to "_self". The "not empty" check was redundant as implemented; and was dropped in commit 33fe5b57eae6a3319b23afbe5be88f0548761f56 (Drop a redundant check, 2025-07-04). But it looks like the original implementation intended to do something different, namely check if the target frame name is *either* empty, *or* "_self": see documentation for _self in offapi/com/sun/star/frame/XFrame.idl (and implementation in various places, like framework/source/dispatch/dispatchprovider.cxx). This is fixed here. CommandDispatchContainer::getDispatchesForURLs is fixed as well. Change-Id: I9ed6981edeca16661f07e41b87b114a8e16d69ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187442 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187519 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index b7d270a99fdf..d5315e2f0fca 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -1045,7 +1045,7 @@ uno::Reference<frame::XDispatch> SAL_CALL if ( !m_aLifeTimeManager.impl_isDisposed() && getModel().is() ) { - if (rTargetFrameName == "_self") + if (rTargetFrameName.isEmpty() || rTargetFrameName == "_self") return m_aDispatchContainer.getDispatchForURL( rURL ); } return uno::Reference< frame::XDispatch > (); diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx index 906baa8b3407..f300e5f5fcae 100644 --- a/chart2/source/controller/main/CommandDispatchContainer.cxx +++ b/chart2/source/controller/main/CommandDispatchContainer.cxx @@ -141,7 +141,7 @@ Sequence< Reference< frame::XDispatch > > CommandDispatchContainer::getDispatche for( sal_Int32 nPos = 0; nPos < nCount; ++nPos ) { - if ( aDescriptors[ nPos ].FrameName == "_self" ) + if (aDescriptors[nPos].FrameName.isEmpty() || aDescriptors[nPos].FrameName == "_self") aRetRange[ nPos ] = getDispatchForURL( aDescriptors[ nPos ].FeatureURL ); } return aRet;