summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-29 11:06:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-01 08:30:18 +0200
commit5200a73627d13e2997f81b53f61e143e77e328ee (patch)
treef95c8346d061ecd0ad33d574895d18e169662785 /package
parentb90d3d316dd9c720c83180b31f6bbd7003fead78 (diff)
use more string_view in various
found by examining uses of OUString::copy() for likely places Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'package')
-rw-r--r--package/source/zippackage/ZipPackage.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index c134a9d94c5d..36dc397ca0cf 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -58,6 +58,7 @@
#include <cppuhelper/implbase.hxx>
#include <rtl/uri.hxx>
#include <rtl/random.h>
+#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <com/sun/star/io/XAsyncOutputMonitor.hpp>
@@ -602,24 +603,24 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
if ( nParam >= 0 )
{
m_aURL = aParamUrl.copy( 0, nParam );
- OUString aParam = aParamUrl.copy( nParam + 1 );
+ std::u16string_view aParam = aParamUrl.subView( nParam + 1 );
sal_Int32 nIndex = 0;
do
{
- OUString aCommand = aParam.getToken( 0, '&', nIndex );
- if ( aCommand == "repairpackage" )
+ std::u16string_view aCommand = o3tl::getToken(aParam, 0, '&', nIndex );
+ if ( aCommand == u"repairpackage" )
{
m_bForceRecovery = true;
break;
}
- else if ( aCommand == "purezip" )
+ else if ( aCommand == u"purezip" )
{
m_nFormat = embed::StorageFormats::ZIP;
m_xRootFolder->setPackageFormat_Impl( m_nFormat );
break;
}
- else if ( aCommand == "ofopxml" )
+ else if ( aCommand == u"ofopxml" )
{
m_nFormat = embed::StorageFormats::OFOPXML;
m_xRootFolder->setPackageFormat_Impl( m_nFormat );