From 03e6cc9130864adcea5a1ae5440f24a9c128e8d6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 29 Apr 2015 15:57:22 +0200 Subject: loplugin:staticmethods Change-Id: I912187d6c481a2ba61fed9c01998bf6f3c08a6a0 --- sc/inc/afmtuno.hxx | 4 ++-- sc/inc/appoptio.hxx | 14 +++++++------- sc/inc/arealink.hxx | 2 +- sc/inc/chgtrack.hxx | 2 +- sc/inc/clkernelthread.hxx | 4 ++-- sc/inc/column.hxx | 4 ++-- sc/inc/dapiuno.hxx | 4 ++-- sc/inc/defaultsoptions.hxx | 2 +- sc/inc/docoptio.hxx | 4 ++-- sc/inc/document.hxx | 6 +++--- sc/inc/dpcache.hxx | 2 +- sc/inc/dpfilteredcache.hxx | 2 +- sc/inc/dpobject.hxx | 2 +- sc/inc/dptabdat.hxx | 2 +- sc/inc/externalrefmgr.hxx | 2 +- sc/inc/filtopt.hxx | 2 +- sc/inc/formulaopt.hxx | 4 ++-- sc/inc/inputopt.hxx | 2 +- sc/inc/printopt.hxx | 2 +- sc/inc/rangeutl.hxx | 24 ++++++++++++------------ sc/inc/scmod.hxx | 6 +++--- sc/inc/stlalgorithm.hxx | 10 +++++----- sc/inc/table.hxx | 2 +- sc/inc/viewopti.hxx | 6 +++--- 24 files changed, 57 insertions(+), 57 deletions(-) (limited to 'sc/inc') diff --git a/sc/inc/afmtuno.hxx b/sc/inc/afmtuno.hxx index ca2b53205460..7c38d97f57f9 100644 --- a/sc/inc/afmtuno.hxx +++ b/sc/inc/afmtuno.hxx @@ -51,8 +51,8 @@ class ScAutoFormatsObj : public ::cppu::WeakImplHelper4< ::com::sun::star::lang::XServiceInfo > { private: - ScAutoFormatObj* GetObjectByIndex_Impl(sal_uInt16 nIndex); - ScAutoFormatObj* GetObjectByName_Impl(const OUString& aName); + static ScAutoFormatObj* GetObjectByIndex_Impl(sal_uInt16 nIndex); + static ScAutoFormatObj* GetObjectByName_Impl(const OUString& aName); public: ScAutoFormatsObj(); diff --git a/sc/inc/appoptio.hxx b/sc/inc/appoptio.hxx index 5399308a4646..c73af70c2b8c 100644 --- a/sc/inc/appoptio.hxx +++ b/sc/inc/appoptio.hxx @@ -124,13 +124,13 @@ class ScAppCfg : public ScAppOptions DECL_LINK( MiscCommitHdl, void* ); DECL_LINK( CompatCommitHdl, void* ); - com::sun::star::uno::Sequence GetLayoutPropertyNames(); - com::sun::star::uno::Sequence GetInputPropertyNames(); - com::sun::star::uno::Sequence GetRevisionPropertyNames(); - com::sun::star::uno::Sequence GetContentPropertyNames(); - com::sun::star::uno::Sequence GetSortListPropertyNames(); - com::sun::star::uno::Sequence GetMiscPropertyNames(); - com::sun::star::uno::Sequence GetCompatPropertyNames(); + static com::sun::star::uno::Sequence GetLayoutPropertyNames(); + static com::sun::star::uno::Sequence GetInputPropertyNames(); + static com::sun::star::uno::Sequence GetRevisionPropertyNames(); + static com::sun::star::uno::Sequence GetContentPropertyNames(); + static com::sun::star::uno::Sequence GetSortListPropertyNames(); + static com::sun::star::uno::Sequence GetMiscPropertyNames(); + static com::sun::star::uno::Sequence GetCompatPropertyNames(); public: ScAppCfg(); diff --git a/sc/inc/arealink.hxx b/sc/inc/arealink.hxx index 935178bd4b46..129e884e4ce8 100644 --- a/sc/inc/arealink.hxx +++ b/sc/inc/arealink.hxx @@ -41,7 +41,7 @@ private: bool bAddUndo; bool bInCreate; bool bDoInsert; // is set to FALSE for first update - bool FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const OUString& rAreaName ); + static bool FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const OUString& rAreaName ); public: TYPEINFO_OVERRIDE(); diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx index 8c4b695a6dd3..afc28efd3185 100644 --- a/sc/inc/chgtrack.hxx +++ b/sc/inc/chgtrack.hxx @@ -1228,7 +1228,7 @@ public: void AppendCloned( ScChangeAction* pAppend ); SC_DLLPUBLIC ScChangeTrack* Clone( ScDocument* pDocument ) const; - void MergeActionState( ScChangeAction* pAct, const ScChangeAction* pOtherAct ); + static void MergeActionState( ScChangeAction* pAct, const ScChangeAction* pOtherAct ); }; #endif diff --git a/sc/inc/clkernelthread.hxx b/sc/inc/clkernelthread.hxx index 154ec48ba55a..358da116addd 100644 --- a/sc/inc/clkernelthread.hxx +++ b/sc/inc/clkernelthread.hxx @@ -47,8 +47,8 @@ private: osl::Mutex maQueueMutex; osl::Condition maQueueCondition; std::queue maQueue; - void produce(); - void consume(); + static void produce(); + static void consume(); }; } diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index d7bc4be8a5c7..9d9679308d49 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -193,7 +193,7 @@ public: ScRefCellValue GetCellValue( SCROW nRow ) const; ScRefCellValue GetCellValue( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow ) const; - ScRefCellValue GetCellValue( const sc::CellStoreType::const_iterator& itPos, size_t nOffset ) const; + static ScRefCellValue GetCellValue( const sc::CellStoreType::const_iterator& itPos, size_t nOffset ); const sc::CellTextAttr* GetCellTextAttr( SCROW nRow ) const; const sc::CellTextAttr* GetCellTextAttr( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow ) const; @@ -610,7 +610,7 @@ public: void InterpretDirtyCells( SCROW nRow1, SCROW nRow2 ); - void JoinNewFormulaCell( const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell ) const; + static void JoinNewFormulaCell( const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell ); /** * Detach a formula cell that's about to be deleted, or removed from diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx index 3052b3760a65..09ee64ca1438 100644 --- a/sc/inc/dapiuno.hxx +++ b/sc/inc/dapiuno.hxx @@ -572,7 +572,7 @@ public: void setFunction(com::sun::star::sheet::GeneralFunction Function); com::sun::star::uno::Sequence< com::sun::star::sheet::GeneralFunction > getSubtotals() const; void setSubtotals(const com::sun::star::uno::Sequence< com::sun::star::sheet::GeneralFunction >& rFunctions); - OUString getCurrentPage() const; + static OUString getCurrentPage(); void setCurrentPage(const OUString& sPage); void setUseCurrentPage(bool bUse); const com::sun::star::sheet::DataPilotFieldAutoShowInfo* getAutoShowInfo(); @@ -593,7 +593,7 @@ public: void setGroupInfo(const com::sun::star::sheet::DataPilotFieldGroupInfo* pInfo); // XDataPilotFieldGrouping - bool HasString(const com::sun::star::uno::Sequence< OUString >& aItems, const OUString& aString); + static bool HasString(const com::sun::star::uno::Sequence< OUString >& aItems, const OUString& aString); virtual com::sun::star::uno::Reference < com::sun::star::sheet::XDataPilotField > SAL_CALL createNameGroup(const com::sun::star::uno::Sequence< OUString >& aItems) throw (::com::sun::star::uno::RuntimeException, diff --git a/sc/inc/defaultsoptions.hxx b/sc/inc/defaultsoptions.hxx index 700e14408787..3624c04740da 100644 --- a/sc/inc/defaultsoptions.hxx +++ b/sc/inc/defaultsoptions.hxx @@ -65,7 +65,7 @@ private: class ScDefaultsCfg : public ScDefaultsOptions, public utl::ConfigItem { private: - com::sun::star::uno::Sequence GetPropertyNames(); + static com::sun::star::uno::Sequence GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; public: diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx index 3a23fa0104b4..6c0136f12f72 100644 --- a/sc/inc/docoptio.hxx +++ b/sc/inc/docoptio.hxx @@ -170,8 +170,8 @@ class ScDocCfg : public ScDocOptions DECL_LINK( CalcCommitHdl, void* ); DECL_LINK( LayoutCommitHdl, void* ); - com::sun::star::uno::Sequence GetCalcPropertyNames(); - com::sun::star::uno::Sequence GetLayoutPropertyNames(); + static com::sun::star::uno::Sequence GetCalcPropertyNames(); + static com::sun::star::uno::Sequence GetLayoutPropertyNames(); public: ScDocCfg(); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index e5e6a5b4363d..910f4d2ee884 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -777,7 +777,7 @@ public: sal_Int64 GetNewUnoId() { return ++nUnoObjectId; } void AddUnoRefChange( sal_Int64 nId, const ScRangeList& rOldRanges ); - bool IsChart( const SdrObject* pObject ); + static bool IsChart( const SdrObject* pObject ); SC_DLLPUBLIC void UpdateAllCharts(); void UpdateChartRef( UpdateRefMode eUpdateRefMode, @@ -1793,10 +1793,10 @@ public: bool GetHasMacroFunc() const { return bHasMacroFunc; } void SetHasMacroFunc(bool bSet) { bHasMacroFunc = bSet; } - bool CheckMacroWarn(); + static bool CheckMacroWarn(); void SetRangeOverflowType(sal_uInt32 nType) { nRangeOverflowType = nType; } - bool HasRangeOverflow() const { return nRangeOverflowType != 0; } + bool HasRangeOverflow() const { return nRangeOverflowType != 0; } SC_DLLPUBLIC sal_uInt32 GetRangeOverflowType() const { return nRangeOverflowType; } // for broadcasting/listening diff --git a/sc/inc/dpcache.hxx b/sc/inc/dpcache.hxx index e97a209dcbf3..863b217241af 100644 --- a/sc/inc/dpcache.hxx +++ b/sc/inc/dpcache.hxx @@ -154,7 +154,7 @@ public: sal_uLong GetNumberFormat( long nDim ) const; bool IsDateDimension( long nDim ) const ; long GetDimMemberCount(long nDim) const; - SCROW GetOrder( long nDim, SCROW nIndex ) const; + static SCROW GetOrder( long nDim, SCROW nIndex ); const IndexArrayType* GetFieldIndexArray( size_t nDim ) const; const ItemsType& GetDimMemberValues( SCCOL nDim ) const; diff --git a/sc/inc/dpfilteredcache.hxx b/sc/inc/dpfilteredcache.hxx index 8bd1a4104c5c..8ec5f8bd19fc 100644 --- a/sc/inc/dpfilteredcache.hxx +++ b/sc/inc/dpfilteredcache.hxx @@ -140,7 +140,7 @@ public: ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& rTabData, const std::unordered_set& rRepeatIfEmptyDims); - SCROW getOrder(long nDim, SCROW nIndex) const; + static SCROW getOrder(long nDim, SCROW nIndex); void clear(); bool empty() const; diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index 46e20001be0b..9004151b6d8a 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -356,7 +356,7 @@ public: ScDPCache* getExistingCache( sal_Int32 nSdbType, const OUString& rDBName, const OUString& rCommand); - com::sun::star::uno::Reference createRowSet( + static com::sun::star::uno::Reference createRowSet( sal_Int32 nSdbType, const OUString& rDBName, const OUString& rCommand); void updateCache( diff --git a/sc/inc/dptabdat.hxx b/sc/inc/dptabdat.hxx index 024003d709dd..0a455d95db7b 100644 --- a/sc/inc/dptabdat.hxx +++ b/sc/inc/dptabdat.hxx @@ -160,7 +160,7 @@ protected: }; void FillRowDataFromCacheTable(sal_Int32 nRow, const ScDPFilteredCache& rCacheTable, const CalcInfo& rInfo, CalcRowData& rData); - void ProcessRowData(CalcInfo& rInfo, const CalcRowData& rData, bool bAutoShow); + static void ProcessRowData(CalcInfo& rInfo, const CalcRowData& rData, bool bAutoShow); void CalcResultsFromCacheTable(const ScDPFilteredCache& rCacheTable, CalcInfo& rInfo, bool bAutoShow); private: diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index f26526419207..8f680e50d1fc 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -745,7 +745,7 @@ private: * * @return range name token array */ - ScExternalRefCache::TokenArrayRef getRangeNameTokensFromSrcDoc( + static ScExternalRefCache::TokenArrayRef getRangeNameTokensFromSrcDoc( sal_uInt16 nFileId, ScDocument* pSrcDoc, OUString& rName); ScDocument* getInMemorySrcDocument(sal_uInt16 nFileId); diff --git a/sc/inc/filtopt.hxx b/sc/inc/filtopt.hxx index d080a6683ae2..a9381cee3702 100644 --- a/sc/inc/filtopt.hxx +++ b/sc/inc/filtopt.hxx @@ -32,7 +32,7 @@ private: double fExcelColScale; double fExcelRowScale; - com::sun::star::uno::Sequence GetPropertyNames(); + static com::sun::star::uno::Sequence GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx index 59ce099aab05..5b71b2a81a25 100644 --- a/sc/inc/formulaopt.hxx +++ b/sc/inc/formulaopt.hxx @@ -101,8 +101,8 @@ private: class ScFormulaCfg : public ScFormulaOptions, public utl::ConfigItem { typedef std::map PropsToIds; - com::sun::star::uno::Sequence GetPropertyNames(); - ScFormulaCfg::PropsToIds GetPropNamesToId(); + static com::sun::star::uno::Sequence GetPropertyNames(); + static ScFormulaCfg::PropsToIds GetPropNamesToId(); void UpdateFromProperties( const com::sun::star::uno::Sequence& rNames ); virtual void ImplCommit() SAL_OVERRIDE; diff --git a/sc/inc/inputopt.hxx b/sc/inc/inputopt.hxx index cd82ef0d5336..e2f6b8d91954 100644 --- a/sc/inc/inputopt.hxx +++ b/sc/inc/inputopt.hxx @@ -79,7 +79,7 @@ public: class ScInputCfg : public ScInputOptions, public utl::ConfigItem { - com::sun::star::uno::Sequence GetPropertyNames(); + static com::sun::star::uno::Sequence GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx index ab3fe003a812..2bd348aac885 100644 --- a/sc/inc/printopt.hxx +++ b/sc/inc/printopt.hxx @@ -75,7 +75,7 @@ private: class ScPrintCfg : public ScPrintOptions, public utl::ConfigItem { private: - com::sun::star::uno::Sequence GetPropertyNames(); + static com::sun::star::uno::Sequence GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx index 4da7e9f42ba0..90e5873820f9 100644 --- a/sc/inc/rangeutl.hxx +++ b/sc/inc/rangeutl.hxx @@ -44,43 +44,43 @@ public: ScRangeUtil() {} ~ScRangeUtil() {} - bool MakeArea ( const OUString& rAreaStr, + static bool MakeArea ( const OUString& rAreaStr, ScArea& rArea, ScDocument* pDoc, SCTAB nTab, - ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ) const; + ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ); - void CutPosString ( const OUString& theAreaStr, - OUString& thePosStr ) const; + static void CutPosString ( const OUString& theAreaStr, + OUString& thePosStr ); - bool IsAbsTabArea ( const OUString& rAreaStr, + static bool IsAbsTabArea ( const OUString& rAreaStr, ScDocument* pDoc, ScArea*** pppAreas = 0, sal_uInt16* pAreaCount = 0, bool bAcceptCellRef = false, - ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ) const; + ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ); - bool IsAbsArea ( const OUString& rAreaStr, + static bool IsAbsArea ( const OUString& rAreaStr, ScDocument* pDoc, SCTAB nTab, OUString* pCompleteStr = 0, ScRefAddress* pStartPos = 0, ScRefAddress* pEndPos = 0, - ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ) const; + ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ); - bool IsAbsPos ( const OUString& rPosStr, + static bool IsAbsPos ( const OUString& rPosStr, ScDocument* pDoc, SCTAB nTab, OUString* pCompleteStr = 0, ScRefAddress* pPosTripel = 0, - ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ) const; + ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ); - bool MakeRangeFromName ( const OUString& rName, + static bool MakeRangeFromName( const OUString& rName, ScDocument* pDoc, SCTAB nCurTab, ScRange& rRange, RutlNameScope eScope=RUTL_NAMES, - ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ) const; + ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ); }; class SC_DLLPUBLIC ScRangeStringConverter diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx index 31d90b6b00d8..f51949b0596e 100644 --- a/sc/inc/scmod.hxx +++ b/sc/inc/scmod.hxx @@ -137,7 +137,7 @@ public: void Execute( SfxRequest& rReq ); void GetState( SfxItemSet& rSet ); - void HideDisabledSlots( SfxItemSet& rSet ); + static void HideDisabledSlots( SfxItemSet& rSet ); void AnythingChanged(); @@ -154,7 +154,7 @@ public: const ScClipData& GetClipData() const { return *mpClipData;} void SetClipObject( ScTransferObj* pCellObj, ScDrawTransferObj* pDrawObj ); - ScDocument* GetClipDoc(); // called from document - should be removed later + static ScDocument* GetClipDoc(); // called from document - should be removed later // X selection: ScSelectionTransferObj* GetSelectionTransfer() const { return pSelTransfer; } @@ -185,7 +185,7 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO SC_DLLPUBLIC void SetInputOptions ( const ScInputOptions& rOpt ); void SetPrintOptions ( const ScPrintOptions& rOpt ); void InsertEntryToLRUList(sal_uInt16 nFIndex); - void RecentFunctionsChanged(); + static void RecentFunctionsChanged(); static void GetSpellSettings( sal_uInt16& rDefLang, sal_uInt16& rCjkLang, sal_uInt16& rCtlLang, bool& rAutoSpell ); diff --git a/sc/inc/stlalgorithm.hxx b/sc/inc/stlalgorithm.hxx index 6446097ed57b..7cc5eebafece 100644 --- a/sc/inc/stlalgorithm.hxx +++ b/sc/inc/stlalgorithm.hxx @@ -48,14 +48,14 @@ public: template AlignedAllocator(const AlignedAllocator<_Type2,_Alignment>&) {} - void construct(T* p, const value_type& val) { new(p) value_type(val); } - void destroy(T* p) + static void construct(T* p, const value_type& val) { new(p) value_type(val); } + static void destroy(T* p) { p->~value_type(); (void)p; // avoid bogus MSVC '12 "unreferenced formal parameter" warning } - size_type max_size() const + static size_type max_size() { return std::numeric_limits::max() / sizeof(value_type); } @@ -63,12 +63,12 @@ public: bool operator== (const AlignedAllocator&) const { return true; } bool operator!= (const AlignedAllocator&) const { return false; } - pointer allocate(size_type n) + static pointer allocate(size_type n) { return static_cast(rtl_allocateAlignedMemory(_Alignment, n*sizeof(value_type))); } - void deallocate(pointer p, size_type) + static void deallocate(pointer p, size_type) { rtl_freeAlignedMemory(p); } diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 2b37a283849b..7454188f04a7 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -1052,7 +1052,7 @@ private: // use the global sort parameter: bool IsSorted(SCCOLROW nStart, SCCOLROW nEnd) const; - void DecoladeRow( ScSortInfoArray*, SCROW nRow1, SCROW nRow2 ); + static void DecoladeRow( ScSortInfoArray*, SCROW nRow1, SCROW nRow2 ); short CompareCell( sal_uInt16 nSort, ScRefCellValue& rCell1, SCCOL nCell1Col, SCROW nCell1Row, diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx index c4104de139a2..82756e5193b5 100644 --- a/sc/inc/viewopti.hxx +++ b/sc/inc/viewopti.hxx @@ -141,9 +141,9 @@ class ScViewCfg : public ScViewOptions DECL_LINK( DisplayCommitHdl, void* ); DECL_LINK( GridCommitHdl, void* ); - com::sun::star::uno::Sequence GetLayoutPropertyNames(); - com::sun::star::uno::Sequence GetDisplayPropertyNames(); - com::sun::star::uno::Sequence GetGridPropertyNames(); + static com::sun::star::uno::Sequence GetLayoutPropertyNames(); + static com::sun::star::uno::Sequence GetDisplayPropertyNames(); + static com::sun::star::uno::Sequence GetGridPropertyNames(); public: ScViewCfg(); -- cgit