[Libreoffice-commits] core.git: officecfg/registry sc/inc sc/sdi sc/source sc/uiconfig
Gulsah Kose
gulsah.1004 at gmail.com
Thu Apr 20 13:59:44 UTC 2017
officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu | 5 ++
sc/inc/sc.hrc | 1
sc/sdi/cellsh.sdi | 1
sc/sdi/scalc.sdi | 18 ++++++++++
sc/source/ui/view/cellsh.cxx | 1
sc/source/ui/view/cellsh1.cxx | 17 +++++++++
sc/uiconfig/scalc/menubar/menubar.xml | 1
7 files changed, 44 insertions(+)
New commits:
commit 38ba5bfa215231f5937abebafd075a58c227e7ca
Author: Gulsah Kose <gulsah.1004 at gmail.com>
Date: Mon Apr 17 09:13:24 2017 +0300
tdf#107143 Add delete all comments command.
Change-Id: I1375375543172146a27ed4225f584121f9945a8c
Signed-off-by: Gulsah Kose <gulsah.1004 at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/36623
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 80cedf097f18..dc0797652f9f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -961,6 +961,11 @@
<value xml:lang="en-US">Hide All Comments</value>
</prop>
</node>
+ <node oor:name=".uno:DeleteAllNotes" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Delete All Comments</value>
+ </prop>
+ </node>
<node oor:name=".uno:InsertAnnotation" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Comm~ent</value>
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 83852ab497f8..aa32f3c66a42 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -643,6 +643,7 @@
#define FID_HIDE_NOTE (SID_NEW_SLOTS+101)
#define FID_SHOW_ALL_NOTES (SID_NEW_SLOTS+102)
#define FID_HIDE_ALL_NOTES (SID_NEW_SLOTS+103)
+#define FID_DELETE_ALL_NOTES (SID_NEW_SLOTS+104)
// idl parameter
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 96186e65fe15..8e80db555901 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -211,6 +211,7 @@ interface CellSelection
FID_SHOW_NOTE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_HIDE_ALL_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_SHOW_ALL_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
+ FID_DELETE_ALL_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_DELETE_NOTE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_DEC_INDENT [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
SID_INC_INDENT [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 1b3f90105ae6..f2737bffb9a2 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -3634,6 +3634,24 @@ SfxVoidItem HideAllNotes FID_HIDE_ALL_NOTES
GroupId = GID_VIEW;
]
+SfxVoidItem DeleteAllNotes FID_DELETE_ALL_NOTES
+
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
SfxVoidItem DeleteNote SID_DELETE_NOTE
(SvxPostItIdItem Id SID_ATTR_POSTIT_ID)
[
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index ca710f4376c5..b432808cbebc 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -1045,6 +1045,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case FID_SHOW_ALL_NOTES:
case FID_HIDE_ALL_NOTES:
+ case FID_DELETE_ALL_NOTES:
{
bool bHasNotes = false;
for (auto const& rTab : rMark.GetSelectedTabs())
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index f16b182ba4b3..ee3d5b714361 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2379,6 +2379,23 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
break;
+ case FID_DELETE_ALL_NOTES:
+ {
+ ScViewData* pData = GetViewData();
+ ScMarkData& rMark = pData->GetMarkData();
+ ScMarkData aNewMark;
+ ScRangeList aRangeList;
+
+ for (auto const& rTab : rMark.GetSelectedTabs())
+ {
+ aRangeList.Append(ScRange(0,0,rTab,MAXCOL,MAXROW,rTab));
+ }
+
+ aNewMark.MarkFromRangeList( aRangeList, true );
+ pData->GetDocShell()->GetDocFunc().DeleteContents(aNewMark, InsertDeleteFlags::NOTE, true, false );
+ }
+ break;
+
case SID_CHARMAP:
if( pReqArgs != nullptr )
{
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index 647c87db3c8f..afb04b77c26b 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -546,6 +546,7 @@
<menu:menuitem menu:id=".uno:HideAllNotes"/>
<menu:menuitem menu:id=".uno:ShowAllNotes"/>
<menu:menuitem menu:id=".uno:DeleteNote"/>
+ <menu:menuitem menu:id=".uno:DeleteAllNotes"/>
</menu:menupopup>
</menu:menu>
<menu:menuitem menu:id=".uno:Delete"/>
More information about the Libreoffice-commits
mailing list