summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-01 17:42:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-02 13:31:19 +0200
commit1927b51993fb68907a75765676179b08ab195196 (patch)
tree1b7d09c1b5e7ea945fb6ea618a4c100e8630ebb4 /filter
parent0dfa444f393a5766d36fe7d2480d0c8ec832e329 (diff)
loplugin:stringviewparam convert methods using indexOf
.. and lastIndexOf, which convert to find and rfind Change-Id: I6c4156cf904774c0d867f85a4c2785dba7593f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132445 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/xmlfilterdetect/filterdetect.cxx6
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx
index 1a3f80cb589a..db4ee2d5fe84 100644
--- a/filter/source/xmlfilterdetect/filterdetect.cxx
+++ b/filter/source/xmlfilterdetect/filterdetect.cxx
@@ -35,13 +35,13 @@ using namespace com::sun::star::beans;
namespace {
-OUString supportedByType( const OUString& clipBoardFormat, const OUString& resultString, const OUString& checkType)
+OUString supportedByType( const OUString& clipBoardFormat, std::u16string_view resultString, const OUString& checkType)
{
OUString sTypeName;
if ( clipBoardFormat.match("doctype:") )
{
- OUString tryStr = clipBoardFormat.copy(8);
- if (resultString.indexOf(tryStr) >= 0)
+ std::u16string_view tryStr = clipBoardFormat.subView(8);
+ if (resultString.find(tryStr) != std::u16string_view::npos)
{
sTypeName = checkType;
}
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index 6cbea30926fb..e130f6b552fc 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -419,7 +419,7 @@ void XMLFilterTestDialog::doExport( const Reference< XComponent >& xComp )
if( xStorable.is() )
{
OUString const ext(".xml");
- utl::TempFile aTempFile(OUString(), true, &ext);
+ utl::TempFile aTempFile(u"", true, &ext);
OUString aTempFileURL( aTempFile.GetURL() );
const application_info_impl* pAppInfo = getApplicationInfo( m_xFilterInfo->maExportService );
@@ -579,7 +579,7 @@ void XMLFilterTestDialog::import( const OUString& rURL )
if( m_xCBXDisplaySource->get_active() )
{
OUString const ext(".xml");
- TempFile aTempFile(OUString(), true, &ext);
+ TempFile aTempFile(u"", true, &ext);
OUString aTempFileURL( aTempFile.GetURL() );
Reference< XImportFilter > xImporter( mxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.documentconversion.XSLTFilter", mxContext ), UNO_QUERY );