summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-17 12:43:20 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-18 06:01:25 +0000
commit9704207c386867d1859b06dd25232e06022965d9 (patch)
tree0a7b610b1fcfc2496455ba65ad67dcd4e5700999 /formula
parent6b84445e33cb13602a0da9ab92d382748bcbbd51 (diff)
loplugin:constantparam in formula
Change-Id: I3adeed435b62ae60b5d0d4b763dceced5675cd85 Reviewed-on: https://gerrit.libreoffice.org/23330 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx11
-rw-r--r--formula/source/ui/dlg/formula.cxx16
2 files changed, 10 insertions, 17 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 4813cfcbd9b7..ba0e03e194ff 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -900,7 +900,7 @@ void FormulaCompiler::OpCodeMap::putCopyOpCode( const OUString& rSymbol, OpCode
}
}
-void FormulaCompiler::OpCodeMap::copyFrom( const OpCodeMap& r, bool bOverrideKnownBad )
+void FormulaCompiler::OpCodeMap::copyFrom( const OpCodeMap& r )
{
delete mpHashMap;
mpHashMap = new OpCodeHashMap( mnSymbols);
@@ -919,7 +919,7 @@ void FormulaCompiler::OpCodeMap::copyFrom( const OpCodeMap& r, bool bOverrideKno
// For bOverrideKnownBad when copying from the English core map (ODF 1.1
// and API) to the native map (UI "use English function names") replace the
// known bad legacy function names with correct ones.
- if (bOverrideKnownBad && r.mbCore &&
+ if (r.mbCore &&
FormulaGrammar::extractFormulaLanguage( meGrammar) == sheet::FormulaLanguage::NATIVE &&
FormulaGrammar::extractFormulaLanguage( r.meGrammar) == sheet::FormulaLanguage::ENGLISH)
{
@@ -1710,8 +1710,7 @@ void FormulaCompiler::SetError( sal_uInt16 /*nError*/ )
{
}
-FormulaTokenRef FormulaCompiler::ExtendRangeReference( FormulaToken & /*rTok1*/, FormulaToken & /*rTok2*/,
- bool /*bReuseDoubleRef*/ )
+FormulaTokenRef FormulaCompiler::ExtendRangeReference( FormulaToken & /*rTok1*/, FormulaToken & /*rTok2*/ )
{
return FormulaTokenRef();
}
@@ -1724,7 +1723,7 @@ bool FormulaCompiler::MergeRangeReference( FormulaToken * * const pCode1, Formul
((p1 = *pCode1) == nullptr) || ((p2 = *pCode2) == nullptr) )
return false;
- FormulaTokenRef p = ExtendRangeReference( *p1, *p2, true);
+ FormulaTokenRef p = ExtendRangeReference( *p1, *p2);
if (!p)
return false;
@@ -2115,7 +2114,7 @@ void FormulaCompiler::SetNativeSymbols( const OpCodeMapPtr& xMap )
{
NonConstOpCodeMapPtr xSymbolsNative;
lcl_fillNativeSymbols( xSymbolsNative);
- xSymbolsNative->copyFrom( *xMap, true);
+ xSymbolsNative->copyFrom( *xMap );
}
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index c60aca77246e..c9fd5b8e9397 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -1706,14 +1706,11 @@ void FormulaDlg_Impl::SetEdSelection()
}
FormulaModalDialog::FormulaModalDialog( vcl::Window* pParent
- , bool _bSupportFunctionResult
- , bool _bSupportResult
- , bool _bSupportMatrix
, IFunctionManager* _pFunctionMgr
, IControlReferenceHandler* _pDlg )
: ModalDialog(pParent, "FormulaDialog", "formula/ui/formuladialog.ui")
- , m_pImpl(new FormulaDlg_Impl(this,_bSupportFunctionResult,
- _bSupportResult, _bSupportMatrix,
+ , m_pImpl(new FormulaDlg_Impl(this, false/*_bSupportFunctionResult*/,
+ false/*_bSupportResult*/, false/*_bSupportMatrix*/,
this, _pFunctionMgr, _pDlg))
{
SetText(m_pImpl->aTitle1);
@@ -1797,14 +1794,11 @@ void FormulaModalDialog::StoreFormEditData(FormEditData* pData)
FormulaDlg::FormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
vcl::Window* pParent
- , bool _bSupportFunctionResult
- , bool _bSupportResult
- , bool _bSupportMatrix
, IFunctionManager* _pFunctionMgr, IControlReferenceHandler* _pDlg ) :
SfxModelessDialog( pB, pCW, pParent, "FormulaDialog", "formula/ui/formuladialog.ui" ),
- m_pImpl( new FormulaDlg_Impl(this, _bSupportFunctionResult
- , _bSupportResult
- , _bSupportMatrix
+ m_pImpl( new FormulaDlg_Impl(this, true/*_bSupportFunctionResult*/
+ , true/*_bSupportResult*/
+ , true/*_bSupportMatrix*/
, this, _pFunctionMgr, _pDlg))
{
//undo SfxModelessDialog HelpId clear hack