summaryrefslogtreecommitdiff
path: root/oox
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 /oox
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 'oox')
-rw-r--r--oox/source/dump/dumperbase.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index a60512e5a587..06d277855c76 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -496,7 +496,7 @@ void StringHelper::appendEncString( OUStringBuffer& rStr, const OUString& rData,
if( (nBeg == 0) && (nIdx == nEnd) )
rStr.append( rData );
else
- rStr.append( std::u16string_view(rData).substr(nBeg, nIdx - nBeg) );
+ rStr.append( rData.subView(nBeg, nIdx - nBeg) );
}
// append characters to be encoded
while( (nIdx < nEnd) && (rData[ nIdx ] < 0x20) )
@@ -562,7 +562,7 @@ OUString lclTrimQuotedStringList( const OUString& rStr )
{
// seek to next quote character and add text portion to token buffer
sal_Int32 nEnd = lclIndexOf( rStr, OOX_DUMP_CFG_QUOTE, nPos );
- aToken.append( std::u16string_view(rStr).substr(nPos, nEnd - nPos) );
+ aToken.append( rStr.subView(nPos, nEnd - nPos) );
// process literal quotes
while( (nEnd + 1 < nLen) && (rStr[ nEnd ] == OOX_DUMP_CFG_QUOTE) && (rStr[ nEnd + 1 ] == OOX_DUMP_CFG_QUOTE) )
{
@@ -585,7 +585,7 @@ OUString lclTrimQuotedStringList( const OUString& rStr )
{
// find list separator, add token text to buffer
sal_Int32 nEnd = lclIndexOf( rStr, OOX_DUMP_CFG_LISTSEP, nPos );
- aBuffer.append( std::u16string_view(rStr).substr(nPos, nEnd - nPos) );
+ aBuffer.append( rStr.subView(nPos, nEnd - nPos) );
if( nEnd < nLen )
aBuffer.append( OOX_DUMP_LF );
// set current position behind list separator