summaryrefslogtreecommitdiff
path: root/forms/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-10-14 14:29:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-10-17 10:39:11 +0200
commit425255567eafffba3a5817fb96050663d1db8e2f (patch)
treed4f78a9103c34367b2aa29feb31faf4e6871d01e /forms/source
parent6125be0aa10113d840a1fdbe33cf3174d5896fcb (diff)
use more string_view
Change-Id: Ie826234aa9064b08b8f0647738b57c47ac0ed91a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141369 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms/source')
-rw-r--r--forms/source/component/Button.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index 52818361c2f2..28cac777ea43 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -30,6 +30,7 @@
#include <comphelper/basicio.hxx>
#include <comphelper/property.hxx>
#include <o3tl/any.hxx>
+#include <o3tl/string_view.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
@@ -652,10 +653,11 @@ void SAL_CALL OButtonControl::propertyChange( const PropertyChangeEvent& _rEvent
namespace
{
- bool isFormControllerURL( const OUString& _rURL )
+ bool isFormControllerURL( std::u16string_view _rURL )
{
- return ( _rURL.getLength() > RTL_CONSTASCII_LENGTH( ".uno:FormController/" ) )
- && ( _rURL.startsWith( ".uno:FormController/" ) );
+ static constexpr std::u16string_view PREFIX = u".uno:FormController/";
+ return ( _rURL.size() > PREFIX.size() )
+ && ( o3tl::starts_with(_rURL, PREFIX ) );
}
}