summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-02 11:09:37 +0200
committerNoel Grandin <noel@peralex.com>2015-04-07 10:24:54 +0200
commite4688a3d41265946007c6c9a5c5b5742078c74a3 (patch)
treed57cd9a10d8049f0d8b85f297d1fdead673e5439
parentCoverity#1292911: Capture by reference (diff)
downloadcore-e4688a3d41265946007c6c9a5c5b5742078c74a3.tar.gz
core-e4688a3d41265946007c6c9a5c5b5742078c74a3.zip
loplugin:staticmethods
Change-Id: Ibaad2adabecb878411fdd66383bca91f034477af
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx2
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx2
-rw-r--r--helpcompiler/inc/BasCodeTagger.hxx2
-rw-r--r--helpcompiler/inc/HelpCompiler.hxx2
-rw-r--r--helpcompiler/inc/HelpLinker.hxx2
-rw-r--r--idl/inc/database.hxx4
-rw-r--r--idl/inc/object.hxx10
-rw-r--r--idl/source/objects/slot.cxx4
-rw-r--r--idl/source/prj/database.cxx2
-rw-r--r--include/helpcompiler/HelpIndexer.hxx2
-rw-r--r--include/toolkit/controls/stdtabcontrollermodel.hxx4
-rw-r--r--sdext/source/pdfimport/filterdet.cxx2
-rw-r--r--sdext/source/pdfimport/inc/pdfparse.hxx22
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfentries.cxx4
-rw-r--r--sdext/source/pdfimport/test/pdfunzip.cxx2
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx2
-rw-r--r--toolkit/source/controls/stdtabcontrollermodel.cxx4
-rw-r--r--xmlscript/source/xmlflat_imexp/xmlbas_import.hxx2
18 files changed, 37 insertions, 37 deletions
diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
index a7586fbc47a0..255ecb106138 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
@@ -133,7 +133,7 @@ OUString SAL_CALL MozillaBootstrap::getProfilePath( ::com::sun::star::mozilla::M
}
sal_Bool SAL_CALL MozillaBootstrap::isProfileLocked( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- return m_ProfileAccess->isProfileLocked(product,profileName);
+ return ProfileAccess::isProfileLocked(product,profileName);
}
sal_Bool SAL_CALL MozillaBootstrap::getProfileExists( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx
index a897453380eb..8957cee3825a 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx
@@ -95,7 +95,7 @@ namespace connectivity
::sal_Int32 getProfileCount( ::com::sun::star::mozilla::MozillaProductType product ) throw (::com::sun::star::uno::RuntimeException);
::sal_Int32 getProfileList( ::com::sun::star::mozilla::MozillaProductType product, ::com::sun::star::uno::Sequence< OUString >& list ) throw (::com::sun::star::uno::RuntimeException);
OUString getDefaultProfile( ::com::sun::star::mozilla::MozillaProductType product ) throw (::com::sun::star::uno::RuntimeException);
- bool SAL_CALL isProfileLocked( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException);
+ static bool SAL_CALL isProfileLocked( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException);
bool SAL_CALL getProfileExists( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException);
protected:
ProductStruct m_ProductProfileList[4];
diff --git a/helpcompiler/inc/BasCodeTagger.hxx b/helpcompiler/inc/BasCodeTagger.hxx
index 74b97ce1cb91..a0c7f29e7a56 100644
--- a/helpcompiler/inc/BasCodeTagger.hxx
+++ b/helpcompiler/inc/BasCodeTagger.hxx
@@ -34,7 +34,7 @@ class L10N_DLLPUBLIC BasicCodeTagger
SyntaxHighlighter m_Highlighter;
bool m_bTaggingCompleted;
void tagParagraph( xmlNodePtr paragraph );
- xmlChar* getTypeString( TokenTypes tokenType );
+ static xmlChar* getTypeString( TokenTypes tokenType );
void getBasicCodeContainerNodes();
void tagBasCodeParagraphs();
diff --git a/helpcompiler/inc/HelpCompiler.hxx b/helpcompiler/inc/HelpCompiler.hxx
index 1fbcaefcd608..6caf2da01d27 100644
--- a/helpcompiler/inc/HelpCompiler.hxx
+++ b/helpcompiler/inc/HelpCompiler.hxx
@@ -246,7 +246,7 @@ public:
const std::string &entryName, const Hashtable &bytesToAdd);
private:
xmlDocPtr getSourceDocument(const fs::path &filePath);
- void tagBasicCodeExamples(xmlDocPtr doc);
+ static void tagBasicCodeExamples(xmlDocPtr doc);
xmlDocPtr compactXhpForJar(xmlDocPtr doc);
void saveXhpForJar(xmlDocPtr doc, const fs::path &filePath);
xmlNodePtr clone(xmlNodePtr node, const std::string& appl);
diff --git a/helpcompiler/inc/HelpLinker.hxx b/helpcompiler/inc/HelpLinker.hxx
index 113b427e3e55..1ba69500db2f 100644
--- a/helpcompiler/inc/HelpLinker.hxx
+++ b/helpcompiler/inc/HelpLinker.hxx
@@ -90,7 +90,7 @@ private:
bool m_bCreateIndex;
void initIndexerPreProcessor();
void link() throw(HelpProcessingException, BasicCodeTagger::TaggerException);
- void addBookmark( FILE* pFile_DBHelp, std::string thishid,
+ static void addBookmark( FILE* pFile_DBHelp, std::string thishid,
const std::string& fileB, const std::string& anchorB,
const std::string& jarfileB, const std::string& titleB );
};
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
index 4fabd5fecbb9..4a7effb53a1c 100644
--- a/idl/inc/database.hxx
+++ b/idl/inc/database.hxx
@@ -108,10 +108,10 @@ public:
SvMetaObjectMemberStack & GetStack() { return aContextStack; }
void Write(const OString& rText);
- void WriteError(const OString& rErrWrn,
+ static void WriteError(const OString& rErrWrn,
const OString& rFileName,
const OString& rErrorText,
- sal_uLong nRow = 0, sal_uLong nColumn = 0 ) const;
+ sal_uLong nRow = 0, sal_uLong nColumn = 0 );
void WriteError( SvTokenStream & rInStm );
void SetError( const OString& rError, SvToken * pTok );
void Push( SvMetaObject * pObj );
diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx
index b0481a3ca796..1f0a0721f2c7 100644
--- a/idl/inc/object.hxx
+++ b/idl/inc/object.hxx
@@ -79,21 +79,21 @@ class SvMetaClass : public SvMetaType
SvBOOL aAutomation;
SvMetaClassRef xAutomationInterface;
- bool TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
+ bool TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
SvMetaAttribute & rAttr ) const;
- void WriteSlotStubs( const OString& rShellName,
+ static void WriteSlotStubs( const OString& rShellName,
SvSlotElementList & rSlotList,
ByteStringList & rList,
SvStream & rOutStm );
- sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase,
+ static sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase,
SvSlotElementList & rSlotList,
SvStream & rOutStm );
- sal_uInt16 WriteSlots( const OString& rShellName, sal_uInt16 nCount,
+ static sal_uInt16 WriteSlots( const OString& rShellName, sal_uInt16 nCount,
SvSlotElementList & rSlotList,
SvIdlDataBase & rBase,
SvStream & rOutStm );
- void InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>& rSuperList,
+ void InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>& rSuperList,
SvMetaClassList & rClassList,
const OString& rPrefix, SvIdlDataBase& rBase );
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index e0a895399515..affaf4a04b32 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -289,14 +289,14 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase,
bOk |= aDisableFlags.ReadSvIdl( SvHash_DisableFlags(), rInStm );
if( aGet.ReadSvIdl( SvHash_Get(), rInStm ) )
{
- rBase.WriteError( "warning", OUStringToOString(rInStm.GetFileName(), RTL_TEXTENCODING_UTF8),
+ SvIdlDataBase::WriteError( "warning", OUStringToOString(rInStm.GetFileName(), RTL_TEXTENCODING_UTF8),
"<Get> old style, use Readonly",
rInStm.GetToken()->GetLine(),
rInStm.GetToken()->GetColumn() );
}
if( aSet.ReadSvIdl( SvHash_Set(), rInStm ) )
{
- rBase.WriteError( "warning", OUStringToOString(rInStm.GetFileName(), RTL_TEXTENCODING_UTF8),
+ SvIdlDataBase::WriteError( "warning", OUStringToOString(rInStm.GetFileName(), RTL_TEXTENCODING_UTF8),
"<Set> old style, use method declaration",
rInStm.GetToken()->GetLine(),
rInStm.GetToken()->GetColumn() );
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 98d02993bb73..8cdf10d34213 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -460,7 +460,7 @@ void SvIdlDataBase::Write(const OString& rText)
void SvIdlDataBase::WriteError( const OString& rErrWrn,
const OString& rFileName,
const OString& rErrorText,
- sal_uLong nRow, sal_uLong nColumn ) const
+ sal_uLong nRow, sal_uLong nColumn )
{
// error treatment
fprintf( stderr, "\n%s --- %s: ( %ld, %ld )\n",
diff --git a/include/helpcompiler/HelpIndexer.hxx b/include/helpcompiler/HelpIndexer.hxx
index fe4da1171c92..5a73358728e0 100644
--- a/include/helpcompiler/HelpIndexer.hxx
+++ b/include/helpcompiler/HelpIndexer.hxx
@@ -81,7 +81,7 @@ class L10N_DLLPUBLIC HelpIndexer {
/**
* Create a reader for the given file, and create an "empty" reader in case the file doesn't exist.
*/
- lucene::util::Reader *helpFileReader(OUString const & path);
+ static lucene::util::Reader *helpFileReader(OUString const & path);
};
#endif
diff --git a/include/toolkit/controls/stdtabcontrollermodel.hxx b/include/toolkit/controls/stdtabcontrollermodel.hxx
index da4932374eac..3552c15a6569 100644
--- a/include/toolkit/controls/stdtabcontrollermodel.hxx
+++ b/include/toolkit/controls/stdtabcontrollermodel.hxx
@@ -94,8 +94,8 @@ protected:
::osl::Mutex& GetMutex() { return maMutex; }
sal_uInt32 ImplGetControlCount( const UnoControlModelEntryList& rList ) const;
void ImplGetControlModels( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > ** pRefs, const UnoControlModelEntryList& rList ) const;
- void ImplSetControlModels( UnoControlModelEntryList& rList, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Controls ) const;
- sal_uInt32 ImplGetControlPos( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rCtrl, const UnoControlModelEntryList& rList ) const;
+ static void ImplSetControlModels( UnoControlModelEntryList& rList, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Controls );
+ static sal_uInt32 ImplGetControlPos( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rCtrl, const UnoControlModelEntryList& rList );
public:
StdTabControllerModel();
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());
diff --git a/toolkit/source/controls/stdtabcontrollermodel.cxx b/toolkit/source/controls/stdtabcontrollermodel.cxx
index 8b95155001bf..1f2f33cc3ecb 100644
--- a/toolkit/source/controls/stdtabcontrollermodel.cxx
+++ b/toolkit/source/controls/stdtabcontrollermodel.cxx
@@ -131,7 +131,7 @@ void StdTabControllerModel::ImplGetControlModels( ::com::sun::star::uno::Referen
}
}
-void StdTabControllerModel::ImplSetControlModels( UnoControlModelEntryList& rList, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Controls ) const
+void StdTabControllerModel::ImplSetControlModels( UnoControlModelEntryList& rList, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Controls )
{
const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > * pRefs = Controls.getConstArray();
sal_uInt32 nControls = Controls.getLength();
@@ -145,7 +145,7 @@ void StdTabControllerModel::ImplSetControlModels( UnoControlModelEntryList& rLis
}
}
-sal_uInt32 StdTabControllerModel::ImplGetControlPos( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rCtrl, const UnoControlModelEntryList& rList ) const
+sal_uInt32 StdTabControllerModel::ImplGetControlPos( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rCtrl, const UnoControlModelEntryList& rList )
{
for ( size_t n = rList.size(); n; )
{
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.hxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.hxx
index b905ea9f23b4..54a9b946a68a 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_import.hxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.hxx
@@ -49,7 +49,7 @@ namespace xmlscript
OUString m_aLocalName;
::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes > m_xAttributes;
- bool getBoolAttr( sal_Bool* pRet, const OUString& rAttrName,
+ static bool getBoolAttr( sal_Bool* pRet, const OUString& rAttrName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes >& xAttributes,
sal_Int32 nUid );