summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-11-06 09:04:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-11-06 10:47:15 +0100
commit9e087d4a3011aa98de6151aeda9cbb40b1fd21ef (patch)
tree0d6219941df2857fd63e1d9f913214af6804fb2e /sdext
parentd746e6f7cbc9e7225b965c1b506a0050dd386e53 (diff)
loplugin:unusedvariablecheck tweak to find more stuff
but leave the tweak commented out, since it generates false positives Change-Id: Iaf3f92414d2618f8780561f98765e33e282afe0c Reviewed-on: https://gerrit.libreoffice.org/82121 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/filterdet.cxx1
-rw-r--r--sdext/source/pdfimport/inc/pdfparse.hxx5
-rw-r--r--sdext/source/pdfimport/test/pdfunzip.cxx2
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx1
4 files changed, 2 insertions, 7 deletions
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx
index 9ef8cccd6b9d..8be4b5b183b3 100644
--- a/sdext/source/pdfimport/filterdet.cxx
+++ b/sdext/source/pdfimport/filterdet.cxx
@@ -478,7 +478,6 @@ uno::Reference< io::XStream > getAdditionalStream( const OUString&
return xEmbed;
aPDFFile = OUStringToOString( aSysUPath, osl_getThreadTextEncoding() );
- pdfparse::PDFReader aParser;
std::unique_ptr<pdfparse::PDFEntry> pEntry( pdfparse::PDFReader::read( aPDFFile.getStr() ));
if( pEntry )
{
diff --git a/sdext/source/pdfimport/inc/pdfparse.hxx b/sdext/source/pdfimport/inc/pdfparse.hxx
index 719766e7db98..af5fefe3af17 100644
--- a/sdext/source/pdfimport/inc/pdfparse.hxx
+++ b/sdext/source/pdfimport/inc/pdfparse.hxx
@@ -286,10 +286,9 @@ struct PDFPart : public PDFContainer
virtual PDFEntry* clone() const override;
};
-class PDFReader
+struct PDFReader
{
-public:
- PDFReader() {}
+ PDFReader() = delete;
static std::unique_ptr<PDFEntry> read( const char* pFileName );
#ifdef _WIN32
diff --git a/sdext/source/pdfimport/test/pdfunzip.cxx b/sdext/source/pdfimport/test/pdfunzip.cxx
index e2a6602ad74a..7d27aaf3253d 100644
--- a/sdext/source/pdfimport/test/pdfunzip.cxx
+++ b/sdext/source/pdfimport/test/pdfunzip.cxx
@@ -214,8 +214,6 @@ typedef int(*PDFFileHdl)(const char*, const char*, PDFFile*);
static int handleFile( const char* pInFile, const char* pOutFile, const char* pPassword, PDFFileHdl pHdl )
{
-
- PDFReader aParser;
int nRet = 0;
std::unique_ptr<PDFEntry> pEntry = pdfparse::PDFReader::read( pInFile );
if( pEntry )
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 5ed16ac30702..abc3447cf973 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -910,7 +910,6 @@ static bool checkEncryption( const OUString& i_rPa
bool bSuccess = false;
OString aPDFFile = OUStringToOString( i_rPath, osl_getThreadTextEncoding() );
- pdfparse::PDFReader aParser;
std::unique_ptr<pdfparse::PDFEntry> pEntry( pdfparse::PDFReader::read( aPDFFile.getStr() ));
if( pEntry )
{