summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-21 21:44:01 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-22 00:24:27 +0100
commit278c53c93333bed24a74c4c1931e725b64deef02 (patch)
tree328054d29429d5210bd4c06edd1b2f7de54d800f /formula
parentac5455a6883b9a774a13d9a29267669fe4d5c38d (diff)
restructure the code a bit more
Diffstat (limited to 'formula')
-rw-r--r--formula/inc/formula/formula.hxx8
-rw-r--r--formula/source/ui/dlg/formula.cxx7
2 files changed, 6 insertions, 9 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