sw/source/filter/xml/swxml.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 3170fba5dff3ea5cc67ea94f51a0dd5458f01edd Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Jan 18 14:11:34 2022 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Wed Jan 19 12:43:33 2022 +0100 sw_fieldmarkhide: disable layout cache if there are fieldmarks ... similar to the "ShowChanges" check that is already done. This prevents a crash in SwLayoutCache::CompareLayout() on fdo38619-2.ott Change-Id: I1a90c45f041ae18beacd3fbd4dcbdae5ba86c317 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128556 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index 8b4ae9b031f3..5b74af04e794 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -845,7 +845,10 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con if( !IsOrganizerMode() && !IsBlockMode() && !m_bInsertMode && !m_aOption.IsFormatsOnly() && // sw_redlinehide: disable layout cache for now - *o3tl::doAccess<bool>(xInfoSet->getPropertyValue(sShowChanges))) + *o3tl::doAccess<bool>(xInfoSet->getPropertyValue(sShowChanges)) && + // sw_fieldmarkhide: also disable if there is a fieldmark + rDoc.getIDocumentMarkAccess()->getFieldmarksBegin() + == rDoc.getIDocumentMarkAccess()->getFieldmarksEnd()) { try {