officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu | 22 ++++++ sw/inc/cmdid.h | 2 sw/sdi/_viewsh.sdi | 12 +++ sw/sdi/swriter.sdi | 36 ++++++++++ sw/source/uibase/uiview/view2.cxx | 11 ++- sw/source/uibase/uiview/viewstat.cxx | 2 sw/uiconfig/swriter/toolbar/changes.xml | 2 7 files changed, 85 insertions(+), 2 deletions(-)
New commits: commit 1496a1831d1be0a2d24be9fe3ecf627b2664e938 Author: Gabor Kelemen <kelemen.gab...@nisz.hu> AuthorDate: Wed Jul 31 08:37:28 2019 +0200 Commit: László Németh <nem...@numbertext.org> CommitDate: Wed Sep 4 14:32:58 2019 +0200 tdf#101977 change tracking: add 'Accept/Reject and jump to next' commands to Track Changes toolbar by creating the new Writer UNO command .uno:RejectTrackedChangeToNext and .uno:AcceptTrackedChangeToNext. Note: This feature is similar to what Word does by default. Change-Id: Ic5d7f5663217c605ccbee2f16b49e76522f911e6 Reviewed-on: https://gerrit.libreoffice.org/76719 Reviewed-by: László Németh <nem...@numbertext.org> Tested-by: László Németh <nem...@numbertext.org> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index 3867e735dfd5..c17d52bcb2a2 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -238,6 +238,17 @@ <value>1</value> </prop> </node> + <node oor:name=".uno:RejectTrackedChangeToNext" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Reject and Move to Next</value> + </prop> + <prop oor:name="TooltipLabel" oor:type="xs:string"> + <value xml:lang="en-US">Reject Track Change and select the next one</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> <node oor:name=".uno:RejectAllTrackedChanges" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Reject All</value> @@ -266,6 +277,17 @@ <value>1</value> </prop> </node> + <node oor:name=".uno:AcceptTrackedChangeToNext" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Accept and Move to Next</value> + </prop> + <prop oor:name="TooltipLabel" oor:type="xs:string"> + <value xml:lang="en-US">Accept Track Change and select the next one</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> <node oor:name=".uno:AcceptAllTrackedChanges" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Accept All</value> diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 32a434f997c7..0916d97c90cd 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -141,6 +141,8 @@ #define FN_REDLINE_PREV_CHANGE (FN_EDIT2 + 42) /* Go to the previous change */ #define FN_REDLINE_ACCEPT_ALL (FN_EDIT2 + 43) /* Redlining Accept All*/ #define FN_REDLINE_REJECT_ALL (FN_EDIT2 + 44) /* Redlining Reject All*/ +#define FN_REDLINE_ACCEPT_TONEXT (FN_EDIT2 + 45) /* Redlining Accept and jump to next*/ +#define FN_REDLINE_REJECT_TONEXT (FN_EDIT2 + 46) /* Redlining Reject and jump to next*/ // Region: Edit #define FN_REFRESH_VIEW (FN_VIEW + 1) /* Refresh/Redraw */ diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi index 824eb2f0e6e3..ad97fe844319 100644 --- a/sw/sdi/_viewsh.sdi +++ b/sw/sdi/_viewsh.sdi @@ -152,6 +152,18 @@ interface BaseTextEditView StateMethod = GetState ; DisableFlags="SfxDisableFlags::SwOnMailboxEditor"; ] + FN_REDLINE_ACCEPT_TONEXT + [ + ExecMethod = Execute; + StateMethod = GetState; + DisableFlags="SfxDisableFlags::SwOnMailboxEditor"; + ] + FN_REDLINE_REJECT_TONEXT + [ + ExecMethod = Execute; + StateMethod = GetState; + DisableFlags="SfxDisableFlags::SwOnMailboxEditor"; + ] SID_DOCUMENT_COMPARE // status(play) [ diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index bb5d67ce161b..3f96725b5bf8 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -7345,6 +7345,42 @@ SfxVoidItem PreviousTrackedChange FN_REDLINE_PREV_CHANGE GroupId = SfxGroupId::Edit; ] +SfxVoidItem AcceptTrackedChangeToNext FN_REDLINE_ACCEPT_TONEXT +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::Edit; +] + +SfxVoidItem RejectTrackedChangeToNext FN_REDLINE_REJECT_TONEXT +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::Edit; +] + SfxVoidItem NavigateBack FN_NAVIGATION_BACK [ AutoUpdate = TRUE, diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index fb43ba7a3cf8..bfc36246debc 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -668,6 +668,8 @@ void SwView::Execute(SfxRequest &rReq) break; case FN_REDLINE_ACCEPT_DIRECT: case FN_REDLINE_REJECT_DIRECT: + case FN_REDLINE_ACCEPT_TONEXT: + case FN_REDLINE_REJECT_TONEXT: { SwDoc *pDoc = m_pWrtShell->GetDoc(); SwPaM *pCursor = m_pWrtShell->GetCursor(); @@ -685,7 +687,7 @@ void SwView::Execute(SfxRequest &rReq) if( pCursor->HasMark() && nRedline == SwRedlineTable::npos) { - if (FN_REDLINE_ACCEPT_DIRECT == nSlot) + if (FN_REDLINE_ACCEPT_DIRECT == nSlot || FN_REDLINE_ACCEPT_TONEXT == nSlot) m_pWrtShell->AcceptRedlinesInSelection(); else m_pWrtShell->RejectRedlinesInSelection(); @@ -711,12 +713,17 @@ void SwView::Execute(SfxRequest &rReq) assert(pRedline != nullptr); if (pRedline) { - if (FN_REDLINE_ACCEPT_DIRECT == nSlot) + if (FN_REDLINE_ACCEPT_DIRECT == nSlot || FN_REDLINE_ACCEPT_TONEXT == nSlot) m_pWrtShell->AcceptRedline(nRedline); else m_pWrtShell->RejectRedline(nRedline); } } + if (FN_REDLINE_ACCEPT_TONEXT == nSlot || FN_REDLINE_REJECT_TONEXT == nSlot) + { + // Go to next change after accepting or rejecting one (tdf#101977) + GetViewFrame()->GetDispatcher()->Execute(FN_REDLINE_NEXT_CHANGE, SfxCallMode::ASYNCHRON); + } } break; diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index c901557a145b..a5bd1d13b527 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -307,6 +307,8 @@ void SwView::GetState(SfxItemSet &rSet) break; case FN_REDLINE_ACCEPT_DIRECT: case FN_REDLINE_REJECT_DIRECT: + case FN_REDLINE_ACCEPT_TONEXT: + case FN_REDLINE_REJECT_TONEXT: { SwDoc *pDoc = m_pWrtShell->GetDoc(); SwPaM *pCursor = m_pWrtShell->GetCursor(); diff --git a/sw/uiconfig/swriter/toolbar/changes.xml b/sw/uiconfig/swriter/toolbar/changes.xml index 9865acd2eb4b..89f1e40c16cb 100644 --- a/sw/uiconfig/swriter/toolbar/changes.xml +++ b/sw/uiconfig/swriter/toolbar/changes.xml @@ -27,6 +27,8 @@ <toolbar:toolbaritem xlink:href=".uno:RejectTrackedChange"/> <toolbar:toolbaritem xlink:href=".uno:AcceptAllTrackedChanges"/> <toolbar:toolbaritem xlink:href=".uno:RejectAllTrackedChanges"/> + <toolbar:toolbaritem xlink:href=".uno:AcceptTrackedChangeToNext"/> + <toolbar:toolbaritem xlink:href=".uno:RejectTrackedChangeToNext"/> <toolbar:toolbaritem xlink:href=".uno:AcceptTrackedChanges"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:InsertAnnotation"/> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits