diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-07 14:23:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-11 12:41:28 +0200 |
commit | 57374ccc5b08818f14479d403899209b6259fbaf (patch) | |
tree | 2a4bbe875cb9cd07b2a1cd5ff40b2bf4214a990d /dbaccess | |
parent | bc91cc47505c448ded7297074ccff809b59e8ed1 (diff) |
replace createFromAscii with OUString literals in ODsnTypeCollection
Change-Id: I943e784bf3becd48e617b814b008f1f946987d28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167498
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/misc/dsntypes.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/inc/dsntypes.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/generalpage.cxx | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index 0a25d603d4f1..f3d792b4f59e 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -124,9 +124,9 @@ OUString ODsnTypeCollection::getPrefix(std::u16string_view _sURL) const return sRet; } -bool ODsnTypeCollection::hasDriver( const char* _pAsciiPattern ) const +bool ODsnTypeCollection::hasDriver( std::u16string_view _rAsciiPattern ) const { - OUString sPrefix( getPrefix( OUString::createFromAscii( _pAsciiPattern ) ) ); + OUString sPrefix( getPrefix( _rAsciiPattern ) ); return !sPrefix.isEmpty(); } diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx index ebd287099fa1..c6529ab6c34a 100644 --- a/dbaccess/source/inc/dsntypes.hxx +++ b/dbaccess/source/inc/dsntypes.hxx @@ -128,7 +128,7 @@ public: OUString getPrefix(std::u16string_view _sURL) const; /// determines whether there is a driver for the given URL prefix/pattern - bool hasDriver( const char* _pAsciiPattern ) const; + bool hasDriver( std::u16string_view _rAsciiPattern ) const; /// on a given string, return the Java Driver Class OUString getJavaDriverClass(std::u16string_view _sURL) const; diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index cf581081b289..8665a0d9ef2d 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -235,7 +235,7 @@ using namespace ::com::sun::star; { // show the "Connect directly" option only if the driver is installed const DbuTypeCollectionItem* pCollectionItem = dynamic_cast<const DbuTypeCollectionItem*>( _rSet.GetItem(DSID_TYPECOLLECTION) ); - bool bHasMySQLNative = ( pCollectionItem != nullptr ) && pCollectionItem->getCollection()->hasDriver( "sdbc:mysql:mysqlc:" ); + bool bHasMySQLNative = ( pCollectionItem != nullptr ) && pCollectionItem->getCollection()->hasDriver( u"sdbc:mysql:mysqlc:" ); if ( bHasMySQLNative ) m_xNATIVEDatabase->show(); diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 79c1580116cb..03887054becb 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -310,7 +310,7 @@ namespace dbaui { // do not display the Connector/OOo driver itself, it is always wrapped via the MySQL-Driver, if // this driver is installed - if ( m_pCollection->hasDriver( "sdbc:mysql:mysqlc:" ) ) + if ( m_pCollection->hasDriver( u"sdbc:mysql:mysqlc:" ) ) _inout_rDisplayName.clear(); } |