summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-01-18 14:11:34 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-01-19 20:19:23 +0100
commitf830bc1a8d06fc9f5c9015846ad3a87a6cda9784 (patch)
tree822dac522b12b8dd079f604cca5ef89f937c2063
parentucb: webdav-curl: add even more logging (diff)
downloadcore-f830bc1a8d06fc9f5c9015846ad3a87a6cda9784.tar.gz
core-f830bc1a8d06fc9f5c9015846ad3a87a6cda9784.zip
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.stahl@allotropia.de> (cherry picked from commit 3170fba5dff3ea5cc67ea94f51a0dd5458f01edd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128536 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/source/filter/xml/swxml.cxx5
1 files changed, 4 insertions, 1 deletions
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
{