diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-03-21 21:44:01 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-03-22 00:24:27 +0100 |
commit | 278c53c93333bed24a74c4c1931e725b64deef02 (patch) | |
tree | 328054d29429d5210bd4c06edd1b2f7de54d800f | |
parent | ac5455a6883b9a774a13d9a29267669fe4d5c38d (diff) |
restructure the code a bit more
-rw-r--r-- | formula/inc/formula/formula.hxx | 8 | ||||
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 7 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Formula.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/inc/Formula.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/formdlg/formula.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/formula.hxx | 7 |
6 files changed, 10 insertions, 20 deletions
diff --git a/formula/inc/formula/formula.hxx b/formula/inc/formula/formula.hxx index 55cc0bc0b0f2..7a16b3d05980 100644 --- a/formula/inc/formula/formula.hxx +++ b/formula/inc/formula/formula.hxx @@ -33,6 +33,7 @@ #include <memory> #include "formula/formuladllapi.h" #include "formula/omoduleclient.hxx" +#include <formula/IFunctionDescription.hxx> namespace formula { @@ -48,7 +49,6 @@ enum FormulaDlgMode { FORMULA_FORMDLG_FORMULA, FORMULA_FORMDLG_ARGS, FORMULA_FOR //============================================================================ -class IFormulaEditorHelper; class FormulaDlg_Impl; class IControlReferenceHandler; class IFunctionDescription; @@ -58,7 +58,7 @@ class RefEdit; class RefButton; class FormEditData; //============================================================================ -class FORMULA_DLLPUBLIC FormulaModalDialog : public ModalDialog +class FORMULA_DLLPUBLIC FormulaModalDialog : public ModalDialog, public formula::IFormulaEditorHelper { friend class FormulaDlg_Impl; public: @@ -66,7 +66,6 @@ public: , bool _bSupportFunctionResult , bool _bSupportResult , bool _bSupportMatrix - ,IFormulaEditorHelper* _pHelper ,IFunctionManager* _pFunctionMgr ,IControlReferenceHandler* _pDlg = NULL ); virtual ~FormulaModalDialog(); @@ -92,7 +91,7 @@ protected: }; class FORMULA_DLLPUBLIC FormulaDlg: - private OModuleClient, public SfxModelessDialog + private OModuleClient, public SfxModelessDialog, public IFormulaEditorHelper // order of base classes is important, as OModuleClient controls the // lifecycle of the ResMgr passed into SfxModelessDialog (via // formula::ModuleRes), and at least with DBG_UTIL calling TestRes in @@ -107,7 +106,6 @@ public: , bool _bSupportFunctionResult , bool _bSupportResult , bool _bSupportMatrix - , IFormulaEditorHelper* _pHelper , IFunctionManager* _pFunctionMgr , IControlReferenceHandler* _pDlg = NULL ); virtual ~FormulaDlg(); diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 70eccb37bc0a..ac0cac6aff33 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -1657,14 +1657,13 @@ FormulaModalDialog::FormulaModalDialog( Window* pParent , bool _bSupportFunctionResult , bool _bSupportResult , bool _bSupportMatrix - , IFormulaEditorHelper* _pHelper , IFunctionManager* _pFunctionMgr , IControlReferenceHandler* _pDlg ) : ModalDialog( pParent, ModuleRes(RID_FORMULADLG_FORMULA_MODAL) ), m_pImpl( new FormulaDlg_Impl(this,_bSupportFunctionResult , _bSupportResult , _bSupportMatrix - ,_pHelper,_pFunctionMgr,_pDlg)) + ,this,_pFunctionMgr,_pDlg)) { FreeResource(); SetText(m_pImpl->aTitle1); @@ -1745,12 +1744,12 @@ FormulaDlg::FormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, , bool _bSupportFunctionResult , bool _bSupportResult , bool _bSupportMatrix - , IFormulaEditorHelper* _pHelper,IFunctionManager* _pFunctionMgr,IControlReferenceHandler* _pDlg ) : + , IFunctionManager* _pFunctionMgr, IControlReferenceHandler* _pDlg ) : SfxModelessDialog( pB, pCW, pParent, ModuleRes(RID_FORMULADLG_FORMULA) ), m_pImpl( new FormulaDlg_Impl(this, _bSupportFunctionResult , _bSupportResult , _bSupportMatrix - ,_pHelper,_pFunctionMgr,_pDlg)) + , this, _pFunctionMgr, _pDlg)) { FreeResource(); if(GetHelpId().isEmpty()) //Hack which hides the HelpId for a model Dialog in SfxModelessDialog diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx index c09e06b33354..184d25df0f01 100644 --- a/reportdesign/source/ui/dlg/Formula.cxx +++ b/reportdesign/source/ui/dlg/Formula.cxx @@ -60,7 +60,7 @@ FormulaDialog::FormulaDialog(Window* pParent , const ::boost::shared_ptr< IFunctionManager >& _pFunctionMgr , const ::rtl::OUString& _sFormula , const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& _xRowSet) - : FormulaModalDialog( pParent, false,false,false,this,_pFunctionMgr.get(),this) + : FormulaModalDialog( pParent, false,false,false,_pFunctionMgr.get(),this) ,m_aFunctionManager(_pFunctionMgr) ,m_pFormulaData(new FormEditData()) ,m_pAddField(NULL) diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx index a297027517ed..623d1c73bd38 100644 --- a/reportdesign/source/ui/inc/Formula.hxx +++ b/reportdesign/source/ui/inc/Formula.hxx @@ -30,7 +30,6 @@ #define RPTUI_FORMULA_HXX #include <formula/formula.hxx> -#include <formula/IFunctionDescription.hxx> #include <formula/IControlReferenceHandler.hxx> #include <boost/shared_ptr.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -45,8 +44,7 @@ class FunctionManager; class OAddFieldWindow; //============================================================================ -class FormulaDialog : public formula::IFormulaEditorHelper, - public formula::FormulaModalDialog, +class FormulaDialog : public formula::FormulaModalDialog, public formula::IControlReferenceHandler { ::boost::shared_ptr< formula::IFunctionManager > m_aFunctionManager; diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index 655616477626..790a0209a6ec 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -84,7 +84,7 @@ ScAddress ScFormulaDlg::aCursorPos; ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, ScViewData* pViewData,formula::IFunctionManager* _pFunctionMgr ) - : formula::FormulaDlg( pB, pCW, pParent, true,true,true,this, _pFunctionMgr,this) + : formula::FormulaDlg( pB, pCW, pParent, true,true,true, _pFunctionMgr,this) , m_aHelper(this,pB) { m_aHelper.SetWindow(this); diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx index f8969c591224..8404e6e955de 100644 --- a/sc/source/ui/inc/formula.hxx +++ b/sc/source/ui/inc/formula.hxx @@ -43,7 +43,6 @@ #include "formula/formula.hxx" #include "IAnyRefDialog.hxx" #include "anyrefdg.hxx" -#include <formula/IFunctionDescription.hxx> class ScViewData; class ScDocument; @@ -56,11 +55,7 @@ class SvLBoxEntry; typedef ScTabViewShell* PtrTabViewShell; //============================================================================ -// Order of base classes is important, as pointer to IFormulaEditorHelper base -// is passed into constructor of FormulaDlg base, which expects the former to -// outlive itself: -class ScFormulaDlg : public formula::IFormulaEditorHelper, - public formula::FormulaDlg, +class ScFormulaDlg : public formula::FormulaDlg, public IAnyRefDialog { ScFormulaReferenceHelper m_aHelper; |