diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-15 12:25:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-19 18:31:10 +0200 |
commit | ab699bfdb3375f7142a50cc35322e2924c9e5945 (patch) | |
tree | 8f935378a1ee272f4316a50f902e214d50ce8cc6 /sw | |
parent | f393785a146433cccd5bbecf1e49b5f1485ec5a7 (diff) |
new loplugin:stringviewvar looks for OUString vars that can be
... that can be string_view
Change-Id: I0ddf66725e08b58e866a764f57200dd188b9f639
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133066
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/graphic/ndgrf.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 3eabac3a84b5..82cbb57c12f3 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -577,8 +577,8 @@ void SwGrfNode::InsertLink( std::u16string_view rGrfName, const OUString& rFltNa { sal_Int32 nTmp = 0; const OUString sApp{ o3tl::getToken(rGrfName, 0, sfx2::cTokenSeparator, nTmp ) }; - const OUString sTopic{ o3tl::getToken(rGrfName, 0, sfx2::cTokenSeparator, nTmp ) }; - const OUString sItem{ rGrfName.substr( nTmp ) }; + const std::u16string_view sTopic{ o3tl::getToken(rGrfName, 0, sfx2::cTokenSeparator, nTmp ) }; + const std::u16string_view sItem{ rGrfName.substr( nTmp ) }; rIDLA.GetLinkManager().InsertDDELink( mxLink.get(), sApp, sTopic, sItem ); } else diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index b40633119673..2c19733d66b3 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -2057,7 +2057,7 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken ) if( ' ' == aToken[ 3 ] && ' ' == aToken[ aToken.getLength()-3 ] ) { - OUString aComment( aToken.subView( 3, aToken.getLength()-5 ) ); + std::u16string_view aComment( aToken.subView( 3, aToken.getLength()-5 ) ); InsertComment(comphelper::string::strip(aComment, ' ')); } else diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 88df3b95f46d..c80ea4972e9a 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -8507,7 +8507,7 @@ void DocxAttributeOutput::HiddenField(const SwField& rField) OUString aTrueFalse = rField.GetPar2(); sal_Int32 nPos = aTrueFalse.indexOf('|'); OUString aTrue; - OUString aFalse; + std::u16string_view aFalse; if (nPos == -1) { aTrue = aTrueFalse; |