summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/core/relationshandler.cxx6
-rw-r--r--oox/source/dump/dumperbase.cxx8
2 files changed, 10 insertions, 4 deletions
diff --git a/oox/source/core/relationshandler.cxx b/oox/source/core/relationshandler.cxx
index 16eb928ded2a..9b7675ff2cb1 100644
--- a/oox/source/core/relationshandler.cxx
+++ b/oox/source/core/relationshandler.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <oox/core/relationshandler.hxx>
#include <rtl/ustrbuf.hxx>
@@ -44,7 +48,7 @@ OUString lclGetRelationsPath( const OUString& rFragmentPath )
return
OUStringBuffer( rFragmentPath.copy( 0, nPathLen ) ). // file path including slash
append( "_rels/" ). // additional '_rels/' path
- appendCopy( rFragmentPath, nPathLen ). // file name after path
+ append( std::u16string_view(rFragmentPath).substr(nPathLen) ). // file name after path
append( ".rels" ). // '.rels' suffix
makeStringAndClear();
}
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index d754c6fa9cd9..77b964b43b1e 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -20,6 +20,8 @@
#include <oox/dump/dumperbase.hxx>
#include <algorithm>
+#include <string_view>
+
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/io/TextOutputStream.hpp>
@@ -496,7 +498,7 @@ void StringHelper::appendEncString( OUStringBuffer& rStr, const OUString& rData,
if( (nBeg == 0) && (nIdx == nEnd) )
rStr.append( rData );
else
- rStr.appendCopy( rData, nBeg, nIdx - nBeg );
+ rStr.append( std::u16string_view(rData).substr(nBeg, nIdx - nBeg) );
}
// append characters to be encoded
while( (nIdx < nEnd) && (rData[ nIdx ] < 0x20) )
@@ -562,7 +564,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.appendCopy( rStr, nPos, nEnd - nPos );
+ aToken.append( std::u16string_view(rStr).substr(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 +587,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.appendCopy( rStr, nPos, nEnd - nPos );
+ aBuffer.append( std::u16string_view(rStr).substr(nPos, nEnd - nPos) );
if( nEnd < nLen )
aBuffer.append( OOX_DUMP_LF );
// set current position behind list separator