summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-09-22 23:28:10 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-09-23 08:50:50 +0200
commit2e088bf71767849e99070d576fb300c244bd6475 (patch)
treef8a9c3205f6263b2887a542f6cce7d2755c8183d /dbaccess
parent09fc31370252a09dd8affda0b0c743133e023244 (diff)
Extend loplugin:stringviewparam to starts/endsWith: dbaccess
Change-Id: I30e48b7ebf3795659638d7a2aedfb58e325cea37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122501 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/misc/dsntypes.cxx5
-rw-r--r--dbaccess/source/inc/dsntypes.hxx2
2 files changed, 4 insertions, 3 deletions
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index aca8aacb560b..2758b0a6ed6a 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -19,6 +19,7 @@
#include <dsntypes.hxx>
#include <unotools/confignode.hxx>
+#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
#include <tools/wldcrd.hxx>
#include <osl/file.hxx>
@@ -278,9 +279,9 @@ Sequence<PropertyValue> ODsnTypeCollection::getDefaultDBSettings( std::u16string
return aProperties.getPropertyValues();
}
-bool ODsnTypeCollection::isEmbeddedDatabase( const OUString& _sURL )
+bool ODsnTypeCollection::isEmbeddedDatabase( std::u16string_view _sURL )
{
- return _sURL.startsWith( "sdbc:embedded:" );
+ return o3tl::starts_with( _sURL, u"sdbc:embedded:" );
}
OUString ODsnTypeCollection::getEmbeddedDatabase()
diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx
index b7642c66f20c..871db0a1fe27 100644
--- a/dbaccess/source/inc/dsntypes.hxx
+++ b/dbaccess/source/inc/dsntypes.hxx
@@ -158,7 +158,7 @@ public:
bool isConnectionUrlRequired(std::u16string_view _sURL) const;
/// checks if the given data source type embeds its data into the database document
- static bool isEmbeddedDatabase( const OUString& _sURL );
+ static bool isEmbeddedDatabase( std::u16string_view _sURL );
static OUString getEmbeddedDatabase();