summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/PreparedStatement.cxx2
-rw-r--r--connectivity/source/parse/sqlbison.y7
2 files changed, 4 insertions, 5 deletions
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index 10f034ce15ce..9cd9157a7d6d 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -783,7 +783,7 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, c
sBuffer.append(sValue);
if(sValue.indexOf('.') != -1) // there is a dot
{
- for(sal_Int32 i=sValue.copy(sValue.indexOf('.')+1).getLength(); i<scale;i++)
+ for(sal_Int32 i=sValue.subView(sValue.indexOf('.')+1).size(); i<scale;i++)
{
sBuffer.append('0');
}
diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index 18ee2e7cd43d..e0e9969ab68a 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -4809,12 +4809,11 @@ void OSQLParser::error(const char *fmt)
sal_Int32 nPos2 = sStr.indexOf(sSQL_TOKEN,nPos1+1);
if(nPos2 != -1)
{
- OUString sSecond = sStr.copy(nPos1+sSQL_TOKEN.getLength(),nPos2-nPos1-sSQL_TOKEN.getLength());
- sFirst += sSecond;
- sFirst += sStr.copy(nPos2+sSQL_TOKEN.getLength());
+ sFirst += sStr.subView(nPos1+sSQL_TOKEN.getLength(),nPos2-nPos1-sSQL_TOKEN.getLength());
+ sFirst += sStr.subView(nPos2+sSQL_TOKEN.getLength());
}
else
- sFirst += sStr.copy(nPos1+sSQL_TOKEN.getLength());
+ sFirst += sStr.subView(nPos1+sSQL_TOKEN.getLength());
m_sErrorMessage = sFirst;
}