summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu28
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu11
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu24
-rw-r--r--sw/UIConfig_sglobal.mk2
-rw-r--r--sw/UIConfig_sweb.mk1
-rw-r--r--sw/UIConfig_swreport.mk1
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/UIConfig_swxform.mk1
-rw-r--r--sw/inc/cmdid.h4
-rw-r--r--sw/inc/viewopt.hxx11
-rw-r--r--sw/sdi/_basesh.sdi28
-rw-r--r--sw/sdi/swriter.sdi68
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx15
-rw-r--r--sw/source/core/text/frmpaint.cxx4
-rw-r--r--sw/source/core/text/redlnitr.cxx7
-rw-r--r--sw/source/core/view/viewsh.cxx7
-rw-r--r--sw/source/uibase/shells/basesh.cxx12
-rw-r--r--sw/source/uibase/uiview/view2.cxx11
-rw-r--r--sw/uiconfig/sglobal/popupmenu/showtrackedchanges.xml14
-rw-r--r--sw/uiconfig/sweb/popupmenu/showtrackedchanges.xml14
-rw-r--r--sw/uiconfig/swform/popupmenu/showtrackedchanges.xml14
-rw-r--r--sw/uiconfig/swreport/popupmenu/showtrackedchanges.xml14
-rw-r--r--sw/uiconfig/swriter/popupmenu/showtrackedchanges.xml14
-rw-r--r--sw/uiconfig/swxform/popupmenu/showtrackedchanges.xml14
24 files changed, 306 insertions, 14 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index 10a67fab1140..9aaa6fd2a934 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -509,6 +509,20 @@
<value>3dobjectsbar</value>
</prop>
</node>
+ <node oor:name="c41" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:ShowTrackedChangesMenu</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.framework.ResourceMenuController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>showtrackedchanges</value>
+ </prop>
+ </node>
<node oor:name="WindowListMenu" oor:op="replace">
<prop oor:name="Command">
<value>.uno:WindowList</value>
@@ -709,6 +723,20 @@
<value>3dobjectsbar;.uno:Cube</value>
</prop>
</node>
+ <node oor:name="ShowTrackedChangesController" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:ShowTrackedChanges</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.framework.GenericPopupToolbarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>.uno:ShowTrackedChangesMenu</value>
+ </prop>
+ </node>
<node oor:name="ConnectorToolBox" oor:op="replace">
<prop oor:name="Command">
<value>.uno:ConnectorToolbox</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 1db21b1af629..c39a8e987762 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -6843,6 +6843,17 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:ShowTrackedChangesMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Change View</value>
+ </prop>
+ <prop oor:name="ContextLabel" oor:type="xs:string">
+ <value xml:lang="en-US">View</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:AVMediaPlayer" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Me~dia Player</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 72721e20f55e..588d0fd16379 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -706,6 +706,30 @@
<value xml:lang="en-US">To ~Paragraph</value>
</prop>
</node>
+ <node oor:name=".uno:SetTrackedChangesInText" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Show All Changes Inline</value>
+ </prop>
+ <prop oor:name="ContextLabel" oor:type="xs:string">
+ <value xml:lang="en-US">All ~Changes Inline</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SetTrackedDeletionsInMargin" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Show Deletions In Margin</value>
+ </prop>
+ <prop oor:name="ContextLabel" oor:type="xs:string">
+ <value xml:lang="en-US">~Deletions In Margin</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SetTrackedInsertionsInMargin" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Show Insertions In Margin</value>
+ </prop>
+ <prop oor:name="ContextLabel" oor:type="xs:string">
+ <value xml:lang="en-US">~Insertions In Margin</value>
+ </prop>
+ </node>
<node oor:name=".uno:ToggleObjectLayer" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Change Position</value>
diff --git a/sw/UIConfig_sglobal.mk b/sw/UIConfig_sglobal.mk
index fd806255f4cf..89fa0efec1c1 100644
--- a/sw/UIConfig_sglobal.mk
+++ b/sw/UIConfig_sglobal.mk
@@ -23,11 +23,13 @@ $(eval $(call gb_UIConfig_add_popupmenufiles,modules/sglobal,\
sw/uiconfig/sglobal/popupmenu/frame \
sw/uiconfig/sglobal/popupmenu/graphic \
sw/uiconfig/sglobal/popupmenu/insertfield \
+ sw/uiconfig/sglobal/popupmenu/showtrackedchanges \
sw/uiconfig/sglobal/popupmenu/media \
sw/uiconfig/sglobal/popupmenu/oleobject \
sw/uiconfig/sglobal/popupmenu/preview \
sw/uiconfig/sglobal/popupmenu/table \
sw/uiconfig/sglobal/popupmenu/text \
+ sw/uiconfig/swriter/popupmenu/showtrackedchanges \
))
$(eval $(call gb_UIConfig_add_statusbarfiles,modules/sglobal,\
diff --git a/sw/UIConfig_sweb.mk b/sw/UIConfig_sweb.mk
index 19addac06df1..32af3f464870 100644
--- a/sw/UIConfig_sweb.mk
+++ b/sw/UIConfig_sweb.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_UIConfig_add_popupmenufiles,modules/sweb,\
sw/uiconfig/sweb/popupmenu/source \
sw/uiconfig/sweb/popupmenu/table \
sw/uiconfig/sweb/popupmenu/text \
+ sw/uiconfig/swriter/popupmenu/showtrackedchanges \
))
$(eval $(call gb_UIConfig_add_statusbarfiles,modules/sweb,\
diff --git a/sw/UIConfig_swreport.mk b/sw/UIConfig_swreport.mk
index 296f71bfca9a..e6bd56fe7d0e 100644
--- a/sw/UIConfig_swreport.mk
+++ b/sw/UIConfig_swreport.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_UIConfig_add_popupmenufiles,modules/swreport,\
sw/uiconfig/swreport/popupmenu/preview \
sw/uiconfig/swreport/popupmenu/table \
sw/uiconfig/swreport/popupmenu/text \
+ sw/uiconfig/swriter/popupmenu/showtrackedchanges \
))
$(eval $(call gb_UIConfig_add_statusbarfiles,modules/swreport,\
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 71a0632d6979..70790ca5cdc1 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UIConfig_add_popupmenufiles,modules/swriter,\
sw/uiconfig/swriter/popupmenu/preview \
sw/uiconfig/swriter/popupmenu/table \
sw/uiconfig/swriter/popupmenu/text \
+ sw/uiconfig/swriter/popupmenu/showtrackedchanges \
))
$(eval $(call gb_UIConfig_add_statusbarfiles,modules/swriter,\
diff --git a/sw/UIConfig_swxform.mk b/sw/UIConfig_swxform.mk
index 7a9dd614c074..a0f868e3fe2c 100644
--- a/sw/UIConfig_swxform.mk
+++ b/sw/UIConfig_swxform.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_UIConfig_add_popupmenufiles,modules/swxform,\
sw/uiconfig/swxform/popupmenu/preview \
sw/uiconfig/swxform/popupmenu/table \
sw/uiconfig/swxform/popupmenu/text \
+ sw/uiconfig/swriter/popupmenu/showtrackedchanges \
))
$(eval $(call gb_UIConfig_add_statusbarfiles,modules/swxform,\
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 56407a1adb50..4634a5697d61 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -187,6 +187,10 @@
#define FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON (FN_VIEW + 63) /* Show outline content visibility toggle button */
#define FN_TOGGLE_OUTLINE_CONTENT_VISIBILITY (FN_VIEW + 64)
#define FN_SHOW_CHANGES_IN_MARGIN (FN_VIEW + 65) /* Show tracked deletions in margin */
+#define FN_SHOW_TRACKED_CHANGES_MENU (FN_VIEW + 66) /* Menu for the next layout modes */
+#define FN_SET_TRACKED_CHANGES_IN_TEXT (FN_VIEW + 67) /* Show tracked deletions and insertions in text */
+#define FN_SET_TRACKED_DELETIONS_IN_MARGIN (FN_VIEW + 68) /* Show final text (deletions in margin) */
+#define FN_SET_TRACKED_INSERTIONS_IN_MARGIN (FN_VIEW + 69) /* Show original text (insertions in margin) */
// Region: Insert
#define FN_INSERT_BOOKMARK (FN_INSERT + 2 ) /* Bookmark */
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 996aec4848c2..006a3f9b3dd3 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -66,10 +66,11 @@ enum class ViewOptFlags1 : sal_uInt64 {
ViewMetachars = 0x20000000,
Pageback = 0x40000000,
ShowOutlineContentVisibilityButton = 0x80000000,
- ShowChangesInMargin = 0x100000000 //tracked deletions in margin
+ ShowChangesInMargin = 0x100000000, //tracked deletions in margin
+ ShowChangesInMargin2 = 0x200000000 //tracked insertions in margin
};
namespace o3tl {
- template<> struct typed_flags<ViewOptFlags1> : is_typed_flags<ViewOptFlags1, 0x1ffdfcfff> {};
+ template<> struct typed_flags<ViewOptFlags1> : is_typed_flags<ViewOptFlags1, 0x3ffdfcfff> {};
}
enum class ViewOptCoreFlags2 {
@@ -296,6 +297,12 @@ public:
void SetShowChangesInMargin( bool b )
{ SetCoreOption(b, ViewOptFlags1::ShowChangesInMargin); }
+ //show/hide tracked insertions in text
+ bool IsShowChangesInMargin2() const
+ { return bool(m_nCoreOptions & ViewOptFlags1::ShowChangesInMargin2); }
+ void SetShowChangesInMargin2( bool b )
+ { SetCoreOption(b, ViewOptFlags1::ShowChangesInMargin2); }
+
//show/hide interactive header/footer on top/bottom of pages
bool IsUseHeaderFooterMenu() const
{ return bool(m_nCoreOptions & ViewOptFlags1::UseHeaderFooterMenu ); }
diff --git a/sw/sdi/_basesh.sdi b/sw/sdi/_basesh.sdi
index 03d1f95002f7..44d6c5338e18 100644
--- a/sw/sdi/_basesh.sdi
+++ b/sw/sdi/_basesh.sdi
@@ -477,6 +477,34 @@ interface BaseTextSelection
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
+ FN_SET_TRACKED_CHANGES_IN_TEXT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+
+ FN_SET_TRACKED_DELETIONS_IN_MARGIN
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+
+ FN_SET_TRACKED_INSERTIONS_IN_MARGIN
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+
+ FN_SHOW_TRACKED_CHANGES_MENU
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+
FN_UPDATE_ALL_LINKS // status()
[
ExecMethod = Execute ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 9a12496e45ad..420aa1d03b58 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -7930,6 +7930,74 @@ SfxBoolItem ShowChangesInMargin FN_SHOW_CHANGES_IN_MARGIN
GroupId = SfxGroupId::View;
]
+SfxVoidItem ShowTrackedChangesMenu FN_SHOW_TRACKED_CHANGES_MENU
+()
+[
+ AutoUpdate = FALSE,
+ FastCall = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = SfxGroupId::View;
+]
+
+SfxBoolItem SetTrackedChangesInText FN_SET_TRACKED_CHANGES_IN_TEXT
+()
+[
+ AutoUpdate = TRUE,
+ FastCall = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = SfxGroupId::View;
+]
+
+SfxBoolItem SetTrackedDeletionsInMargin FN_SET_TRACKED_DELETIONS_IN_MARGIN
+()
+[
+ AutoUpdate = TRUE,
+ FastCall = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = SfxGroupId::View;
+]
+
+SfxBoolItem SetTrackedInsertionsInMargin FN_SET_TRACKED_INSERTIONS_IN_MARGIN
+()
+[
+ AutoUpdate = TRUE,
+ FastCall = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = SfxGroupId::View;
+]
+
SfxBoolItem UseHeaderFooterMenu FN_USE_HEADERFOOTERMENU
()
[
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index b6b06e157b42..d694fff83154 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -3295,11 +3295,18 @@ void DocumentRedlineManager::HideAll( bool bDeletion )
for (SwRedlineTable::size_type i = rTable.size(); i > 0; --i)
{
SwRangeRedline* pRedline = rTable[i-1];
- if ( pRedline->GetType() == RedlineType::Delete &&
- pRedline->IsVisible() )
+ if ( pRedline->GetType() == RedlineType::Delete )
{
- pRedline->Hide(0, rTable.GetPos(pRedline), false);
- pRedline->Hide(1, rTable.GetPos(pRedline), false);
+ if ( bDeletion && pRedline->IsVisible() )
+ {
+ pRedline->Hide(0, rTable.GetPos(pRedline), false);
+ pRedline->Hide(1, rTable.GetPos(pRedline), false);
+ }
+ else if ( !bDeletion && !pRedline->IsVisible() )
+ {
+ pRedline->Show(0, rTable.GetPos(pRedline), true);
+ pRedline->Show(1, rTable.GetPos(pRedline), true);
+ }
}
else if ( pRedline->GetType() == RedlineType::Insert )
{
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 1a402d842030..1b77a6f7a711 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -200,7 +200,9 @@ void SwExtraPainter::PaintExtra( SwTwips nY, tools::Long nAsc, tools::Long nMax,
if ( pRedlineText )
{
m_pFnt->SetColor(NON_PRINTING_CHARACTER_COLOR);
- m_pFnt->SetStrikeout( STRIKEOUT_SINGLE );
+ // don't strike out text in Insertions In Margin mode
+ if ( !m_pSh->GetViewOptions()->IsShowChangesInMargin2() )
+ m_pFnt->SetStrikeout( STRIKEOUT_SINGLE );
m_pFnt->SetSize( Size( 0, 200), m_pFnt->GetActual() );
}
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index cb19a17648ed..b6cbb86bbeb3 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -984,15 +984,16 @@ bool SwRedlineItr::CheckLine(
case SwComparePosition::Inside:
{
bRet = true;
- if (rRedlineText.isEmpty() && pRedline->GetType() == RedlineType::Delete)
+ // start to collect text of invisible redlines for ChangesInMargin layout
+ if (rRedlineText.isEmpty() && !pRedline->IsVisible())
{
rRedlineText = const_cast<SwRangeRedline*>(pRedline)->GetDescr(/*bSimplified=*/true);
pPrevRedline = pRedline;
isExtendText = true;
}
- // join the text of the next short delete redlines in the same position
+ // join the text of the next invisible redlines in the same position
// i.e. characters deleted by pressing backspace or delete
- else if (pPrevRedline && pRedline->GetType() == RedlineType::Delete &&
+ else if (pPrevRedline && !pRedline->IsVisible() &&
*pRedline->Start() == *pPrevRedline->Start() && *pRedline->End() == *pPrevRedline->End() )
{
OUString sExtendText(const_cast<SwRangeRedline*>(pRedline)->GetDescr(/*bSimplified=*/true));
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 0e114908dd50..5365b3399698 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -2209,12 +2209,15 @@ void SwViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
{
bReformat = GetDoc()->ContainsHiddenChars();
}
- if ( mpOpt->IsShowChangesInMargin() != rOpt.IsShowChangesInMargin() )
+ if ( mpOpt->IsShowChangesInMargin() != rOpt.IsShowChangesInMargin() ||
+ mpOpt->IsShowChangesInMargin2() != rOpt.IsShowChangesInMargin2() )
{
if (rOpt.IsShowChangesInMargin())
- GetDoc()->GetDocumentRedlineManager().HideAll(/*bDeletion=*/true);
+ GetDoc()->GetDocumentRedlineManager().HideAll(
+ /*bDeletion=*/!rOpt.IsShowChangesInMargin2() );
else
GetDoc()->GetDocumentRedlineManager().ShowAll();
+ GetLayout()->SetHideRedlines( false );
}
// bReformat becomes true, if ...
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 3732a1de05c1..71f93a40d421 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -1055,6 +1055,18 @@ void SwBaseShell::Execute(SfxRequest &rReq)
}
}
break;
+ case FN_SET_TRACKED_CHANGES_IN_TEXT:
+ case FN_SET_TRACKED_DELETIONS_IN_MARGIN:
+ case FN_SET_TRACKED_INSERTIONS_IN_MARGIN:
+ {
+ SwViewOption aViewOption = *rSh.GetViewOptions();
+ bool bAllInText = FN_SET_TRACKED_CHANGES_IN_TEXT == nSlot;
+ aViewOption.SetShowChangesInMargin( !bAllInText );
+ if ( !bAllInText )
+ aViewOption.SetShowChangesInMargin2( FN_SET_TRACKED_INSERTIONS_IN_MARGIN == nSlot );
+ rSh.ApplyViewOptions( aViewOption );
+ }
+ break;
case SID_CONTOUR_DLG:
{
sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index e388a08b8517..8b7e4667aae3 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -81,6 +81,7 @@
#include <printdata.hxx>
#include <IDocumentDeviceAccess.hxx>
#include <IDocumentRedlineAccess.hxx>
+#include <DocumentRedlineManager.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IDocumentSettingAccess.hxx>
#include <IDocumentDrawModelAccess.hxx>
@@ -730,9 +731,15 @@ void SwView::Execute(SfxRequest &rReq)
{
// tdf#125754 avoid recursive layout
// because all views share the layout, have to use AllAction
+ const bool bShow = static_cast<const SfxBoolItem*>(pItem)->GetValue();
m_pWrtShell->StartAllAction();
- m_pWrtShell->GetLayout()->SetHideRedlines(
- !static_cast<const SfxBoolItem*>(pItem)->GetValue());
+ // always show redline insertions in Hide Changes mode
+ if ( m_pWrtShell->GetViewOptions()->IsShowChangesInMargin() &&
+ m_pWrtShell->GetViewOptions()->IsShowChangesInMargin2() )
+ {
+ GetDocShell()->GetDoc()->GetDocumentRedlineManager().HideAll(/*bDeletion=*/!bShow);
+ }
+ m_pWrtShell->GetLayout()->SetHideRedlines( !bShow );
m_pWrtShell->EndAllAction();
if (m_pWrtShell->IsRedlineOn())
m_pWrtShell->SetInsMode();
diff --git a/sw/uiconfig/sglobal/popupmenu/showtrackedchanges.xml b/sw/uiconfig/sglobal/popupmenu/showtrackedchanges.xml
new file mode 100644
index 000000000000..d4d95e28dc27
--- /dev/null
+++ b/sw/uiconfig/sglobal/popupmenu/showtrackedchanges.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+<menu:menupopup xmlns:menu="http://openoffice.org/2001/menu">
+ <menu:menuitem menu:id=".uno:SetTrackedChangesInText" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetTrackedDeletionsInMargin" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetTrackedInsertionsInMargin" menu:style="radio"/>
+</menu:menupopup>
diff --git a/sw/uiconfig/sweb/popupmenu/showtrackedchanges.xml b/sw/uiconfig/sweb/popupmenu/showtrackedchanges.xml
new file mode 100644
index 000000000000..d4d95e28dc27
--- /dev/null
+++ b/sw/uiconfig/sweb/popupmenu/showtrackedchanges.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+<menu:menupopup xmlns:menu="http://openoffice.org/2001/menu">
+ <menu:menuitem menu:id=".uno:SetTrackedChangesInText" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetTrackedDeletionsInMargin" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetTrackedInsertionsInMargin" menu:style="radio"/>
+</menu:menupopup>
diff --git a/sw/uiconfig/swform/popupmenu/showtrackedchanges.xml b/sw/uiconfig/swform/popupmenu/showtrackedchanges.xml
new file mode 100644
index 000000000000..d4d95e28dc27
--- /dev/null
+++ b/sw/uiconfig/swform/popupmenu/showtrackedchanges.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+<menu:menupopup xmlns:menu="http://openoffice.org/2001/menu">
+ <menu:menuitem menu:id=".uno:SetTrackedChangesInText" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetTrackedDeletionsInMargin" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetTrackedInsertionsInMargin" menu:style="radio"/>
+</menu:menupopup>
diff --git a/sw/uiconfig/swreport/popupmenu/showtrackedchanges.xml b/sw/uiconfig/swreport/popupmenu/showtrackedchanges.xml
new file mode 100644
index 000000000000..d4d95e28dc27
--- /dev/null
+++ b/sw/uiconfig/swreport/popupmenu/showtrackedchanges.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+<menu:menupopup xmlns:menu="http://openoffice.org/2001/menu">
+ <menu:menuitem menu:id=".uno:SetTrackedChangesInText" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetTrackedDeletionsInMargin" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetTrackedInsertionsInMargin" menu:style="radio"/>
+</menu:menupopup>
diff --git a/sw/uiconfig/swriter/popupmenu/showtrackedchanges.xml b/sw/uiconfig/swriter/popupmenu/showtrackedchanges.xml
new file mode 100644
index 000000000000..d4d95e28dc27
--- /dev/null
+++ b/sw/uiconfig/swriter/popupmenu/showtrackedchanges.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+<menu:menupopup xmlns:menu="http://openoffice.org/2001/menu">
+ <menu:menuitem menu:id=".uno:SetTrackedChangesInText" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetTrackedDeletionsInMargin" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetTrackedInsertionsInMargin" menu:style="radio"/>
+</menu:menupopup>
diff --git a/sw/uiconfig/swxform/popupmenu/showtrackedchanges.xml b/sw/uiconfig/swxform/popupmenu/showtrackedchanges.xml
new file mode 100644
index 000000000000..d4d95e28dc27
--- /dev/null
+++ b/sw/uiconfig/swxform/popupmenu/showtrackedchanges.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+<menu:menupopup xmlns:menu="http://openoffice.org/2001/menu">
+ <menu:menuitem menu:id=".uno:SetTrackedChangesInText" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetTrackedDeletionsInMargin" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetTrackedInsertionsInMargin" menu:style="radio"/>
+</menu:menupopup>