diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-07 10:02:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-09 20:51:44 +0200 |
commit | eaf071397a1ff30536616f2ed76051f77fd38ed6 (patch) | |
tree | ce55cdc75a0826c54b6b60458a028251f11fcb78 /sdext | |
parent | 1e79befa61a08de7a1ddaccb6c435dbb8015c063 (diff) |
new loplugin:unnecessarygetstr
which prevents constructing unnecessary temporaries via getStr()
Change-Id: I9ca70893a10e954b5ee0e6ad6098660ee24c2bef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150170
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/filterdet.cxx | 4 | ||||
-rw-r--r-- | sdext/source/pdfimport/wrapper/wrapper.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index f6356d8676e8..ef29e8a2c022 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -591,7 +591,7 @@ uno::Reference< io::XStream > getAdditionalStream( const OUString& { OString aIsoPwd = OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); - bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() ); + bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd ); } if( ! bAuthenticated ) { @@ -616,7 +616,7 @@ uno::Reference< io::XStream > getAdditionalStream( const OUString& bEntered = getPassword( xIntHdl, io_rPwd, ! bEntered, aDocName ); OString aIsoPwd = OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); - bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() ); + bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd ); } while( bEntered && ! bAuthenticated ); } diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index e3e1c3aa8d04..f75821788d0f 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -929,7 +929,7 @@ static bool checkEncryption( std::u16string_view i_rPa { OString aIsoPwd = OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); - bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() ); + bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd ); } if( bAuthenticated ) bSuccess = true; @@ -943,7 +943,7 @@ static bool checkEncryption( std::u16string_view i_rPa bEntered = getPassword( i_xIHdl, io_rPwd, ! bEntered, i_rDocName ); OString aIsoPwd = OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); - bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() ); + bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd ); } while( bEntered && ! bAuthenticated ); } |