sw lok: add Accept/Reject All tracked changes, tdf#101977

Change-Id: I04d747343e24cb498a621c965d034d0791411d83
Reviewed-on: https://gerrit.libreoffice.org/44311
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 96b6ab2..8919114 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1617,7 +1617,9 @@ static void doc_iniUnoCommands ()
        OUString(".uno:TrackChanges"),
        OUString(".uno:ShowTrackedChanges"),
        OUString(".uno:NextTrackedChange"),
        OUString(".uno:PreviousTrackedChange")
        OUString(".uno:PreviousTrackedChange"),
        OUString(".uno:AcceptAllTrackedChanges"),
        OUString(".uno:RejectAllTrackedChanges")
    };

    util::URL aCommandURL;
diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index b987e90..bce91f5 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -34,6 +34,7 @@ enum class SfxHintId {
    ModeChanged,
    ColorsChanged,
    LanguageChanged,
    RedlineChanged,

// VCL text hints
    TextParaInserted,
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 853d98a..5b3c5ed 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -228,6 +228,20 @@
          <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>
        </prop>
        <prop oor:name="TooltipLabel" oor:type="xs:string">
          <value xml:lang="en-US">Reject All Tracked Changes</value>
        </prop>
        <prop oor:name="PopupLabel" oor:type="xs:string">
          <value xml:lang="en-US">Reject All Changes</value>
        </prop>
        <prop oor:name="Properties" oor:type="xs:int">
          <value>1</value>
        </prop>
      </node>
      <node oor:name=".uno:AcceptTrackedChange" oor:op="replace">
        <prop oor:name="Label" oor:type="xs:string">
          <value xml:lang="en-US">Accept</value>
@@ -242,6 +256,20 @@
          <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>
        </prop>
        <prop oor:name="TooltipLabel" oor:type="xs:string">
          <value xml:lang="en-US">Accept All Tracked Changes</value>
        </prop>
        <prop oor:name="PopupLabel" oor:type="xs:string">
          <value xml:lang="en-US">Accept All Changes</value>
        </prop>
        <prop oor:name="Properties" oor:type="xs:int">
          <value>1</value>
        </prop>
      </node>
      <node oor:name=".uno:NextTrackedChange" oor:op="replace">
        <prop oor:name="Label" oor:type="xs:string">
          <value xml:lang="en-US">Next</value>
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 2db72d4..2dcbb0b 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1074,7 +1074,10 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c
             aEvent.FeatureURL.Path == "EntireColumn" ||
             aEvent.FeatureURL.Path == "EntireCell" ||
             aEvent.FeatureURL.Path == "SortAscending" ||
             aEvent.FeatureURL.Path == "SortDescending")
             aEvent.FeatureURL.Path == "SortDescending" ||
             aEvent.FeatureURL.Path == "AcceptAllTrackedChanges" ||
             aEvent.FeatureURL.Path == "RejectAllTrackedChanges")

    {
        aBuffer.append(aEvent.IsEnabled ? OUString("enabled") : OUString("disabled"));
    }
diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx
index f3a6f66..de115fa 100644
--- a/sw/inc/IDocumentRedlineAccess.hxx
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -218,6 +218,8 @@ public:

    virtual const SwRangeRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const = 0;

    virtual void AcceptAllRedline(/*[in]*/bool bAcceptReject) = 0;

    // Representation has changed, invalidate all Redlines.
    virtual void UpdateRedlineAttr() = 0;

diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index f321d18..651c720 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -140,6 +140,8 @@
#define FN_COPY_HYPERLINK_LOCATION   (FN_EDIT2 + 40)    /* copy hyperlink URL to clipboard */
#define FN_REDLINE_NEXT_CHANGE       (FN_EDIT2 + 41)    /* Go to the next change */
#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*/

// Region: Edit
#define FN_REFRESH_VIEW         (FN_VIEW + 1)   /* Refresh/Redraw */
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index b7eb339..b55e775 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -30,6 +30,8 @@
#include <UndoManager.hxx>
#include <cmdid.h>
#include <sfx2/viewsh.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/lokhelper.hxx>
#include <redline.hxx>
#include <IDocumentRedlineAccess.hxx>
@@ -91,6 +93,7 @@ public:
    void testUndoRepairResult();
    void testRedoRepairResult();
    void testDisableUndoRepair();
    void testAllTrackedChanges();


    CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
@@ -137,6 +140,7 @@ public:
    CPPUNIT_TEST(testUndoRepairResult);
    CPPUNIT_TEST(testRedoRepairResult);
    CPPUNIT_TEST(testDisableUndoRepair);
    CPPUNIT_TEST(testAllTrackedChanges);

    CPPUNIT_TEST_SUITE_END();

@@ -1813,6 +1817,76 @@ void SwTiledRenderingTest::testDisableUndoRepair()
    comphelper::LibreOfficeKit::setActive(false);
}

void SwTiledRenderingTest::testAllTrackedChanges()
{
    // Load a document.
    comphelper::LibreOfficeKit::setActive();
    createDoc("dummy.fodt");

    uno::Reference<beans::XPropertySet> xPropSet(mxComponent, uno::UNO_QUERY);
    xPropSet->setPropertyValue("RecordChanges", uno::makeAny(true));

    // view #1
    SwView* pView1 = dynamic_cast<SwView*>(SfxViewShell::Current());
    SwWrtShell* pWrtShell1 = pView1->GetWrtShellPtr();

    // view #2
    SfxLokHelper::createView();
    SwView* pView2 = dynamic_cast<SwView*>(SfxViewShell::Current());
    CPPUNIT_ASSERT(pView1 != pView2);
    SwWrtShell* pWrtShell2 = pView2->GetWrtShellPtr();
    // Insert text and reject all
    {
        pWrtShell1->SttDoc();
        pWrtShell1->Insert("hxx");

        pWrtShell2->EndDoc();
        pWrtShell2->Insert("cxx");
    }

    // Get the redline
    const SwRedlineTable& rTable = pWrtShell2->GetDoc()->getIDocumentRedlineAccess().GetRedlineTable();
    CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), rTable.size());
    {
        SfxVoidItem aItem(FN_REDLINE_REJECT_ALL);
        pView1->GetViewFrame()->GetDispatcher()->ExecuteList(FN_REDLINE_REJECT_ALL,
            SfxCallMode::SYNCHRON, { &aItem });
    }

    // The reject all was performed.
    CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(0), rTable.size());
    {
        SwShellCursor* pShellCursor = pWrtShell1->getShellCursor(false);
        CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb."), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
    }

    // Insert text and accept all
    {
        pWrtShell1->SttDoc();
        pWrtShell1->Insert("hyy");

        pWrtShell2->EndDoc();
        pWrtShell2->Insert("cyy");
    }

    CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), rTable.size());
    {
        SfxVoidItem aItem(FN_REDLINE_ACCEPT_ALL);
        pView1->GetViewFrame()->GetDispatcher()->ExecuteList(FN_REDLINE_ACCEPT_ALL,
            SfxCallMode::SYNCHRON, { &aItem });
    }

    // The accept all was performed
    CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(0), rTable.size());
    {
        SwShellCursor* pShellCursor = pWrtShell2->getShellCursor(false);
        CPPUNIT_ASSERT_EQUAL(OUString("hyyAaa bbb.cyy"), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
    }

    comphelper::LibreOfficeKit::setActive(false);
}


CPPUNIT_TEST_SUITE_REGISTRATION(SwTiledRenderingTest);

CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/sdi/docsh.sdi b/sw/sdi/docsh.sdi
index 511823f..503de50 100644
--- a/sw/sdi/docsh.sdi
+++ b/sw/sdi/docsh.sdi
@@ -61,6 +61,16 @@ interface TextDocument : BaseTextDocument
        ExecMethod = Execute;
        StateMethod = GetState;
    ]
    FN_REDLINE_ACCEPT_ALL
    [
        ExecMethod = Execute;
        StateMethod = GetState;
    ]
    FN_REDLINE_REJECT_ALL
    [
        ExecMethod = Execute;
        StateMethod = GetState;
    ]
}

shell SwDocShell
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 999b03c..90aa485 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -7220,6 +7220,24 @@ SfxVoidItem AcceptTrackedChange FN_REDLINE_ACCEPT_DIRECT
    GroupId = SfxGroupId::Edit;
]

SfxVoidItem AcceptAllTrackedChanges FN_REDLINE_ACCEPT_ALL
[
    AutoUpdate = FALSE,
    FastCall = FALSE,
    ReadOnlyDoc = FALSE,
    Toggle = FALSE,
    Container = FALSE,
    RecordAbsolute = FALSE,
    RecordPerSet;
    Asynchron;


    AccelConfig = TRUE,
    MenuConfig = TRUE,
    ToolBoxConfig = TRUE,
    GroupId = SfxGroupId::Edit;
]

SfxVoidItem RejectTrackedChange FN_REDLINE_REJECT_DIRECT
( SfxUInt32Item RejectTrackedChange FN_REDLINE_REJECT_DIRECT )
[
@@ -7239,6 +7257,24 @@ SfxVoidItem RejectTrackedChange FN_REDLINE_REJECT_DIRECT
    GroupId = SfxGroupId::Edit;
]

SfxVoidItem RejectAllTrackedChanges FN_REDLINE_REJECT_ALL
[
    AutoUpdate = FALSE,
    FastCall = FALSE,
    ReadOnlyDoc = FALSE,
    Toggle = FALSE,
    Container = FALSE,
    RecordAbsolute = FALSE,
    RecordPerSet;
    Asynchron;


    AccelConfig = TRUE,
    MenuConfig = TRUE,
    ToolBoxConfig = TRUE,
    GroupId = SfxGroupId::Edit;
]

SfxVoidItem NextTrackedChange FN_REDLINE_NEXT_CHANGE
( SfxUInt32Item NextTrackedChange FN_REDLINE_NEXT_CHANGE )
[
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index 8085f00..eea50f3 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -2344,6 +2344,38 @@ bool DocumentRedlineManager::RejectRedline( const SwPaM& rPam, bool bCallDelete 
    // #TODO - add 'SwExtraRedlineTable' also ?
}

void DocumentRedlineManager::AcceptAllRedline(bool bAccept)
{
    OUString sUndoStr;
    IDocumentUndoRedo& rUndoMgr = m_rDoc.GetIDocumentUndoRedo();

    if (mpRedlineTable->size() > 1)
    {
        {
            SwRewriter aRewriter;
            aRewriter.AddRule(UndoArg1, OUString::number(mpRedlineTable->size()));
            sUndoStr = aRewriter.Apply(SwResId(STR_N_REDLINES));
        }

        SwRewriter aRewriter;
        aRewriter.AddRule(UndoArg1, sUndoStr);
        rUndoMgr.StartUndo(bAccept ? SwUndoId::ACCEPT_REDLINE : SwUndoId::REJECT_REDLINE, &aRewriter);
    }

    while (mpRedlineTable->size() > 0)
    {
        if (bAccept)
            AcceptRedline(mpRedlineTable->size() - 1, true);
        else
            RejectRedline(mpRedlineTable->size() - 1, true);
    }

    if (!sUndoStr.isEmpty())
    {
        rUndoMgr.EndUndo(SwUndoId::EMPTY, nullptr);
    }
}

const SwRangeRedline* DocumentRedlineManager::SelNextRedline( SwPaM& rPam ) const
{
    rPam.DeleteMark();
diff --git a/sw/source/core/inc/DocumentRedlineManager.hxx b/sw/source/core/inc/DocumentRedlineManager.hxx
index 166c7e5..88487f8 100644
--- a/sw/source/core/inc/DocumentRedlineManager.hxx
+++ b/sw/source/core/inc/DocumentRedlineManager.hxx
@@ -90,6 +90,8 @@ public:

    virtual bool RejectRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete) override;

    virtual void AcceptAllRedline(/*[in]*/bool bAcceptReject) override;

    virtual const SwRangeRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const override;

    virtual const SwRangeRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const override;
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 40d52c9..445a440 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1073,6 +1073,13 @@ void SwDocShell::GetState(SfxItemSet& rSet)
            rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) );
        }
        break;
        case FN_REDLINE_ACCEPT_ALL:
        case FN_REDLINE_REJECT_ALL:
        {
            if (GetDoc()->getIDocumentRedlineAccess().GetRedlineTable().size() == 0)
                rSet.DisableItem(nWhich);
        }
        break;

        default: OSL_ENSURE(false,"You cannot get here!");

diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 8c12de7..d288a67 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -1241,6 +1241,33 @@ void SwDocShell::Execute(SfxRequest& rReq)
            }
        }
        break;
        case FN_REDLINE_ACCEPT_ALL:
        case FN_REDLINE_REJECT_ALL:
        {
            IDocumentRedlineAccess& rRedlineAccess = GetDoc()->getIDocumentRedlineAccess();
            SwWrtShell *pWrtShell = dynamic_cast<SwWrtShell*>(GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell());

            if (rRedlineAccess.GetRedlineTable().empty())
            {
                break;
            }

            if (pWrtShell)
            {
                pWrtShell->StartAllAction();
            }

            rRedlineAccess.AcceptAllRedline(nWhich == FN_REDLINE_ACCEPT_ALL);

            if (pWrtShell)
            {
                pWrtShell->EndAllAction();
            }

            Broadcast(SfxHint(SfxHintId::RedlineChanged));
            rReq.Done();
        }
        break;

        default: OSL_FAIL("wrong Dispatcher");
    }
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 408bcff..92da154 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1645,6 +1645,20 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
                    }
                }
                break;
            case SfxHintId::RedlineChanged:
                {
                    sal_uInt16 aSlotRedLine[] = {
                        FN_REDLINE_NEXT_CHANGE,
                        FN_REDLINE_PREV_CHANGE,
                        FN_REDLINE_ACCEPT_DIRECT,
                        FN_REDLINE_REJECT_DIRECT,
                        FN_REDLINE_ACCEPT_ALL,
                        FN_REDLINE_REJECT_ALL,
                        0
                    };
                    GetViewFrame()->GetBindings().Invalidate(aSlotRedLine);
                }
                break;

            default: break;
        }
diff --git a/sw/uiconfig/sglobal/popupmenu/text.xml b/sw/uiconfig/sglobal/popupmenu/text.xml
index a6a6021..d721e7c 100644
--- a/sw/uiconfig/sglobal/popupmenu/text.xml
+++ b/sw/uiconfig/sglobal/popupmenu/text.xml
@@ -38,7 +38,9 @@
  <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
  <menu:menuseparator/>
  <menu:menuitem menu:id=".uno:AcceptTrackedChange"/>
  <menu:menuitem menu:id=".uno:AcceptAllTrackedChanges"/>
  <menu:menuitem menu:id=".uno:RejectTrackedChange"/>
  <menu:menuitem menu:id=".uno:RejectAllTrackedChanges"/>
  <menu:menuitem menu:id=".uno:NextTrackedChange"/>
  <menu:menuitem menu:id=".uno:PreviousTrackedChange"/>
  <menu:menuseparator/>
diff --git a/sw/uiconfig/sweb/popupmenu/text.xml b/sw/uiconfig/sweb/popupmenu/text.xml
index 1b267e1..ad6d0f4 100644
--- a/sw/uiconfig/sweb/popupmenu/text.xml
+++ b/sw/uiconfig/sweb/popupmenu/text.xml
@@ -34,7 +34,9 @@
  <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
  <menu:menuseparator/>
  <menu:menuitem menu:id=".uno:AcceptTrackedChange"/>
  <menu:menuitem menu:id=".uno:AcceptAllTrackedChanges"/>
  <menu:menuitem menu:id=".uno:RejectTrackedChange"/>
  <menu:menuitem menu:id=".uno:RejectAllTrackedChanges"/>
  <menu:menuitem menu:id=".uno:NextTrackedChange"/>
  <menu:menuitem menu:id=".uno:PreviousTrackedChange"/>
  <menu:menuseparator/>
diff --git a/sw/uiconfig/swform/popupmenu/text.xml b/sw/uiconfig/swform/popupmenu/text.xml
index a6a6021..d721e7c 100644
--- a/sw/uiconfig/swform/popupmenu/text.xml
+++ b/sw/uiconfig/swform/popupmenu/text.xml
@@ -38,7 +38,9 @@
  <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
  <menu:menuseparator/>
  <menu:menuitem menu:id=".uno:AcceptTrackedChange"/>
  <menu:menuitem menu:id=".uno:AcceptAllTrackedChanges"/>
  <menu:menuitem menu:id=".uno:RejectTrackedChange"/>
  <menu:menuitem menu:id=".uno:RejectAllTrackedChanges"/>
  <menu:menuitem menu:id=".uno:NextTrackedChange"/>
  <menu:menuitem menu:id=".uno:PreviousTrackedChange"/>
  <menu:menuseparator/>
diff --git a/sw/uiconfig/swreport/popupmenu/text.xml b/sw/uiconfig/swreport/popupmenu/text.xml
index a6a6021..d721e7c 100644
--- a/sw/uiconfig/swreport/popupmenu/text.xml
+++ b/sw/uiconfig/swreport/popupmenu/text.xml
@@ -38,7 +38,9 @@
  <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
  <menu:menuseparator/>
  <menu:menuitem menu:id=".uno:AcceptTrackedChange"/>
  <menu:menuitem menu:id=".uno:AcceptAllTrackedChanges"/>
  <menu:menuitem menu:id=".uno:RejectTrackedChange"/>
  <menu:menuitem menu:id=".uno:RejectAllTrackedChanges"/>
  <menu:menuitem menu:id=".uno:NextTrackedChange"/>
  <menu:menuitem menu:id=".uno:PreviousTrackedChange"/>
  <menu:menuseparator/>
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml
index a87ff5f..b5ba20d 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -118,7 +118,9 @@
          <menu:menuitem menu:id=".uno:PreviousTrackedChange"/>
          <menu:menuitem menu:id=".uno:NextTrackedChange"/>
          <menu:menuitem menu:id=".uno:AcceptTrackedChange"/>
          <menu:menuitem menu:id=".uno:AcceptAllTrackedChanges"/>
          <menu:menuitem menu:id=".uno:RejectTrackedChange"/>
          <menu:menuitem menu:id=".uno:RejectAllTrackedChanges"/>
          <menu:menuseparator/>
          <menu:menuitem menu:id=".uno:CommentChangeTracking"/>
          <menu:menuitem menu:id=".uno:ProtectTraceChangeMode"/>
diff --git a/sw/uiconfig/swriter/popupmenu/text.xml b/sw/uiconfig/swriter/popupmenu/text.xml
index 6f68903..ddfcaaa 100644
--- a/sw/uiconfig/swriter/popupmenu/text.xml
+++ b/sw/uiconfig/swriter/popupmenu/text.xml
@@ -38,7 +38,9 @@
  <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
  <menu:menuseparator/>
  <menu:menuitem menu:id=".uno:AcceptTrackedChange"/>
  <menu:menuitem menu:id=".uno:AcceptAllTrackedChanges"/>
  <menu:menuitem menu:id=".uno:RejectTrackedChange"/>
  <menu:menuitem menu:id=".uno:RejectAllTrackedChanges"/>
  <menu:menuitem menu:id=".uno:NextTrackedChange"/>
  <menu:menuitem menu:id=".uno:PreviousTrackedChange"/>
  <menu:menuseparator/>
diff --git a/sw/uiconfig/swxform/popupmenu/text.xml b/sw/uiconfig/swxform/popupmenu/text.xml
index a6a6021..d721e7c 100644
--- a/sw/uiconfig/swxform/popupmenu/text.xml
+++ b/sw/uiconfig/swxform/popupmenu/text.xml
@@ -38,7 +38,9 @@
  <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
  <menu:menuseparator/>
  <menu:menuitem menu:id=".uno:AcceptTrackedChange"/>
  <menu:menuitem menu:id=".uno:AcceptAllTrackedChanges"/>
  <menu:menuitem menu:id=".uno:RejectTrackedChange"/>
  <menu:menuitem menu:id=".uno:RejectAllTrackedChanges"/>
  <menu:menuitem menu:id=".uno:NextTrackedChange"/>
  <menu:menuitem menu:id=".uno:PreviousTrackedChange"/>
  <menu:menuseparator/>