summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-11-19 15:57:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-20 06:40:11 +0100
commit66317d3aa5ada5b7c5ea317590730f563bebb77c (patch)
tree69bd6dd0a316ea87d7f5bf44d49d840f36ddebe7 /svl
parentb692c8a2809666012084b9e25242c382d7323f72 (diff)
tdf#133835 speedup calc autofilter (1)
avoid a copy in INetURLHistory::QueryUrl, saves 10% Change-Id: I662a4e48f198e61f1cef52b1e920613bce9c9766 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125563 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/misc/inethist.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index b7bb0aaa191e..2fbd981034ec 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -346,15 +346,23 @@ void INetURLHistory::PutUrl_Impl (const INetURLObject &rUrl)
}
}
-bool INetURLHistory::QueryUrl_Impl (const INetURLObject &rUrl) const
+bool INetURLHistory::QueryUrl(const OUString &rUrl) const
+{
+ INetProtocol eProto = INetURLObject::CompareProtocolScheme (rUrl);
+ if (!QueryProtocol (eProto))
+ return false;
+ return QueryUrl_Impl( INetURLObject(rUrl) );
+}
+
+
+bool INetURLHistory::QueryUrl_Impl (INetURLObject rUrl) const
{
DBG_ASSERT (m_pImpl, "QueryUrl_Impl(): no Implementation");
if (m_pImpl)
{
- INetURLObject aHistUrl (rUrl);
- NormalizeUrl_Impl (aHistUrl);
+ NormalizeUrl_Impl (rUrl);
- return m_pImpl->queryUrl (aHistUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
+ return m_pImpl->queryUrl (rUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
return false;
}