diff options
author | László Németh <nemeth@numbertext.org> | 2019-01-25 11:08:34 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-01-25 15:12:31 +0100 |
commit | a8a3928bd3614e52edc0a4df6f67ce53e787905c (patch) | |
tree | 3cf739c5aded53bc8a5819292c9409175a7ae7f6 | |
parent | 059a958a65e064b701a74f6cb87e295b13ffbd0e (diff) |
tdf52391 don't accept format-only changes secretly
for Reject all in Manage changes dialog window.
Now clicking on Reject all keeps format-only changes
instead of accepting them during the requested rejection
to allow to check them before acception.
Note: LibreOffice cannot reject the format-only changes.
If changes are all format-only changes, the Manage
changes dialog hides the Reject all button, also the
Reject button for the selected format-only changes.
This patch extends this workaround to avoid unintended
acceptance of rejected changes.
Change-Id: I7e60ae1ed2bec660dcb19d372dcf6892be61dad6
Reviewed-on: https://gerrit.libreoffice.org/66902
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
-rw-r--r-- | sw/source/uibase/misc/redlndlg.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index 321869fff38a..8d71eaafd69b 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -791,7 +791,19 @@ void SwRedlineAcceptDlg::CallAcceptReject( bool bSelect, bool bAccept ) RedlinData *pData = static_cast<RedlinData *>(pEntry->GetUserData()); - if( !pData->bDisabled ) + bool bIsNotFormatted = true; + + // don't accept format-only changes secretly for Reject all + if ( !bSelect && !bAccept ) + { + SwRedlineTable::size_type nPosition = GetRedlinePos( *pEntry ); + const SwRangeRedline& rRedln = pSh->GetRedline(nPosition); + + if( nsRedlineType_t::REDLINE_FORMAT == rRedln.GetType() ) + bIsNotFormatted = false; + } + + if( !pData->bDisabled && bIsNotFormatted ) aRedlines.push_back( pEntry ); } |