diff options
-rw-r--r-- | dbaccess/source/core/misc/dsntypes.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/inc/dsntypes.hxx | 2 |
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(); |