diff options
Diffstat (limited to 'sc/source/ui/view/cellsh1.cxx')
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 7ce2a6a55ed0..ee6d5bd9a4a0 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -2061,7 +2061,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { pDlg = pFact->CreateScCondFormatDlg( pTabViewShell->GetDialogParent(), pDoc, NULL, aRangeList, aPos, RID_SCDLG_CONDFORMAT ); } - OSL_ENSURE(pDlg, "Dialog create fail!"); + if(pDlg->Execute() == RET_OK) { ScConditionalFormat* pFormat = pDlg->GetConditionalFormat(); @@ -2074,6 +2074,33 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) } break; + case SID_OPENDLG_CONDFRMT_MANAGER: + { + ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); + OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); + + ScRangeList aRangeList; + ScViewData* pData = GetViewData(); + pData->GetMarkData().FillRangeListWithMarks(&aRangeList, false); + ScDocument* pDoc = pData->GetDocument(); + + ScAddress aPos(pData->GetCurX(), pData->GetCurY(), pData->GetTabNo()); + if(aRangeList.empty()) + { + ScRange* pRange = new ScRange(aPos); + aRangeList.push_back(pRange); + } + + ScConditionalFormatList* pList = pDoc->GetCondFormList( aPos.Tab() ); + AbstractScCondFormatManagerDlg* pDlg = pFact->CreateScCondFormatMgrDlg( pTabViewShell->GetDialogParent(), pDoc, pList, aRangeList, aPos, RID_SCDLG_COND_FORMAT_MANAGER); + if(pDlg->Execute() == RET_OK) + { + pDoc->SetCondFormList(pDlg->GetConditionalFormatList(), aPos.Tab()); + } + delete pDlg; + } + break; + case SID_COLORSCALE: { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); |