summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-04-12 10:50:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-14 07:54:28 +0200
commitbc2101646bc6e63944c42500af5a15134b9b2d17 (patch)
treeca1da50da2e3e76eef650a1ae3956c16e0a19f33 /sot
parentad97694737c99889bc0eb21efccb83768d510361 (diff)
loplugin:stringviewparam improvements
improve the check by checking for methods that exclude using string_view, rather than checking for methods that __can__ use string_view, which leads to exposing some holes in our o3tl/string_view.hxx coverage. Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/base/exchange.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 582ca49c5598..9777c3117917 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -381,18 +381,18 @@ OUString SotExchange::GetFormatMimeType( SotClipboardFormatId nFormat )
|*
*************************************************************************/
-SotClipboardFormatId SotExchange::GetFormatIdFromMimeType( const OUString& rMimeType )
+SotClipboardFormatId SotExchange::GetFormatIdFromMimeType( std::u16string_view rMimeType )
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl();
for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= SotClipboardFormatId::FILE_LIST; ++i )
- if( rMimeType.equals( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) )
+ if( rMimeType == pFormatArray_Impl[ static_cast<int>(i) ].pMimeType )
return i;
// BM: the chart format 105 ("StarChartDocument 5.0") was written
// only into 5.1 chart documents - in 5.0 and 5.2 it was 42 ("StarChart 5.0")
// The registry only contains the entry for the 42 format id.
for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= SotClipboardFormatId::USER_END; ++i )
- if( rMimeType.equals( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) )
+ if( rMimeType == pFormatArray_Impl[ static_cast<int>(i) ].pMimeType )
return ( (i == SotClipboardFormatId::STARCHARTDOCUMENT_50)
? SotClipboardFormatId::STARCHART_50
: i );