framework/inc/dispatch/interceptionhelper.hxx | 14 +++++--------- sfx2/source/view/frame.cxx | 5 +---- 2 files changed, 6 insertions(+), 13 deletions(-)
New commits: commit 69eeb034b3722c91af2f39bd00874689906c0612 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Thu Nov 10 11:37:37 2022 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Thu Nov 10 14:46:16 2022 +0100 Simplify this a bit Change-Id: I6162b8f54eb685267aeebe48daa419933b6528a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142542 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index 0039c18fdd80..eda62d4a29e9 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -584,10 +584,7 @@ tools::Rectangle SfxFrame::GetTopOuterRectPixel_Impl() const SfxWorkWindow* SfxFrame::GetWorkWindow_Impl() const { - if ( m_pImpl->pWorkWin ) - return m_pImpl->pWorkWin; - else - return nullptr; + return m_pImpl->pWorkWin; } void SfxFrame::CreateWorkWindow_Impl() commit 35be7c81987bd0b2a89fcfd2ee37d687a0b27bfd Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Thu Nov 10 11:24:03 2022 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Thu Nov 10 14:45:57 2022 +0100 Simplify the method and fix its description The description had the copy-paste error since commit 648106f879fdf6609db1e0d4c8acb43b3a997833 (Fri Apr 04 16:12:43 2003 +0000) when impl_searchMatchingInterceptor was replaced with findByPattern. Change-Id: I84d8c867b6606ef8adb74df823046b58cf6d9b51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142541 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/framework/inc/dispatch/interceptionhelper.hxx b/framework/inc/dispatch/interceptionhelper.hxx index a1a4cfc0b3e1..391986ff549f 100644 --- a/framework/inc/dispatch/interceptionhelper.hxx +++ b/framework/inc/dispatch/interceptionhelper.hxx @@ -97,23 +97,19 @@ class InterceptionHelper final : public ::cppu::WeakImplHelper< /** @short search for an interceptor inside this list using it's reference. - @param xInterceptor - points to the interceptor object, which should be located inside this list. + @param sURL + URL which should match with a registered pattern. @return An iterator object, which points directly to the located item inside this list. In case no interceptor could be found, it points to the end of this list! */ iterator findByPattern(std::u16string_view sURL) { - iterator pIt; - for (pIt=begin(); pIt!=end(); ++pIt) + for (iterator pIt=begin(); pIt!=end(); ++pIt) { - sal_Int32 c = pIt->lURLPattern.getLength(); - const OUString* pPattern = pIt->lURLPattern.getConstArray(); - - for (sal_Int32 i=0; i<c; ++i) + for (const OUString& pattern : pIt->lURLPattern) { - WildCard aPattern(pPattern[i]); + WildCard aPattern(pattern); if (aPattern.Matches(sURL)) return pIt; }