summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-06-01 05:41:51 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-06-11 08:01:22 +0200
commitf76aa6633452b1bc82d6742986b86f7045c3a7a0 (patch)
tree2d590799fe20328bc6d8a6eaf97d65d10d043542 /sc/source/ui/view
parent17675467b695967bcb02356be617448949ee60a5 (diff)
first part for new conditional format dialog
Change-Id: I97d025e468d6c90cdb780c3654706df20300429a
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/cellsh.cxx14
-rw-r--r--sc/source/ui/view/cellsh1.cxx28
-rw-r--r--sc/source/ui/view/cellsh3.cxx10
-rw-r--r--sc/source/ui/view/reffact.cxx7
-rw-r--r--sc/source/ui/view/tabview3.cxx1
-rw-r--r--sc/source/ui/view/tabvwsh.cxx1
-rw-r--r--sc/source/ui/view/tabvwshc.cxx15
7 files changed, 12 insertions, 64 deletions
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 62150edd97d8..a9a9e1d5e0a2 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -222,20 +222,6 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
|| ((nCol2 - nCol1) < 2) || ((nRow2 - nRow1) < 2);
break;
- case SID_OPENDLG_CONDFRMT :
- {
- if ( !bEditable && bOnlyNotBecauseOfMatrix )
- {
- bNeedEdit = false;
- }
- if ( pDocShell && pDocShell->IsDocShared() )
- {
- bDisable = sal_True;
- }
- }
- break;
-
- case FID_CONDITIONAL_FORMAT :
case SID_CELL_FORMAT_RESET :
case FID_CELL_FORMAT :
case SID_ENABLE_HYPHENATION :
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 32a8bc87cf68..f6f15a325fac 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -26,7 +26,7 @@
*
************************************************************************/
-
+#include <iostream>
//------------------------------------------------------------------
@@ -2049,23 +2049,19 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
break;
- case FID_CONDITIONAL_FORMAT:
- if( pReqArgs )
+ case SID_OPENDLG_CONDFRMT:
{
- const SfxPoolItem* pItem;
- if( pReqArgs->HasItem( FID_CONDITIONAL_FORMAT, &pItem ) )
- {
- // when RefInput has switched to other tabs as data table, switch back
- if ( GetViewData()->GetTabNo() != GetViewData()->GetRefTabNo() )
- {
- pTabViewShell->SetTabNo( GetViewData()->GetRefTabNo() );
- pTabViewShell->PaintExtras();
- }
+ ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- const ScCondFrmtItem* pCndFmtItem = (const ScCondFrmtItem*) pItem;
- pTabViewShell->SetConditionalFormat( pCndFmtItem->GetData() );
- rReq.Done();
- }
+ ScRangeList aRangeList;
+ GetViewData()->GetMarkData().FillRangeListWithMarks(&aRangeList, false);
+ ScDocument* pDoc = GetViewData()->GetDocument();
+
+ AbstractScCondFormatDlg* pDlg = pFact->CreateScCondFormatDlg( pTabViewShell->GetDialogParent(), pDoc, NULL, aRangeList, RID_SCDLG_CONDFORMAT );
+ OSL_ENSURE(pDlg, "Dialog create fail!");
+ pDlg->Execute();
+ delete pDlg;
}
break;
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 24c97b21fb0b..9c5a417aaab5 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -886,16 +886,6 @@ void ScCellShell::Execute( SfxRequest& rReq )
}
break;
- case SID_OPENDLG_CONDFRMT:
- {
- sal_uInt16 nId = ScCondFormatDlgWrapper::GetChildWindowId();
- SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
-
- pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
- }
- break;
-
// ----------------------------------------------------------------
case FID_INPUTLINE_STATUS:
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 5c6d23f59aed..d7247deddaef 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -53,7 +53,6 @@ SFX_IMPL_MODELESSDIALOG(ScSpecialFilterDlgWrapper, SID_SPECIAL_FILTER )
SFX_IMPL_MODELESSDIALOG(ScDbNameDlgWrapper, SID_DEFINE_DBNAME )
SFX_IMPL_MODELESSDIALOG(ScConsolidateDlgWrapper, SID_OPENDLG_CONSOLIDATE )
SFX_IMPL_MODELESSDIALOG(ScPrintAreasDlgWrapper, SID_OPENDLG_EDIT_PRINTAREA )
-SFX_IMPL_MODELESSDIALOG(ScCondFormatDlgWrapper, SID_OPENDLG_CONDFRMT )
SFX_IMPL_MODELESSDIALOG(ScColRowNameRangesDlgWrapper, SID_DEFINE_COLROWNAMERANGES )
SFX_IMPL_MODELESSDIALOG(ScFormulaDlgWrapper, SID_OPENDLG_FUNCTION )
SFX_IMPL_MODELESSDIALOG(ScAcceptChgDlgWrapper, FID_CHG_ACCEPT )
@@ -182,12 +181,6 @@ IMPL_CHILD_CTOR( ScConsolidateDlgWrapper, SID_OPENDLG_CONSOLIDATE )
IMPL_CHILD_CTOR( ScPrintAreasDlgWrapper, SID_OPENDLG_EDIT_PRINTAREA )
//-------------------------------------------------------------------------
-// ScCondFormatDlgWrapper
-//-------------------------------------------------------------------------
-
-IMPL_CHILD_CTOR( ScCondFormatDlgWrapper, SID_OPENDLG_CONDFRMT )
-
-//-------------------------------------------------------------------------
// ScFormulaDlgWrapper
//-------------------------------------------------------------------------
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index e8b7be8c2993..0453de4d386b 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -430,7 +430,6 @@ void ScTabView::SelectionChanged()
rBindings.Invalidate( SID_INSERT_POSTIT );
rBindings.Invalidate( SID_CHARMAP );
rBindings.Invalidate( SID_OPENDLG_FUNCTION );
- rBindings.Invalidate( SID_OPENDLG_CONDFRMT );
rBindings.Invalidate( FID_VALIDATION );
rBindings.Invalidate( SID_EXTERNAL_SOURCE );
rBindings.Invalidate( SID_TEXT_TO_COLUMNS );
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index f2f37277687b..6c976cb6e6ec 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -72,7 +72,6 @@ SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL))
SFX_CHILDWINDOW_REGISTRATION(ScDbNameDlgWrapper::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(ScConsolidateDlgWrapper::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(ScPrintAreasDlgWrapper::GetChildWindowId());
- SFX_CHILDWINDOW_REGISTRATION(ScCondFormatDlgWrapper::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(ScColRowNameRangesDlgWrapper::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(ScFormulaDlgWrapper::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(SvxIMapDlgChildWindow::GetChildWindowId());
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index cef7f45bcb81..a92fca945f8b 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -52,7 +52,6 @@
#include "dbnamdlg.hxx"
#include "pvlaydlg.hxx"
#include "areasdlg.hxx"
-#include "condfrmt.hxx"
#include "rangeutl.hxx"
#include "crnrdlg.hxx"
#include "formula.hxx"
@@ -346,20 +345,6 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
}
break;
- case SID_OPENDLG_CONDFRMT:
- {
- ScViewData* pViewData = GetViewData();
-
- const ScConditionalFormat* pForm = pDoc->GetCondFormat(
- pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo() );
-
- // aktuelle Tabelle merken (wg. RefInput im Dialog)
- pViewData->SetRefTabNo( pViewData->GetTabNo() );
-
- pResult = new ScConditionalFormatDlg( pB, pCW, pParent, pDoc, pForm );
- }
- break;
-
case SID_OPENDLG_FUNCTION:
{
// Dialog schaut selber, was in der Zelle steht