summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 11:04:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 14:13:03 +0200
commit7de833a626cea8cd741ba1d971fea6f0c3a2660b (patch)
tree2750dbed735b4df7a9e82add532df49049cc52e8 /dbaccess
parent6f9f9491bdef676f969898bd653db9905d14f5e8 (diff)
simplify calls OUString::copy in foo.copy(x, foo.getLength() - x)
Change-Id: I20318c77dcc3bc2a64336541ef5a3f412bfd9483 Reviewed-on: https://gerrit.libreoffice.org/39803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/control/SqlNameEdit.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/dbaccess/source/ui/control/SqlNameEdit.cxx b/dbaccess/source/ui/control/SqlNameEdit.cxx
index 4f89d37dd8fe..c86a51b13ff9 100644
--- a/dbaccess/source/ui/control/SqlNameEdit.cxx
+++ b/dbaccess/source/ui/control/SqlNameEdit.cxx
@@ -48,7 +48,7 @@ namespace dbaui
nMatch = i + 1;
}
}
- _rsCorrected += _sToCheck.copy( nMatch, _sToCheck.getLength() - nMatch );
+ _rsCorrected += _sToCheck.copy( nMatch );
}
return bCorrected;
}
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 7ad2edae340e..b9dfc239f63e 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -947,7 +947,7 @@ bool OSelectionBrowseBox::SaveModified()
{ // special case, we have a table field so we must cut the table name
OUString sTableAlias = aFieldName.getToken(0,'.');
pEntry->SetAlias(sTableAlias);
- OUString sColumnName = aFieldName.copy(sTableAlias.getLength()+1,aFieldName.getLength() - sTableAlias.getLength() -1);
+ OUString sColumnName = aFieldName.copy(sTableAlias.getLength()+1);
Reference<XConnection> xConnection = rController.getConnection();
if ( !xConnection.is() )
return false;