summaryrefslogtreecommitdiffstats
path: root/connectivity/source/drivers/firebird/Clob.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/firebird/Clob.cxx')
-rw-r--r--connectivity/source/drivers/firebird/Clob.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/connectivity/source/drivers/firebird/Clob.cxx b/connectivity/source/drivers/firebird/Clob.cxx
index 2d150da912f1..6fb7092457d7 100644
--- a/connectivity/source/drivers/firebird/Clob.cxx
+++ b/connectivity/source/drivers/firebird/Clob.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include "Clob.hxx"
#include "Blob.hxx"
#include "Connection.hxx"
@@ -99,7 +103,7 @@ OUString SAL_CALL Clob::getSubString(sal_Int64 nPosition,
if( nCharsToCopy > nLength )
nCharsToCopy = nLength;
// append relevant part of first segment
- sSegmentBuffer.appendCopy( sSegment, 0, nCharsToCopy );
+ sSegmentBuffer.append( std::u16string_view(sSegment).substr(0, nCharsToCopy) );
nActLen += sSegmentBuffer.getLength();
}
}
@@ -115,7 +119,7 @@ OUString SAL_CALL Clob::getSubString(sal_Int64 nPosition,
RTL_TEXTENCODING_UTF8 );
sal_Int32 nStrLen = sSegment.getLength();
if( nActLen + nStrLen > nLength )
- sSegmentBuffer.appendCopy(sSegment, 0, nLength - nActLen);
+ sSegmentBuffer.append(std::u16string_view(sSegment).substr(0, nLength - nActLen));
else
sSegmentBuffer.append(sSegment);
nActLen += nStrLen;