diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-02 11:09:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-07 10:24:54 +0200 |
commit | e4688a3d41265946007c6c9a5c5b5742078c74a3 (patch) | |
tree | d57cd9a10d8049f0d8b85f297d1fdead673e5439 /sdext | |
parent | 82b71d4764c12eb173f6d98b94d6bbbc5d296d7e (diff) |
loplugin:staticmethods
Change-Id: Ibaad2adabecb878411fdd66383bca91f034477af
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/filterdet.cxx | 2 | ||||
-rw-r--r-- | sdext/source/pdfimport/inc/pdfparse.hxx | 22 | ||||
-rw-r--r-- | sdext/source/pdfimport/pdfparse/pdfentries.cxx | 4 | ||||
-rw-r--r-- | sdext/source/pdfimport/test/pdfunzip.cxx | 2 | ||||
-rw-r--r-- | sdext/source/pdfimport/wrapper/wrapper.cxx | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index 33c3f44c4af9..23bb0c91ab24 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -499,7 +499,7 @@ uno::Reference< io::XStream > getAdditionalStream( const OUString& aPDFFile = OUStringToOString( aSysUPath, osl_getThreadTextEncoding() ); pdfparse::PDFReader aParser; - boost::scoped_ptr<pdfparse::PDFEntry> pEntry( aParser.read( aPDFFile.getStr() )); + boost::scoped_ptr<pdfparse::PDFEntry> pEntry( pdfparse::PDFReader::read( aPDFFile.getStr() )); if( pEntry ) { pdfparse::PDFFile* pPDFFile = dynamic_cast<pdfparse::PDFFile*>(pEntry.get()); diff --git a/sdext/source/pdfimport/inc/pdfparse.hxx b/sdext/source/pdfimport/inc/pdfparse.hxx index 2fb3891b744e..192f606a7d3c 100644 --- a/sdext/source/pdfimport/inc/pdfparse.hxx +++ b/sdext/source/pdfimport/inc/pdfparse.hxx @@ -34,7 +34,7 @@ struct EmitImplData; struct PDFContainer; class EmitContext { - public: +public: virtual bool write( const void* pBuf, unsigned int nLen ) = 0; virtual unsigned int getCurPos() = 0; virtual bool copyOrigBytes( unsigned int nOrigOffset, unsigned int nLen ) = 0; @@ -48,7 +48,7 @@ class EmitContext // set this to decrypt the PDF file bool m_bDecrypt; - private: +private: friend struct PDFEntry; EmitImplData* m_pImplData; }; @@ -61,9 +61,9 @@ struct PDFEntry virtual bool emit( EmitContext& rWriteContext ) const = 0; virtual PDFEntry* clone() const = 0; - protected: - EmitImplData* getEmitData( EmitContext& rContext ) const; - void setEmitData( EmitContext& rContext, EmitImplData* pNewEmitData ) const; +protected: + static EmitImplData* getEmitData( EmitContext& rContext ); + static void setEmitData( EmitContext& rContext, EmitImplData* pNewEmitData ); }; struct PDFComment : public PDFEntry @@ -226,10 +226,10 @@ struct PDFTrailer : public PDFContainer struct PDFFileImplData; struct PDFFile : public PDFContainer { - private: +private: mutable PDFFileImplData* m_pData; PDFFileImplData* impl_getData() const; - public: +public: unsigned int m_nMajor; // PDF major unsigned int m_nMinor; // PDF minor @@ -275,7 +275,7 @@ struct PDFObject : public PDFContainer // writes only the contained stream, deflated if necessary bool writeStream( EmitContext& rContext, const PDFFile* pPDFFile ) const; - private: +private: // returns true if stream is deflated // fills *ppStream and *pBytes with start of stream and count of bytes // memory returned in *ppStream must be freed with rtl_freeMemory afterwards @@ -293,13 +293,13 @@ struct PDFPart : public PDFContainer class PDFReader { - public: +public: PDFReader() {} ~PDFReader() {} - PDFEntry* read( const char* pFileName ); + static PDFEntry* read( const char* pFileName ); #ifdef WIN32 - PDFEntry* read( const char* pBuffer, unsigned int nLen ); + static PDFEntry* read( const char* pBuffer, unsigned int nLen ); #endif }; diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx index 7f7bb7f0ed5b..a01bec327ac9 100644 --- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx @@ -110,12 +110,12 @@ PDFEntry::~PDFEntry() { } -EmitImplData* PDFEntry::getEmitData( EmitContext& rContext ) const +EmitImplData* PDFEntry::getEmitData( EmitContext& rContext ) { return rContext.m_pImplData; } -void PDFEntry::setEmitData( EmitContext& rContext, EmitImplData* pNewEmitData ) const +void PDFEntry::setEmitData( EmitContext& rContext, EmitImplData* pNewEmitData ) { if( rContext.m_pImplData && rContext.m_pImplData != pNewEmitData ) delete rContext.m_pImplData; diff --git a/sdext/source/pdfimport/test/pdfunzip.cxx b/sdext/source/pdfimport/test/pdfunzip.cxx index f86ae2b2b373..1aa5a6cd8d41 100644 --- a/sdext/source/pdfimport/test/pdfunzip.cxx +++ b/sdext/source/pdfimport/test/pdfunzip.cxx @@ -217,7 +217,7 @@ int handleFile( const char* pInFile, const char* pOutFile, const char* pPassword PDFReader aParser; int nRet = 0; - PDFEntry* pEntry = aParser.read( pInFile ); + PDFEntry* pEntry = pdfparse::PDFReader::read( pInFile ); if( pEntry ) { PDFFile* pPDFFile = dynamic_cast<PDFFile*>(pEntry); diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index c908fb996580..480a901b250d 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -945,7 +945,7 @@ static bool checkEncryption( const OUString& i_rPa aPDFFile = OUStringToOString( i_rPath, osl_getThreadTextEncoding() ); pdfparse::PDFReader aParser; - boost::scoped_ptr<pdfparse::PDFEntry> pEntry( aParser.read( aPDFFile.getStr() )); + boost::scoped_ptr<pdfparse::PDFEntry> pEntry( pdfparse::PDFReader::read( aPDFFile.getStr() )); if( pEntry ) { pdfparse::PDFFile* pPDFFile = dynamic_cast<pdfparse::PDFFile*>(pEntry.get()); |