summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-01-18 14:11:34 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2022-01-24 10:11:43 +0100
commiteae887b628fde6b73d354b4788c8303db9c36aac (patch)
treee5f5b5ba73fbdb76efd20b0a691a703733e0c40d
parente2c9093371410f2ce8ad66a4b16fd25de31725a7 (diff)
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> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128633 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
-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
{