sw_fieldmarkhide: fix wrong handling of SwInsText for fieldmarks

Desktop / LibreOffice - Michael Stahl [allotropia.de] - 19 May 2022 15:45 UTC

For redlines, typically DocumentContentOperationsManager::InsertString() will insert text, and it explicitly removes any redlines on the text that has been inserted, hence it is always visible - so effectively the sw::MergedPara is updated correctly.

However for fieldmarks the situation is different, if the insertion happens inside of the part that is hidden in the layout, then it must not be inserted into the sw::MergedPara.

Try to figure out which part(s) of a fieldmark the insertion position is in and ignore the inserted text as appropriate in SwTextFrame::SwClientNotify().

Change-Id: Ic5066b20e9609f50438ca64ac7d2cbd09baeef23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134611

288ad999090d sw_fieldmarkhide: fix wrong handling of SwInsText for fieldmarks
sw/inc/hints.hxx | 4 +++-
sw/source/core/attr/hints.cxx | 7 +++++--
sw/source/core/doc/docbm.cxx | 28 +++++++++++++++++++++++++
sw/source/core/inc/txtfrm.hxx | 3 +++
sw/source/core/text/txtfrm.cxx | 44 ++++++++++++++++++++++++++-------------
sw/source/core/txtnode/ndtxt.cxx | 7 ++++---
sw/source/core/txtnode/txtedt.cxx | 2 +-
7 files changed, 74 insertions(+), 21 deletions(-)

Upstream: cgit.freedesktop.org


  • Share