summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 10:31:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 13:55:30 +0200
commit65e4a776e8315fd61fd67ad00d28985b11f0b79e (patch)
tree1ab7a2947d47807086e0477a8d3ad35c2e75dd48 /connectivity
parenta7b7614c7cab42cd0839752635db81e25e1e50a1 (diff)
simplify some OUString::copy calls
Change-Id: Ifa228ca02ea79a1309e1875414028aade7e5f12d Reviewed-on: https://gerrit.libreoffice.org/39801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/dbase/DIndex.cxx2
-rw-r--r--connectivity/source/drivers/mork/MConnection.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index 532174820dbb..4063c79576bb 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -463,7 +463,7 @@ bool ODbaseIndex::DropImpl()
{
// References the Key to an Index-file?
aKeyName = aInfFile.GetKeyName( nKey );
- if (aKeyName.copy(0,3) == "NDX")
+ if (aKeyName.startsWith("NDX"))
{
if(sEntry == OStringToOUString(aInfFile.ReadKey(aKeyName),m_pTable->getConnection()->getTextEncoding()))
{
diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx
index 0f6fb73b1a34..06f21b944074 100644
--- a/connectivity/source/drivers/mork/MConnection.cxx
+++ b/connectivity/source/drivers/mork/MConnection.cxx
@@ -71,7 +71,7 @@ void OConnection::construct(const OUString& url)
sal_Int32 nLen = url.indexOf(':');
nLen = url.indexOf(':',nLen+1);
- OSL_ENSURE( url.copy( 0, nLen ) == "sdbc:address", "OConnection::construct: invalid start of the URI - should never have survived XDriver::acceptsURL!" );
+ OSL_ENSURE( url.startsWith("sdbc:address:"), "OConnection::construct: invalid start of the URI - should never have survived XDriver::acceptsURL!" );
OUString aAddrbookURI(url.copy(nLen+1));
// Get Scheme