diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-10-07 03:22:22 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-10-09 06:33:16 +0200 |
commit | a1e53f7d14948c714382ae0961303b963bddc1e8 (patch) | |
tree | 7c1ebaaecbc866781eb4a15a1ff48255e8f50796 /sc | |
parent | ffadab26d62a24f3a142c497669db5a933ba1251 (diff) |
make the different options to cal the dialog work again
Change-Id: I947a4cac8f0417737bb8833eab54c67e57c8293e
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/scdll.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 27 | ||||
-rw-r--r-- | sc/source/ui/inc/condformatdlg.hxx | 5 | ||||
-rw-r--r-- | sc/source/ui/inc/reffact.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/view/reffact.cxx | 20 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshc.cxx | 3 |
8 files changed, 70 insertions, 13 deletions
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 5f8540d1728d..6d567128a1ac 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -259,7 +259,9 @@ void ScDLL::Init() ScOptSolverDlgWrapper ::RegisterChildWindow(false, pMod); ScNameDlgWrapper ::RegisterChildWindow(false, pMod); ScNameDefDlgWrapper ::RegisterChildWindow(false, pMod); - ScCondFormatDlgWrapper ::RegisterChildWindow(false, pMod); + ScCondFormatConditionDlgWrapper ::RegisterChildWindow(false, pMod); + ScCondFormatColorScaleDlgWrapper ::RegisterChildWindow(false, pMod); + ScCondFormatDataBarDlgWrapper ::RegisterChildWindow(false, pMod); ScPivotLayoutWrapper ::RegisterChildWindow(false, pMod); ScTabOpDlgWrapper ::RegisterChildWindow(false, pMod); ScFilterDlgWrapper ::RegisterChildWindow(false, pMod); diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index ce539d4e5ddf..6544e1c8f409 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -1123,7 +1123,8 @@ ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pCW, Window* p maEdRange( this, ScResId( ED_RANGE ) ), maCondFormList( this, ScResId( CTRL_LIST ), pDoc, pFormat, rRange, rPos, eType ), maPos(rPos), - mpDoc(pDoc) + mpDoc(pDoc), + meType(eType) { rtl::OUStringBuffer aTitle( GetText() ); aTitle.append(rtl::OUString(" ")); @@ -1224,16 +1225,36 @@ IMPL_LINK( ScCondFormatDlg, EdRangeModifyHdl, Edit*, pEdit ) return 0; } +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; + } + + return DoClose(nId); +} + IMPL_LINK_NOARG( ScCondFormatDlg, OkBtnHdl ) { - DoClose( ScCondFormatDlgWrapper::GetChildWindowId() ); + Close(); return 0; } IMPL_LINK_NOARG( ScCondFormatDlg, CancelBtnHdl ) { - DoClose( ScCondFormatDlgWrapper::GetChildWindowId() ); + Close(); return 0; } diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index 8fbf5b11c9b7..529cd149ab32 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -205,10 +205,14 @@ private: ScAddress maPos; ScDocument* mpDoc; + condformat::dialog::ScCondFormatDialogType meType; + DECL_LINK( EdRangeModifyHdl, Edit* ); DECL_LINK( OkBtnHdl, void* ); DECL_LINK( CancelBtnHdl, void* ); + virtual sal_Bool Close(); + public: ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pSW, Window* pWindow, ScDocument* pDoc, const ScConditionalFormat* pFormat, const ScRangeList& rRange, const ScAddress& rPos, condformat::dialog::ScCondFormatDialogType eType); @@ -218,6 +222,7 @@ public: virtual void SetReference(const ScRange&, ScDocument*); virtual void SetActive(); + virtual sal_Bool IsTableLocked() const { return sal_True; } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx index 2a454c257133..e906e8c6cb4b 100644 --- a/sc/source/ui/inc/reffact.hxx +++ b/sc/source/ui/inc/reffact.hxx @@ -45,7 +45,9 @@ DECL_WRAPPER_WITHID(ScNameDlgWrapper) DECL_WRAPPER_WITHID(ScNameDefDlgWrapper) -DECL_WRAPPER_WITHID(ScCondFormatDlgWrapper) +DECL_WRAPPER_WITHID(ScCondFormatConditionDlgWrapper) +DECL_WRAPPER_WITHID(ScCondFormatColorScaleDlgWrapper) +DECL_WRAPPER_WITHID(ScCondFormatDataBarDlgWrapper) DECL_WRAPPER_WITHID(ScSolverDlgWrapper) DECL_WRAPPER_WITHID(ScOptSolverDlgWrapper) DECL_WRAPPER_WITHID(ScPivotLayoutWrapper) diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 73eb0516372a..6cfd3f8cea88 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1769,7 +1769,21 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_OPENDLG_COLORSCALE: case SID_OPENDLG_DATABAR: { - sal_uInt16 nId = ScCondFormatDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = 0; + switch( nSlot ) + { + case SID_OPENDLG_CONDFRMT: + nId = ScCondFormatConditionDlgWrapper::GetChildWindowId(); + break; + case SID_OPENDLG_COLORSCALE: + nId = ScCondFormatColorScaleDlgWrapper::GetChildWindowId(); + break; + case SID_OPENDLG_DATABAR: + nId = ScCondFormatDataBarDlgWrapper::GetChildWindowId(); + break; + default: + break; + } SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx index b31b1b2ac744..dfc2b1deab24 100644 --- a/sc/source/ui/view/reffact.cxx +++ b/sc/source/ui/view/reffact.cxx @@ -44,7 +44,9 @@ SFX_IMPL_MODELESSDIALOG_WITHID(ScNameDlgWrapper, FID_DEFINE_NAME ) SFX_IMPL_MODELESSDIALOG_WITHID(ScNameDefDlgWrapper, FID_ADD_NAME ) -SFX_IMPL_MODELESSDIALOG_WITHID(ScCondFormatDlgWrapper, SID_OPENDLG_CONDFRMT ) +SFX_IMPL_MODELESSDIALOG_WITHID(ScCondFormatConditionDlgWrapper, SID_OPENDLG_CONDFRMT ) +SFX_IMPL_MODELESSDIALOG_WITHID(ScCondFormatColorScaleDlgWrapper, SID_OPENDLG_COLORSCALE ) +SFX_IMPL_MODELESSDIALOG_WITHID(ScCondFormatDataBarDlgWrapper, SID_OPENDLG_DATABAR ) SFX_IMPL_MODELESSDIALOG_WITHID(ScSolverDlgWrapper, SID_OPENDLG_SOLVE ) SFX_IMPL_MODELESSDIALOG_WITHID(ScOptSolverDlgWrapper, SID_OPENDLG_OPTSOLVER ) SFX_IMPL_MODELESSDIALOG_WITHID(ScPivotLayoutWrapper, SID_OPENDLG_PIVOTTABLE ) @@ -117,10 +119,22 @@ IMPL_CHILD_CTOR( ScNameDlgWrapper, FID_DEFINE_NAME ) IMPL_CHILD_CTOR( ScNameDefDlgWrapper, FID_ADD_NAME ) //------------------------------------------------------------------------- -// ScNameDlgWrapper +// ScCondFormatConditionDlgWrapper +//------------------------------------------------------------------------- + +IMPL_CHILD_CTOR( ScCondFormatConditionDlgWrapper, SID_OPENDLG_CONDFRMT ) + +//------------------------------------------------------------------------- +// ScCondFormatColorScaleDlgWrapper +//------------------------------------------------------------------------- + +IMPL_CHILD_CTOR( ScCondFormatColorScaleDlgWrapper, SID_OPENDLG_COLORSCALE ) + +//------------------------------------------------------------------------- +// ScCondFormatDataBarDlgWrapper //------------------------------------------------------------------------- -IMPL_CHILD_CTOR( ScCondFormatDlgWrapper, SID_OPENDLG_CONDFRMT ) +IMPL_CHILD_CTOR( ScCondFormatDataBarDlgWrapper, SID_OPENDLG_DATABAR ) //------------------------------------------------------------------------- // ScSolverDlgWrapper diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx index d4928196a425..4e744a0b9466 100644 --- a/sc/source/ui/view/tabvwsh.cxx +++ b/sc/source/ui/view/tabvwsh.cxx @@ -63,7 +63,9 @@ SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL)) SFX_CHILDWINDOW_REGISTRATION(SID_TASKPANE); SFX_CHILDWINDOW_REGISTRATION(ScNameDlgWrapper::GetChildWindowId()); SFX_CHILDWINDOW_REGISTRATION(ScNameDefDlgWrapper::GetChildWindowId()); - SFX_CHILDWINDOW_REGISTRATION(ScCondFormatDlgWrapper::GetChildWindowId()); + SFX_CHILDWINDOW_REGISTRATION(ScCondFormatConditionDlgWrapper::GetChildWindowId()); + SFX_CHILDWINDOW_REGISTRATION(ScCondFormatColorScaleDlgWrapper::GetChildWindowId()); + SFX_CHILDWINDOW_REGISTRATION(ScCondFormatDataBarDlgWrapper::GetChildWindowId()); SFX_CHILDWINDOW_REGISTRATION(ScSolverDlgWrapper::GetChildWindowId()); SFX_CHILDWINDOW_REGISTRATION(ScOptSolverDlgWrapper::GetChildWindowId()); SFX_CHILDWINDOW_REGISTRATION(ScPivotLayoutWrapper::GetChildWindowId()); diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx index aeb7f3bee453..6ef470ac9d23 100644 --- a/sc/source/ui/view/tabvwshc.cxx +++ b/sc/source/ui/view/tabvwshc.cxx @@ -65,8 +65,6 @@ #include "reffact.hxx" #include "condformatdlg.hxx" -#include <iostream> - //------------------------------------------------------------------ void ScTabViewShell::SetCurRefDlgId( sal_uInt16 nNew ) @@ -187,7 +185,6 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog( case SID_OPENDLG_COLORSCALE: case SID_OPENDLG_DATABAR: { - std::cout << "Open Dlg" << std::endl; ScRangeList aRangeList; ScViewData* pData = GetViewData(); pData->GetMarkData().FillRangeListWithMarks(&aRangeList, false); |