Simplify the method and fix its description
The description had the copy-paste error since commit
648106f879
(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.kaganski@collabora.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user