Kaydet (Commit) 70097496 authored tarafından Thorsten Behrens's avatar Thorsten Behrens

sw_redlinehide: fix tdf#113479 by removing nag dialog

No need to suggest showing redlines beyond 250 changes anymore.

Change-Id: Ia219a4eb3af64079979538b8ab4aaf2a94ec19c8
Reviewed-on: https://gerrit.libreoffice.org/65294
Tested-by: Jenkins
Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
(cherry picked from commit 866f10e7)
üst 15328224
......@@ -198,7 +198,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/queryredlinedialog \
sw/uiconfig/swriter/ui/queryrotateintostandarddialog \
sw/uiconfig/swriter/ui/querysavelabeldialog \
sw/uiconfig/swriter/ui/queryshowchangesdialog \
sw/uiconfig/swriter/ui/mailmerge \
sw/uiconfig/swriter/ui/managechangessidebar \
sw/uiconfig/swriter/ui/mmaddressblockpage \
......
......@@ -163,7 +163,6 @@ modules/swriter/ui/querycontinueenddialog.ui
modules/swriter/ui/querydefaultcompatdialog.ui
modules/swriter/ui/queryrotateintostandarddialog.ui
modules/swriter/ui/querysavelabeldialog.ui
modules/swriter/ui/queryshowchangesdialog.ui
modules/swriter/ui/renameautotextdialog.ui
modules/swriter/ui/renameentrydialog.ui
modules/swriter/ui/renameobjectdialog.ui
......
......@@ -32,7 +32,6 @@ modules/swriter/ui/querycontinueenddialog.ui
modules/swriter/ui/querydefaultcompatdialog.ui
modules/swriter/ui/queryrotateintostandarddialog.ui
modules/swriter/ui/querysavelabeldialog.ui
modules/swriter/ui/queryshowchangesdialog.ui
modules/swriter/ui/renameautotextdialog.ui
modules/swriter/ui/renameentrydialog.ui
modules/swriter/ui/renameobjectdialog.ui
......
......@@ -800,7 +800,6 @@ DocumentRedlineManager::DocumentRedlineManager(SwDoc& i_rSwdoc)
, mpRedlineTable(new SwRedlineTable)
, mpExtraRedlineTable(new SwExtraRedlineTable)
, mbIsRedlineMove(false)
, mbReadlineChecked(false)
, mnAutoFormatRedlnCommentNo(0)
{
}
......@@ -2982,27 +2981,6 @@ void DocumentRedlineManager::SetAutoFormatRedlineComment( const OUString* pText,
mnAutoFormatRedlnCommentNo = nSeqNo;
}
#define MAX_REDLINE_COUNT 250
void DocumentRedlineManager::checkRedlining(RedlineFlags& _rReadlineMode)
{
const SwRedlineTable& rRedlineTable = GetRedlineTable();
SwEditShell* pEditShell = m_rDoc.GetEditShell();
vcl::Window* pParent = pEditShell ? pEditShell->GetWin() : nullptr;
if ( pParent && !mbReadlineChecked && rRedlineTable.size() > MAX_REDLINE_COUNT
&& ((_rReadlineMode & RedlineFlags::ShowDelete) != RedlineFlags::ShowDelete) )
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pParent->GetFrameWeld(), "modules/swriter/ui/queryshowchangesdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("QueryShowChangesDialog"));
sal_uInt16 nResult = xQuery->run();
mbReadlineChecked = true;
if ( nResult == RET_YES )
{
_rReadlineMode |= RedlineFlags::ShowInsert | RedlineFlags::ShowDelete;
}
}
}
DocumentRedlineManager::~DocumentRedlineManager()
{
}
......
......@@ -124,8 +124,6 @@ public:
Sequence number is for conjoining of Redlines by the UI. */
void SetAutoFormatRedlineComment( const OUString* pText, sal_uInt16 nSeqNo = 0 );
void checkRedlining(RedlineFlags& _rReadlineMode);
bool IsHideRedlines() const { return m_bHideRedlines; }
void SetHideRedlines(bool const bHideRedlines) { m_bHideRedlines = bHideRedlines; }
......@@ -143,7 +141,6 @@ private:
std::unique_ptr<SwExtraRedlineTable> mpExtraRedlineTable; //< List of all Extra Redlines.
std::unique_ptr<OUString> mpAutoFormatRedlnComment; //< Comment for Redlines inserted via AutoFormat.
bool mbIsRedlineMove; //< true: Redlines are moved into to / out of the section.
bool mbReadlineChecked; //< true: if the query was already shown
sal_uInt16 mnAutoFormatRedlnCommentNo; /**< SeqNo for conjoining of AutoFormat-Redlines.
by the UI. Managed by SwAutoFormat! */
css::uno::Sequence <sal_Int8 > maRedlinePasswd;
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.2 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
<object class="GtkMessageDialog" id="QueryShowChangesDialog">
<property name="can_focus">False</property>
<property name="title" translatable="yes" context="queryshowchangesdialog|QueryShowChangesDialog">Show changes?</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
<property name="message_type">question</property>
<property name="buttons">yes-no</property>
<property name="text" translatable="yes" context="queryshowchangesdialog|QueryShowChangesDialog">Do you want to show changes to avoid delays?</property>
<property name="secondary_text" translatable="yes" context="queryshowchangesdialog|QueryShowChangesDialog">In the current document, changes are being recorded but not shown as such. In large documents, delays can occur when the document is edited. Showing changes will avoid delays.</property>
<child internal-child="vbox">
<object class="GtkBox" id="messagedialog-vbox">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="messagedialog-action_area">
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment