diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-22 14:08:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-23 14:00:08 +0100 |
commit | ec1c4c49301758c54394f9943252e192ad54638b (patch) | |
tree | b53af3cb9154a388495b1af35c3f8ff41d6ebe1f /connectivity/source/commontools | |
parent | db0f2c29bf3a6ad5a08f8524ea0e65aa90792bb2 (diff) |
O[U]String::replaceAt overloads that take string_view
which results in lots of nice string_view improvements picked up by the
plugins
Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/commontools')
-rw-r--r-- | connectivity/source/commontools/DateConversion.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/commontools/dbtools2.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/commontools/predicateinput.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 81338b3dc9fa..38f20af0926c 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -90,7 +90,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, nIndex += 2; nIndex = aTemp.indexOf(sQuot,nIndex); if(nIndex != -1) - aTemp = aTemp.replaceAt(nIndex,sQuot.getLength(), "\'\'"); + aTemp = aTemp.replaceAt(nIndex,sQuot.getLength(), u"\'\'"); } while (nIndex != -1); aRet.append(aTemp); diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 0adfe23bdac9..5f07a272cec2 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -122,7 +122,7 @@ OUString createStandardTypePart(const Reference< XPropertySet >& xColProp,const { sal_Int32 nIndex = sTypeName.indexOf(sAutoIncrementValue); if (nIndex != -1) - sTypeName = sTypeName.replaceAt(nIndex,sTypeName.getLength() - nIndex,OUString()); + sTypeName = sTypeName.replaceAt(nIndex,sTypeName.getLength() - nIndex, u""); } if ( (nPrecision > 0 || nScale > 0) && bUseLiteral ) @@ -387,7 +387,7 @@ OUString createSqlCreateTableStatement( const Reference< XPropertySet >& descri else { if ( aSql.endsWith(",") ) - aSql = aSql.replaceAt(aSql.getLength()-1, 1, ")"); + aSql = aSql.replaceAt(aSql.getLength()-1, 1, u")"); else aSql += ")"; } diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index 37a0d6862c62..047f9ccc7c94 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -153,7 +153,7 @@ namespace dbtools sal_Int32 nTemp = 0; while ( -1 != ( nIndex = sQuoted.indexOf( '\'',nTemp ) ) ) { - sQuoted = sQuoted.replaceAt( nIndex, 1, "''" ); + sQuoted = sQuoted.replaceAt( nIndex, 1, u"''" ); nTemp = nIndex+2; } |