diff options
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 11 | ||||
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 16 | ||||
-rw-r--r-- | include/formula/FormulaCompiler.hxx | 11 | ||||
-rw-r--r-- | include/formula/formula.hxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Formula.cxx | 2 | ||||
-rw-r--r-- | sc/inc/compiler.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/formdlg/formula.cxx | 2 |
8 files changed, 20 insertions, 34 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 diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx index 24956d69c279..516d7f0efe14 100644 --- a/include/formula/FormulaCompiler.hxx +++ b/include/formula/FormulaCompiler.hxx @@ -105,12 +105,11 @@ public: /** Copy mappings from r into this map, effectively replacing this map. - @param bOverrideKnownBad - If TRUE, override known legacy bad function names with - correct ones if the conditions can be derived from the - current maps. + Override known legacy bad function names with + correct ones if the conditions can be derived from the + current maps. */ - void copyFrom( const OpCodeMap& r, bool bOverrideKnownBad ); + void copyFrom( const OpCodeMap& r ); /// Get the symbol String -> OpCode hash map for finds. inline const OpCodeHashMap* getHashMap() const { return mpHashMap; } @@ -278,7 +277,7 @@ protected: virtual void fillAddInToken(::std::vector< css::sheet::FormulaOpCodeMapEntry >& _rVec, bool _bIsEnglish) const; virtual void SetError(sal_uInt16 nError); - virtual FormulaTokenRef ExtendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2, bool bReuseDoubleRef ); + virtual FormulaTokenRef ExtendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2 ); virtual bool HandleExternalReference(const FormulaToken& _aToken); virtual bool HandleRange(); virtual bool HandleColRowName(); diff --git a/include/formula/formula.hxx b/include/formula/formula.hxx index db744b2e356f..2456cb00154e 100644 --- a/include/formula/formula.hxx +++ b/include/formula/formula.hxx @@ -50,9 +50,6 @@ class FORMULA_DLLPUBLIC FormulaModalDialog : public ModalDialog, public formul friend class FormulaDlg_Impl; public: FormulaModalDialog( vcl::Window* pParent - , bool _bSupportFunctionResult - , bool _bSupportResult - , bool _bSupportMatrix ,IFunctionManager* _pFunctionMgr ,IControlReferenceHandler* _pDlg = nullptr ); virtual ~FormulaModalDialog(); @@ -90,9 +87,6 @@ public: FormulaDlg( SfxBindings* pB , SfxChildWindow* pCW , vcl::Window* pParent - , bool _bSupportFunctionResult - , bool _bSupportResult - , bool _bSupportMatrix , IFunctionManager* _pFunctionMgr , IControlReferenceHandler* _pDlg = nullptr ); virtual ~FormulaDlg(); diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx index ad3264c977c8..16900c472495 100644 --- a/reportdesign/source/ui/dlg/Formula.cxx +++ b/reportdesign/source/ui/dlg/Formula.cxx @@ -49,7 +49,7 @@ FormulaDialog::FormulaDialog(vcl::Window* pParent , const OUString& _sFormula , const css::uno::Reference < css::beans::XPropertySet >& _xRowSet , svl::SharedStringPool& rStrPool ) - : FormulaModalDialog( pParent, false,false,false,_pFunctionMgr.get(),this) + : FormulaModalDialog( pParent, _pFunctionMgr.get(),this) ,m_aFunctionManager(_pFunctionMgr) ,m_pFormulaData(new FormEditData()) ,m_pAddField(nullptr) diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index d18d3b587284..2af43e4561b8 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -452,7 +452,7 @@ private: virtual bool HandleDbData() override; virtual bool HandleTableRef() override; - virtual formula::FormulaTokenRef ExtendRangeReference( formula::FormulaToken & rTok1, formula::FormulaToken & rTok2, bool bReuseDoubleRef ) override; + virtual formula::FormulaTokenRef ExtendRangeReference( formula::FormulaToken & rTok1, formula::FormulaToken & rTok2 ) override; virtual void CreateStringFromExternal( OUStringBuffer& rBuffer, const formula::FormulaToken* pToken ) const override; virtual void CreateStringFromSingleRef( OUStringBuffer& rBuffer, const formula::FormulaToken* pToken ) const override; virtual void CreateStringFromDoubleRef( OUStringBuffer& rBuffer, const formula::FormulaToken* pToken ) const override; diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 2ea80345b11d..2f88dd930d55 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4847,9 +4847,9 @@ sal_Unicode ScCompiler::GetNativeAddressSymbol( Convention::SpecialSymbolType eT return pConv->getSpecialSymbol(eType); } -FormulaTokenRef ScCompiler::ExtendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2, bool bReuseDoubleRef ) +FormulaTokenRef ScCompiler::ExtendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2 ) { - return extendRangeReference( rTok1, rTok2, aPos,bReuseDoubleRef ); + return extendRangeReference( rTok1, rTok2, aPos, true/*bReuseDoubleRef*/ ); } void ScCompiler::fillAddInToken(::std::vector< css::sheet::FormulaOpCodeMapEntry >& _rVec,bool _bIsEnglish) const diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index 085c7177f2a0..4f2aff561743 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -62,7 +62,7 @@ using namespace com::sun::star; ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, ScViewData* pViewData,formula::IFunctionManager* _pFunctionMgr ) - : formula::FormulaDlg( pB, pCW, pParent, true,true,true, _pFunctionMgr,this) + : formula::FormulaDlg( pB, pCW, pParent, _pFunctionMgr,this) , m_aHelper(this,pB) { m_aHelper.SetWindow(this); |