summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-20 12:51:08 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-07-21 06:50:30 +0000
commit82b896f1f85b510eb72bb6d2f97d29defe1edf8b (patch)
tree758ff2379a5c99cc770d6b716e9c7e1c11e5ebcb
parentab777c9cecc7377a7bdb0cda2eb26412021c7a73 (diff)
loplugin:unusedmethods formula
Change-Id: I62ff278679638dda7e10c86c49b1966641418e8b Reviewed-on: https://gerrit.libreoffice.org/17223 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--formula/source/ui/dlg/ControlHelper.hxx12
-rw-r--r--formula/source/ui/dlg/funcpage.hxx2
-rw-r--r--formula/source/ui/dlg/parawin.hxx6
-rw-r--r--formula/source/ui/dlg/structpg.cxx4
-rw-r--r--formula/source/ui/dlg/structpg.hxx2
-rw-r--r--include/formula/FormulaCompiler.hxx3
-rw-r--r--include/formula/IFunctionDescription.hxx3
-rw-r--r--include/formula/formdata.hxx3
-rw-r--r--include/formula/formula.hxx1
-rw-r--r--include/formula/funcutl.hxx5
-rw-r--r--include/formula/token.hxx2
-rw-r--r--include/formula/tokenarray.hxx5
-rw-r--r--reportdesign/source/ui/inc/FunctionHelper.hxx6
-rw-r--r--reportdesign/source/ui/misc/FunctionHelper.cxx18
-rw-r--r--sc/inc/funcdesc.hxx11
-rw-r--r--sc/source/core/data/funcdesc.cxx12
16 files changed, 5 insertions, 90 deletions
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx
index dea58d335484..d6c1e797bc92 100644
--- a/formula/source/ui/dlg/ControlHelper.hxx
+++ b/formula/source/ui/dlg/ControlHelper.hxx
@@ -53,7 +53,6 @@ public:
MultiLineEdit* GetEdit() {return pMEdit;}
void SetSelChangedHdl( const Link<>& rLink ) { aSelChangedLink = rLink; }
- const Link<>& GetSelChangedHdl() const { return aSelChangedLink; }
void UpdateOldSel();
};
@@ -136,28 +135,17 @@ public:
OUString GetArgVal();
void SetArgSelection (const Selection& rSel);
- void ReplaceSelOfArg (const OUString& rStr);
ArgEdit* GetArgEdPtr() {return pEdArg;}
void SetFxClickHdl( const Link<>& rLink ) { aFxClickLink = rLink; }
- const Link<>& GetFxClickHdl() const { return aFxClickLink; }
-
- void SetRefClickHdl( const Link<>& rLink ) { aRefClickLink = rLink; }
- const Link<>& GetRefClickHdl() const { return aRefClickLink; }
void SetFxFocusHdl( const Link<>& rLink ) { aFxFocusLink = rLink; }
- const Link<>& GetFxFocusHdl() const { return aFxFocusLink; }
-
- void SetRefFocusHdl( const Link<>& rLink ) { aRefFocusLink = rLink; }
- const Link<>& GetRefFocusHdl() const { return aRefFocusLink; }
void SetEdFocusHdl( const Link<>& rLink ) { aEdFocusLink = rLink; }
- const Link<>& GetEdFocusHdl() const { return aEdFocusLink; }
void SetEdModifyHdl( const Link<>& rLink ) { aEdModifyLink = rLink; }
- const Link<>& GetEdModifyHdl() const { return aEdModifyLink; }
void Hide();
void Show();
diff --git a/formula/source/ui/dlg/funcpage.hxx b/formula/source/ui/dlg/funcpage.hxx
index f49a00dde4d3..6d76f546aa4b 100644
--- a/formula/source/ui/dlg/funcpage.hxx
+++ b/formula/source/ui/dlg/funcpage.hxx
@@ -101,10 +101,8 @@ public:
OUString GetSelFunctionName() const;
void SetDoubleClickHdl( const Link<>& rLink ) { aDoubleClickLink = rLink; }
- const Link<>& GetDoubleClickHdl() const { return aDoubleClickLink; }
void SetSelectHdl( const Link<>& rLink ) { aSelectionLink = rLink; }
- const Link<>& GetSelectHdl() const { return aSelectionLink; }
};
diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx
index 471efa0dfd3c..b34d76e7c8bf 100644
--- a/formula/source/ui/dlg/parawin.hxx
+++ b/formula/source/ui/dlg/parawin.hxx
@@ -133,7 +133,6 @@ public:
void UpdateParas();
void ClearAll();
- bool IsRefMode() {return bRefMode;}
void SetRefMode(bool bFlag) {bRefMode=bFlag;}
sal_uInt16 GetActiveLine() { return nActiveLine;}
@@ -149,14 +148,9 @@ public:
sal_uInt16 GetSliderPos();
void SetSliderPos(sal_uInt16 nSliderPos);
- void SetScrollHdl( const Link<>& rLink ) { aScrollLink = rLink; }
- const Link<>& GetScrollHdl() const { return aScrollLink; }
-
void SetArgModifiedHdl( const Link<>& rLink ) { aArgModifiedLink = rLink; }
- const Link<>& GetArgModifiedHdl() const { return aArgModifiedLink; }
void SetFxHdl( const Link<>& rLink ) { aFxLink = rLink; }
- const Link<>& GetFxHdl() const { return aFxLink; }
};
diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx
index 6260c3ebe35b..ba573ca3d8e2 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -150,10 +150,6 @@ OUString StructPage::GetEntryText(SvTreeListEntry* pEntry) const
return aString;
}
-SvTreeListEntry* StructPage::GetParent(SvTreeListEntry* pEntry) const
-{
- return m_pTlbStruct->GetParent(pEntry);
-}
IFormulaToken* StructPage::GetFunctionEntry(SvTreeListEntry* pEntry)
{
if(pEntry!=NULL)
diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx
index 250c0f5e12c4..cd0bf60ab6fa 100644
--- a/formula/source/ui/dlg/structpg.hxx
+++ b/formula/source/ui/dlg/structpg.hxx
@@ -98,10 +98,8 @@ public:
sal_uInt16 nFlag,sal_uLong nPos=0,IFormulaToken* pScToken=NULL) SAL_OVERRIDE;
virtual OUString GetEntryText(SvTreeListEntry* pEntry) const SAL_OVERRIDE;
- virtual SvTreeListEntry* GetParent(SvTreeListEntry* pEntry) const SAL_OVERRIDE;
void SetSelectionHdl( const Link<>& rLink ) { aSelLink = rLink; }
- const Link<>& GetSelectionHdl() const { return aSelLink; }
};
} // formula
diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx
index 6f6645b2dd50..6d6ed22dfe54 100644
--- a/include/formula/FormulaCompiler.hxx
+++ b/include/formula/FormulaCompiler.hxx
@@ -144,9 +144,6 @@ public:
be English as well)? */
inline bool isEnglish() const { return mbEnglish; }
- /// Is it an internal core mapping, or setup by filters?
- inline bool isCore() const { return mbCore; }
-
/// Is it an ODF 1.1 compatibility mapping?
inline bool isPODF() const { return FormulaGrammar::isPODF( meGrammar); }
diff --git a/include/formula/IFunctionDescription.hxx b/include/formula/IFunctionDescription.hxx
index 85f42aaf9036..090054e9912e 100644
--- a/include/formula/IFunctionDescription.hxx
+++ b/include/formula/IFunctionDescription.hxx
@@ -52,7 +52,6 @@ namespace formula
virtual sal_uInt32 getCount() const = 0;
virtual const IFunctionCategory* getCategory(sal_uInt32 nPos) const = 0;
virtual void fillLastRecentlyUsedFunctions(::std::vector< const IFunctionDescription*>& _rLastRUFunctions) const = 0;
- virtual const IFunctionDescription* getFunctionByName(const OUString& _sFunctionName) const = 0;
virtual sal_Unicode getSingleToken(const EToken _eToken) const = 0;
@@ -64,7 +63,6 @@ namespace formula
{
public:
IFunctionCategory(){}
- virtual const IFunctionManager* getFunctionManager() const = 0;
virtual sal_uInt32 getCount() const = 0;
virtual const IFunctionDescription* getFunction(sal_uInt32 _nPos) const = 0;
virtual sal_uInt32 getNumber() const = 0;
@@ -119,7 +117,6 @@ namespace formula
sal_uInt16 nFlag,sal_uLong nPos=0,IFormulaToken* pScToken=NULL) = 0;
virtual OUString GetEntryText(SvTreeListEntry* pEntry) const = 0;
- virtual SvTreeListEntry* GetParent(SvTreeListEntry* pEntry) const = 0;
protected:
~IStructHelper() {}
diff --git a/include/formula/formdata.hxx b/include/formula/formdata.hxx
index 08271191befb..30c0ce5ce105 100644
--- a/include/formula/formdata.hxx
+++ b/include/formula/formdata.hxx
@@ -34,7 +34,6 @@ public:
virtual ~FormEditData();
virtual void SaveValues();
- bool HasParent() const { return pParent != NULL; }
inline sal_uInt16 GetMode() const { return nMode; }
inline sal_Int32 GetFStart() const { return nFStart; }
@@ -49,8 +48,6 @@ public:
inline void SetMode( sal_uInt16 nNew ) { nMode = nNew; }
inline void SetFStart( sal_Int32 nNew ) { nFStart = nNew; }
- inline void SetCatSel( sal_uInt16 nNew ) { nCatSel = nNew; }
- inline void SetFuncSel( sal_uInt16 nNew ) { nFuncSel = nNew; }
inline void SetOffset( sal_uInt16 nNew ) { nOffset = nNew; }
inline void SetEdFocus( sal_uInt16 nNew ) { nEdFocus = nNew; }
inline void SetUndoStr( const OUString& rNew ) { aUndoStr = rNew; }
diff --git a/include/formula/formula.hxx b/include/formula/formula.hxx
index 658e532c1957..8a58c5b2f925 100644
--- a/include/formula/formula.hxx
+++ b/include/formula/formula.hxx
@@ -112,7 +112,6 @@ protected:
void RefInputStartAfter( RefEdit* pEdit, RefButton* pButton = NULL );
void RefInputDoneAfter( bool bForced = false );
void SetFocusWin(vcl::Window *pWin,const OString& nUniqueId);
- void HighlightFunctionParas(const OUString& aFormula);
void SetMeText(const OUString& _sText);
FormulaDlgMode SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, bool bMatrix, bool _bSelect, bool _bUpdate);
diff --git a/include/formula/funcutl.hxx b/include/formula/funcutl.hxx
index 77b9386e43aa..2bde241f412d 100644
--- a/include/formula/funcutl.hxx
+++ b/include/formula/funcutl.hxx
@@ -67,11 +67,6 @@ public:
void SetReferences( IControlReferenceHandler* pDlg, vcl::Window *pLabelWidget );
- IControlReferenceHandler* GetRefDialog()
- {
- return pAnyRefDlg;
- }
-
vcl::Window* GetLabelWidgetForShrinkMode()
{
return pLabelWidget;
diff --git a/include/formula/token.hxx b/include/formula/token.hxx
index 6d6550b5df72..97213d723e17 100644
--- a/include/formula/token.hxx
+++ b/include/formula/token.hxx
@@ -194,8 +194,6 @@ public:
static sal_Int32 GetStrLenBytes( sal_Int32 nLen )
{ return nLen * sizeof(sal_Unicode); }
- static sal_Int32 GetStrLenBytes( const OUString& rStr )
- { return GetStrLenBytes( rStr.getLength() ); }
};
inline void intrusive_ptr_add_ref(const FormulaToken* p)
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index 6d577ea01555..7a745b6594ff 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -172,7 +172,6 @@ public:
void DelRPN();
FormulaToken* First() { nIndex = 0; return Next(); }
FormulaToken* Next();
- FormulaToken* FirstNoSpaces() { nIndex = 0; return NextNoSpaces(); }
FormulaToken* NextNoSpaces();
FormulaToken* GetNextName();
FormulaToken* GetNextReference();
@@ -234,12 +233,8 @@ public:
{ SetMaskedRecalcMode( ScRecalcMode::ONLOAD_ONCE ); }
inline void SetRecalcModeForced()
{ nMode |= ScRecalcMode::FORCED; }
- inline void ClearRecalcModeForced()
- { nMode &= ~ScRecalcMode::FORCED; }
inline void SetRecalcModeOnRefMove()
{ nMode |= ScRecalcMode::ONREFMOVE; }
- inline void ClearRecalcModeOnRefMove()
- { nMode &= ~ScRecalcMode::ONREFMOVE; }
inline bool IsRecalcModeNormal() const
{ return bool(nMode & ScRecalcMode::NORMAL); }
inline bool IsRecalcModeAlways() const
diff --git a/reportdesign/source/ui/inc/FunctionHelper.hxx b/reportdesign/source/ui/inc/FunctionHelper.hxx
index bf384f0a0798..042e0a941c9c 100644
--- a/reportdesign/source/ui/inc/FunctionHelper.hxx
+++ b/reportdesign/source/ui/inc/FunctionHelper.hxx
@@ -48,8 +48,7 @@ public:
virtual sal_uInt32 getCount() const SAL_OVERRIDE;
virtual const formula::IFunctionCategory* getCategory(sal_uInt32 nPos) const SAL_OVERRIDE;
virtual void fillLastRecentlyUsedFunctions(::std::vector< const formula::IFunctionDescription*>& _rLastRUFunctions) const SAL_OVERRIDE;
- virtual const formula::IFunctionDescription* getFunctionByName(const OUString& _sFunctionName) const SAL_OVERRIDE;
- virtual sal_Unicode getSingleToken(const EToken _eToken) const SAL_OVERRIDE;
+ virtual sal_Unicode getSingleToken(const EToken _eToken) const SAL_OVERRIDE;
::boost::shared_ptr< FunctionDescription > get(const ::com::sun::star::uno::Reference< ::com::sun::star::report::meta::XFunctionDescription>& _xFunctionDescription) const;
};
@@ -92,8 +91,7 @@ public:
virtual sal_uInt32 getCount() const SAL_OVERRIDE;
virtual const formula::IFunctionDescription* getFunction(sal_uInt32 _nPos) const SAL_OVERRIDE;
virtual sal_uInt32 getNumber() const SAL_OVERRIDE;
- virtual const formula::IFunctionManager* getFunctionManager() const SAL_OVERRIDE;
- virtual OUString getName() const SAL_OVERRIDE;
+ virtual OUString getName() const SAL_OVERRIDE;
};
} // rptui
diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx
index 2ce316af93a0..925fa01102fa 100644
--- a/reportdesign/source/ui/misc/FunctionHelper.cxx
+++ b/reportdesign/source/ui/misc/FunctionHelper.cxx
@@ -68,19 +68,6 @@ const formula::IFunctionCategory* FunctionManager::getCategory(sal_uInt32 _nPos)
return m_aCategoryIndex[_nPos]->second.get();
}
-const formula::IFunctionDescription* FunctionManager::getFunctionByName(const OUString& _sFunctionName) const
-{
- const formula::IFunctionDescription* pDesc = NULL;
- try
- {
- pDesc = get(m_xMgr->getFunctionByName(_sFunctionName)).get();
- }
- catch(uno::Exception&)
- {
- }
- return pDesc;
-}
-
void FunctionManager::fillLastRecentlyUsedFunctions(::std::vector< const formula::IFunctionDescription*>& /*_rLastRUFunctions*/) const
{
}
@@ -138,11 +125,6 @@ sal_uInt32 FunctionCategory::getNumber() const
return m_nNumber;
}
-const formula::IFunctionManager* FunctionCategory::getFunctionManager() const
-{
- return m_pFunctionManager;
-}
-
OUString FunctionCategory::getName() const
{
return m_xCategory->getName();
diff --git a/sc/inc/funcdesc.hxx b/sc/inc/funcdesc.hxx
index 43e4101c59b7..2410de3751a6 100644
--- a/sc/inc/funcdesc.hxx
+++ b/sc/inc/funcdesc.hxx
@@ -253,15 +253,14 @@ private:
class ScFunctionCategory : public formula::IFunctionCategory
{
public:
- ScFunctionCategory(ScFunctionMgr* _pMgr,::std::vector<const ScFuncDesc*>* _pCategory,sal_uInt32 _nCategory)
- : m_pMgr(_pMgr),m_pCategory(_pCategory),m_nCategory(_nCategory){}
+ ScFunctionCategory(::std::vector<const ScFuncDesc*>* _pCategory,sal_uInt32 _nCategory)
+ : m_pCategory(_pCategory),m_nCategory(_nCategory){}
virtual ~ScFunctionCategory(){}
/**
@return count of functions in this category
*/
virtual sal_uInt32 getCount() const SAL_OVERRIDE;
- virtual const formula::IFunctionManager* getFunctionManager() const SAL_OVERRIDE;
/**
Gives the _nPos'th function in this category.
@@ -280,7 +279,6 @@ public:
virtual OUString getName() const SAL_OVERRIDE;
private:
- ScFunctionMgr* m_pMgr; /**< function manager for this category */
::std::vector<const ScFuncDesc*>* m_pCategory; /**< list of functions in this category */
mutable OUString m_sName; /**< name of this category */
sal_uInt32 m_nCategory; /**< index number of this category */
@@ -382,11 +380,6 @@ public:
virtual void fillLastRecentlyUsedFunctions(::std::vector< const formula::IFunctionDescription*>& _rLastRUFunctions) const SAL_OVERRIDE;
/**
- Implemented because of inheritance \see ScFunctionMgr::Get(const OUString&) const
- */
- virtual const formula::IFunctionDescription* getFunctionByName(const OUString& _sFunctionName) const SAL_OVERRIDE;
-
- /**
Maps Etoken to character
Used for retrieving characters for parantheses and separators.
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index d9d026685c20..f464205d0afb 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -614,11 +614,6 @@ sal_uInt32 ScFunctionCategory::getCount() const
return m_pCategory->size();
}
-const formula::IFunctionManager* ScFunctionCategory::getFunctionManager() const
-{
- return m_pMgr;
-}
-
OUString ScFunctionCategory::getName() const
{
if ( m_sName.isEmpty() )
@@ -755,17 +750,12 @@ const formula::IFunctionCategory* ScFunctionMgr::getCategory(sal_uInt32 nCategor
if ( nCategory < (MAX_FUNCCAT-1) )
{
if (m_aCategories.find(nCategory) == m_aCategories.end())
- m_aCategories[nCategory].reset(new ScFunctionCategory(const_cast<ScFunctionMgr*>(this),aCatLists[nCategory+1],nCategory)); // aCatLists[0] is "all"
+ m_aCategories[nCategory].reset(new ScFunctionCategory(aCatLists[nCategory+1],nCategory)); // aCatLists[0] is "all"
return m_aCategories[nCategory].get();
}
return NULL;
}
-const formula::IFunctionDescription* ScFunctionMgr::getFunctionByName(const OUString& _sFunctionName) const
-{
- return Get(_sFunctionName);
-}
-
void ScFunctionMgr::fillLastRecentlyUsedFunctions(::std::vector< const formula::IFunctionDescription*>& _rLastRUFunctions) const
{
const ScAppOptions& rAppOpt = SC_MOD()->GetAppOptions();