diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-11-18 15:32:54 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-11-19 09:30:05 +0100 |
commit | 92384a813176b964a67bcbeb2fa617c554dbc4a2 (patch) | |
tree | 2fab1d2f22eb2a7f8f357d29ec47f4f3fc5d2529 /sw/source/core/doc/docbm.cxx | |
parent | 53f17e2a0f2a113a8b677940a314b5934c49acc3 (diff) |
sw_fieldmarkhide: notify layout if fieldmark is inserted or removed
... for both TextFieldmark and DateFieldmark.
Change-Id: I571703e4b43d716046fbc1f0787881c0677846c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106063
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw/source/core/doc/docbm.cxx')
-rw-r--r-- | sw/source/core/doc/docbm.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index c2af85f1cd0a..406685c58691 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -42,6 +42,7 @@ #include <sal/log.hxx> #include <UndoBookmark.hxx> #include <tools/datetimeutils.hxx> +#include <txtfrm.hxx> #include <view.hxx> #include <libxml/xmlstring.h> @@ -687,6 +688,20 @@ namespace sw::mark // no special array for these break; } + if (eType == IDocumentMarkAccess::MarkType::TEXT_FIELDMARK + || eType == IDocumentMarkAccess::MarkType::DATE_FIELDMARK) + { + // due to SwInsText notifications everything is visible now - tell + // layout to hide as appropriate + // note: we don't know how many layouts there are and which + // parts they hide, so just notify the entire fieldmark, it + // should give the right result if not in the most efficient way + // note2: can't be done in InitDoc() because it requires the mark + // to be inserted in the vectors. + SwPaM const tmp(pMark->GetMarkPos(), pMark->GetOtherMarkPos()); + sw::UpdateFramesForAddDeleteRedline(m_rDoc, tmp); + } + SAL_INFO("sw.core", "--- makeType ---"); SAL_INFO("sw.core", "Marks"); lcl_DebugMarks(m_vAllMarks); |