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-26 14:36:25 +0200 |
commit | c9581d7ada7d6a0e62653bdfa1e419ede6324970 (patch) | |
tree | cda0300d05883bfe8f758c0b65fe812b9aff7c90 /sw | |
parent | 5315e6069e425aad88873beb5344bb8ea31e0c55 (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/+/152301
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw')
-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 aacc4da647b5..c34827f092d8 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; |