diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-09-22 20:01:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-09-22 21:14:15 +0200 |
commit | ea29e9936a3e628f95ca4ae1d5816adfce87318f (patch) | |
tree | 85a322466328e68c98ad2fe6f0231225724dd9c4 /sfx2/source/doc/graphhelp.cxx | |
parent | 8f2f2a8d131eef60164c0586fb73b69fd950f15d (diff) |
Extend loplugin:stringviewparam to starts/endsWith: sfx2
Change-Id: Icac2c5877059208ed348aa824071803e415f374f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122482
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2/source/doc/graphhelp.cxx')
-rw-r--r-- | sfx2/source/doc/graphhelp.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index cc1299c01b1c..6371d10112e4 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -39,6 +39,7 @@ #include <unotools/ucbstreamhelper.hxx> #include <comphelper/processfactory.hxx> #include <o3tl/char16_t2wchar_t.hxx> +#include <o3tl/string_view.hxx> #include "graphhelp.hxx" #include <bitmaps.hlst> @@ -235,27 +236,27 @@ bool GraphicHelper::getThumbnailReplacement_Impl(std::u16string_view rResID, con } // static -OUString GraphicHelper::getThumbnailReplacementIDByFactoryName_Impl( const OUString& aFactoryShortName ) +OUString GraphicHelper::getThumbnailReplacementIDByFactoryName_Impl( std::u16string_view aFactoryShortName ) { OUString sResult; - if ( aFactoryShortName == "scalc" ) + if ( aFactoryShortName == u"scalc" ) { sResult = BMP_128X128_CALC_DOC; } - else if ( aFactoryShortName == "sdraw" ) + else if ( aFactoryShortName == u"sdraw" ) { sResult = BMP_128X128_DRAW_DOC; } - else if ( aFactoryShortName == "simpress" ) + else if ( aFactoryShortName == u"simpress" ) { sResult = BMP_128X128_IMPRESS_DOC; } - else if ( aFactoryShortName == "smath" ) + else if ( aFactoryShortName == u"smath" ) { sResult = BMP_128X128_MATH_DOC; } - else if ( aFactoryShortName == "swriter" || aFactoryShortName.startsWith("swriter/") ) + else if ( aFactoryShortName == u"swriter" || o3tl::starts_with(aFactoryShortName, u"swriter/") ) { sResult = BMP_128X128_WRITER_DOC; } |