summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/firebird/Clob.cxx
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-01-28 12:38:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-28 17:32:18 +0100
commit943060836339f9640c612e9724f20e79db616e6e (patch)
tree3dc6e7748aef3ef0f2fca86979792162daa443fc /connectivity/source/drivers/firebird/Clob.cxx
parentd249bd5a3dfe13052ce9aa91bad94ec7d60604d4 (diff)
simplify code, use more subView()
Change-Id: I569c7f34acbdf8451cd5c9acf1abd334637072d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/drivers/firebird/Clob.cxx')
-rw-r--r--connectivity/source/drivers/firebird/Clob.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/drivers/firebird/Clob.cxx b/connectivity/source/drivers/firebird/Clob.cxx
index 2038dfc11350..64c231230884 100644
--- a/connectivity/source/drivers/firebird/Clob.cxx
+++ b/connectivity/source/drivers/firebird/Clob.cxx
@@ -101,7 +101,7 @@ OUString SAL_CALL Clob::getSubString(sal_Int64 nPosition,
if( nCharsToCopy > nLength )
nCharsToCopy = nLength;
// append relevant part of first segment
- sSegmentBuffer.append( std::u16string_view(sSegment).substr(0, nCharsToCopy) );
+ sSegmentBuffer.append( sSegment.subView(0, nCharsToCopy) );
nActLen += sSegmentBuffer.getLength();
}
}
@@ -117,7 +117,7 @@ OUString SAL_CALL Clob::getSubString(sal_Int64 nPosition,
RTL_TEXTENCODING_UTF8 );
sal_Int32 nStrLen = sSegment.getLength();
if( nActLen + nStrLen > nLength )
- sSegmentBuffer.append(std::u16string_view(sSegment).substr(0, nLength - nActLen));
+ sSegmentBuffer.append(sSegment.subView(0, nLength - nActLen));
else
sSegmentBuffer.append(sSegment);
nActLen += nStrLen;