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>
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 321869ff..8d71eaa 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -791,7 +791,19 @@

            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 );
        }