summaryrefslogtreecommitdiff
path: root/sc/source/ui/condformat
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-02 20:33:12 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-03 03:56:11 +0100
commit06842a8583d3d77de74964cdce4fba811818bf90 (patch)
treec13e9482ed888608c73f8e62510e95232441cdcf /sc/source/ui/condformat
parent99e31f6ead140594deb98fa8e794708403b8113d (diff)
first working version of modal ref input dlgs
The following things still need to be changed: * don't use virtual method in Window * Use a WinBits flag for it * move all the dialogs to it * fix the ugly hack for range name dlg * fix all the uncommented code in winproc.cxx * general clean-up Change-Id: I2a8cfc1c4abf591878b11aa4829a9ff910540eff
Diffstat (limited to 'sc/source/ui/condformat')
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx26
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx5
2 files changed, 13 insertions, 18 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 8780647c9c6b..78214aabb0f3 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -355,9 +355,9 @@ IMPL_LINK_NOARG( ScCondFormatList, ScrollHdl )
//ScCondFormatDlg
//---------------------------------------------------
-ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, ScDocument* pDoc, const ScConditionalFormat* pFormat, const ScRangeList& rRange,
+ScCondFormatDlg::ScCondFormatDlg(Window* pParent, ScDocument* pDoc, const ScConditionalFormat* pFormat, const ScRangeList& rRange,
const ScAddress& rPos, condformat::dialog::ScCondFormatDialogType eType):
- ScAnyRefDlg(pB, pCW, pParent, RID_SCDLG_CONDFORMAT ),
+ ScAnyRefModalDlg(pParent, ScResId(RID_SCDLG_CONDFORMAT) ),
maBtnAdd( this, ScResId( BTN_ADD ) ),
maBtnRemove( this, ScResId( BTN_REMOVE ) ),
maBtnOk( this, ScResId( BTN_OK ) ),
@@ -388,10 +388,13 @@ ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pCW, Window* p
FreeResource();
maEdRange.SetText(aRangeString);
+
+ SC_MOD()->PushNewAnyRefDlg(this);
}
ScCondFormatDlg::~ScCondFormatDlg()
{
+ SC_MOD()->PopAnyRefDlg();
}
void ScCondFormatDlg::SetActive()
@@ -406,7 +409,7 @@ void ScCondFormatDlg::SetActive()
void ScCondFormatDlg::RefInputDone( sal_Bool bForced )
{
- ScAnyRefDlg::RefInputDone(bForced);
+ ScAnyRefModalDlg::RefInputDone(bForced);
}
sal_Bool ScCondFormatDlg::IsTableLocked() const
@@ -483,21 +486,8 @@ IMPL_LINK( ScCondFormatDlg, EdRangeModifyHdl, Edit*, pEdit )
sal_Bool ScCondFormatDlg::Close()
{
- sal_uInt16 nId = 0;
- switch(meType)
- {
- case condformat::dialog::NONE:
- case condformat::dialog::CONDITION:
- nId = ScCondFormatConditionDlgWrapper::GetChildWindowId();
- break;
- case condformat::dialog::COLORSCALE:
- nId = ScCondFormatColorScaleDlgWrapper::GetChildWindowId();
- break;
- case condformat::dialog::DATABAR:
- nId = ScCondFormatDataBarDlgWrapper::GetChildWindowId();
- break;
- }
-
+ sal_uInt16 nId = 1;
+ EndDialog();
return DoClose(nId);
}
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index 8039738e61cf..b8fb97231ff3 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -193,6 +193,11 @@ ScCondFormatManagerDlg::~ScCondFormatManagerDlg()
delete mpFormatList;
}
+bool ScCondFormatManagerDlg::IsInRefMode() const
+{
+ return true;
+}
+
ScConditionalFormatList* ScCondFormatManagerDlg::GetConditionalFormatList()
{
ScConditionalFormatList* pList = mpFormatList;