diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-05-26 10:31:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-05-30 17:09:02 +0200 |
commit | 643c6b9a96020d5498d981c7ab081226415ab016 (patch) | |
tree | 66a7c4ec80ab83c9e8757d059fca74627bf4f15a /sw/source | |
parent | cd726ba43c22e723b243dd6dfd5e3c253e81000b (diff) |
tdf#155507 don't redraw numbering when cursor enters it, if...
"field shadings" are turned off and so the new output would be the same
as it already is. Which removes a potential source of whole document
invalidations in a multi-user collaborative scenario where participants
may be casually clicking around the place with an expectation that it
has limited effect on the other participants
Change-Id: I2fb51ba3358bfc920aa2bff3593a0dd46f287100
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152229
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 03cecdbbd8bf..15c0dc1a6409 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -391,12 +391,18 @@ void SwCursorShell::MarkListLevel( const OUString& sListId, if (sListId == m_sMarkedListId && nListLevel == m_nMarkedListLevel) return; - if ( !m_sMarkedListId.isEmpty() ) - mxDoc->MarkListLevel( m_sMarkedListId, m_nMarkedListLevel, false ); - - if ( !sListId.isEmpty() ) - { - mxDoc->MarkListLevel( sListId, nListLevel, true ); + // Writer redraws the "marked" list with the field shading, if there + // is no field shading then the marked list would be redrawn for no + // visually identifiable reason, so skip the mark if field shadings + // are disabled. + const bool bVisuallyMarked(GetViewOptions()->IsFieldShadings()); + if (bVisuallyMarked) + { + if ( !m_sMarkedListId.isEmpty() ) + mxDoc->MarkListLevel( m_sMarkedListId, m_nMarkedListLevel, false ); + + if ( !sListId.isEmpty() ) + mxDoc->MarkListLevel( sListId, nListLevel, true ); } m_sMarkedListId = sListId; |