[Libreoffice-commits] .: Branch 'feature/cond-format-rework' - 3 commits - officecfg/registry sc/inc sc/sdi sc/source sc/uiconfig
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Oct 5 17:37:52 PDT 2012
officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu | 12 ++
sc/inc/sc.hrc | 4
sc/sdi/cellsh.sdi | 2
sc/sdi/scalc.sdi | 50 ++++++++++
sc/source/ui/condformat/condformatdlg.cxx | 2
sc/source/ui/view/cellsh1.cxx | 9 +
sc/uiconfig/scalc/menubar/menubar.xml | 2
7 files changed, 76 insertions(+), 5 deletions(-)
New commits:
commit a0e1b623d1e01575f7e7cbd80bb3f5a50e9ce5e6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sat Oct 6 02:32:07 2012 +0200
implement the menu strucutre from Astron's proposal
Change-Id: I46b751f033f2b4f08461b2eaae8ad16c1487f1c0
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index e6767b7..7418498 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -446,7 +446,17 @@
</node>
<node oor:name=".uno:ConditionalFormatDialog" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Conditional Formatting...</value>
+ <value xml:lang="en-US">Condition...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ColorScaleFormatDialog" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Color Scale...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DataBarFormatDialog" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Data Bar...</value>
</prop>
</node>
<node oor:name=".uno:ConditionalFormatManagerDialog" oor:op="replace">
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 51cebf3..e47ee57 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -250,7 +250,9 @@
#define SID_OPENDLG_OPTSOLVER (SC_MESSAGE_START + 60)
#define SID_VALIDITY_REFERENCE (SC_MESSAGE_START + 61)
#define SID_OPENDLG_CONDFRMT_MANAGER (SC_MESSAGE_START + 62)
-#define SC_HINT_NAVIGATOR_UPDATEALL (SC_MESSAGE_START + 65)
+#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)
// functions
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 77eea5c..15233b6 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -189,6 +189,8 @@ interface CellSelection
SID_CANCEL [ ExecMethod = Execute; ]
SID_TOGGLE_REL [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_OPENDLG_CONDFRMT [ ExecMethod = ExecuteEdit; ]
+ SID_OPENDLG_COLORSCALE [ ExecMethod = ExecuteEdit; ]
+ SID_OPENDLG_DATABAR [ 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 f9d7057..a4532ff 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -1094,6 +1094,56 @@ SfxVoidItem ConditionalFormatDialog SID_OPENDLG_CONDFRMT
]
//--------------------------------------------------------------------------
+SfxVoidItem ColorScaleFormatDialog SID_OPENDLG_COLORSCALE
+()
+[
+ /* 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 DataBarFormatDialog SID_OPENDLG_DATABAR
+()
+[
+ /* 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/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 3d292f6..c4b21f3 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2035,6 +2035,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
break;
case SID_OPENDLG_CONDFRMT:
+ case SID_OPENDLG_COLORSCALE:
+ case SID_OPENDLG_DATABAR:
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index 0bff97c..621586e 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -277,6 +277,8 @@
<menu:menu menu:id=".uno:ConditionalFormatMenu">
<menu:menupopup>
<menu:menuitem menu:id=".uno:ConditionalFormatDialog"/>
+ <menu:menuitem menu:id=".uno:ColorScaleFormatDialog"/>
+ <menu:menuitem menu:id=".uno:DataBarFormatDialog"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:ConditionalFormatManagerDialog"/>
</menu:menupopup>
commit 6e633acb48f491b80f8a85a0f6fb5e6b6e40747f
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sat Oct 6 01:15:10 2012 +0200
onyl show the exisiting cond format if the range is equal
Change-Id: I6a183b41261f1813b1cce277f3fe4a276ab07bb0
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index b468530..3d292f6 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2061,9 +2061,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
const ScConditionalFormat* pCondFormat = pDoc->GetCondFormat(aPos.Col(), aPos.Row(), aPos.Tab());
if(pCondFormat)
{
- pDlg.reset(pFact->CreateScCondFormatDlg( pTabViewShell->GetDialogParent(), pDoc, pCondFormat, pCondFormat->GetRange(), aPos, RID_SCDLG_CONDFORMAT ));
+ const ScRangeList& rCondFormatRange = pCondFormat->GetRange();
+ if(rCondFormatRange == aRangeList)
+ pDlg.reset(pFact->CreateScCondFormatDlg( pTabViewShell->GetDialogParent(), pDoc, pCondFormat, pCondFormat->GetRange(), aPos, RID_SCDLG_CONDFORMAT ));
}
- else
+
+ if(!pDlg)
{
pDlg.reset(pFact->CreateScCondFormatDlg( pTabViewShell->GetDialogParent(), pDoc, NULL, aRangeList, aRangeList.GetTopLeftCorner(), RID_SCDLG_CONDFORMAT ));
}
commit 30aa08f660d4beba7652a202eea60eb881f99f9a
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sat Oct 6 01:13:57 2012 +0200
fix another crash in cond format dialog with range name list
Change-Id: I84f9c71fd7f80ad9300f4f7b2c273cd9af0f075e
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 2e294f2..e2f8d67 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -1116,7 +1116,7 @@ ScConditionalFormat* ScCondFormatDlg::GetConditionalFormat() const
sal_uInt16 nFlags = aRange.Parse(aRangeStr, mpDoc, SCA_VALID, mpDoc->GetAddressConvention());
ScConditionalFormat* pFormat = maCondFormList.GetConditionalFormat();
- if(nFlags & SCA_VALID && !aRange.empty())
+ if(nFlags & SCA_VALID && !aRange.empty() && pFormat)
pFormat->AddRange(aRange);
return pFormat;
More information about the Libreoffice-commits
mailing list