From 16d50ae144d4ddd86177bd35ddd0b79529fbf79e Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Fri, 18 Jan 2013 14:38:48 +0100 Subject: add all the new conditional formats to the menu, related fdo#58778 Change-Id: I398fac5c585b5ea6e40331b50119c90c180a32bc --- .../data/org/openoffice/Office/UI/CalcCommands.xcu | 10 +++++ sc/inc/sc.hrc | 2 + sc/sdi/cellsh.sdi | 2 + sc/sdi/scalc.sdi | 50 ++++++++++++++++++++++ sc/source/ui/condformat/condformatdlg.cxx | 8 +++- sc/source/ui/inc/condformatdlg.hxx | 4 +- sc/source/ui/view/cellsh1.cxx | 9 ++++ sc/uiconfig/scalc/menubar/menubar.xml | 2 + 8 files changed, 85 insertions(+), 2 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu index b5b8bfda6389..f23b383ccde1 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu @@ -459,6 +459,16 @@ Data Bar... + + + Icon Set... + + + + + Date... + + Manage... diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index fb488d2c2053..e410b635d681 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -245,6 +245,8 @@ #define SC_HINT_NAVIGATOR_UPDATEALL (SC_MESSAGE_START + 65) #define SID_OPENDLG_COLORSCALE (SC_MESSAGE_START + 66) #define SID_OPENDLG_DATABAR (SC_MESSAGE_START + 67) +#define SID_OPENDLG_ICONSET (SC_MESSAGE_START + 68) +#define SID_OPENDLG_CONDDATE (SC_MESSAGE_START + 69) // functions diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi index d03e3f538a7f..7d8bfb14b8ab 100644 --- a/sc/sdi/cellsh.sdi +++ b/sc/sdi/cellsh.sdi @@ -183,6 +183,8 @@ interface CellSelection SID_OPENDLG_CONDFRMT [ ExecMethod = ExecuteEdit; StateMethod = GetState; ] SID_OPENDLG_COLORSCALE [ ExecMethod = ExecuteEdit; ] SID_OPENDLG_DATABAR [ ExecMethod = ExecuteEdit; ] + SID_OPENDLG_ICONSET [ ExecMethod = ExecuteEdit; ] + SID_OPENDLG_CONDDATE [ ExecMethod = ExecuteEdit; ] SID_OPENDLG_CONDFRMT_MANAGER [ ExecMethod = ExecuteEdit; ] SID_COLORSCALE [ ExecMethod = ExecuteEdit; ] SID_DATABAR [ ExecMethod = ExecuteEdit; ] diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index ac53029881a3..7ab61a12038b 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -1134,6 +1134,56 @@ SfxVoidItem DataBarFormatDialog SID_OPENDLG_DATABAR GroupId = GID_FORMAT; ] +//-------------------------------------------------------------------------- +SfxVoidItem IconSetFormatDialog SID_OPENDLG_ICONSET +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = TRUE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_FORMAT; +] + +//-------------------------------------------------------------------------- +SfxVoidItem CondDateFormatDialog SID_OPENDLG_CONDDATE +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = TRUE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_FORMAT; +] + //-------------------------------------------------------------------------- SfxVoidItem ConditionalFormatManagerDialog SID_OPENDLG_CONDFRMT_MANAGER () diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 8b5960e0cfc3..784f1ed94c46 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -119,7 +119,13 @@ ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocum case condformat::dialog::DATABAR: maEntries.push_back(new ScDataBarFrmtEntry( this, mpDoc, maPos )); break; - default: + case condformat::dialog::ICONSET: + maEntries.push_back(new ScIconSetFrmtEntry( this, mpDoc, maPos )); + break; + case condformat::dialog::DATE: + maEntries.push_back(new ScDateFrmtEntry( this, mpDoc )); + break; + case condformat::dialog::NONE: break; } } diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index 262a9765f106..2f8fc1a25023 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -58,7 +58,9 @@ enum ScCondFormatDialogType NONE, CONDITION, COLORSCALE, - DATABAR + DATABAR, + ICONSET, + DATE }; } diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 4654596e529b..5c4d42bfb0a0 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1759,6 +1759,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_OPENDLG_CONDFRMT: case SID_OPENDLG_COLORSCALE: case SID_OPENDLG_DATABAR: + case SID_OPENDLG_ICONSET: + case SID_OPENDLG_CONDDATE: { ScRangeList aRangeList; @@ -1865,7 +1867,14 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_OPENDLG_DATABAR: eType = condformat::dialog::DATABAR; break; + case SID_OPENDLG_ICONSET: + eType = condformat::dialog::ICONSET; + break; + case SID_OPENDLG_CONDDATE: + eType = condformat::dialog::DATE; + break; default: + assert(false); break; } pCondFormatDlg.reset( new ScCondFormatDlg( pTabViewShell->GetDialogParent(), pDoc, NULL, aRangeList, aRangeList.GetTopLeftCorner(), eType ) ); diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml index aabe873819d6..05442102ab02 100644 --- a/sc/uiconfig/scalc/menubar/menubar.xml +++ b/sc/uiconfig/scalc/menubar/menubar.xml @@ -292,6 +292,8 @@ + + -- cgit