summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-06-12 11:40:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-06-12 15:17:16 +0200
commit13874ba730ed94a38271e3b053e11a28f7d8268f (patch)
treeb6f74c0125d95c6c02715586ec67f21339830c66 /sw
parentb0aff34ccb12e1af815a059957d7c4f6a14eeaea (diff)
tdf#144208 speedup doc with lots of redline (5)
no need to call compress-redlines during load Change-Id: Ib26a1123b96e299974507e167bcb8ce8b3e3c924 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168701 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/IDocumentContentOperations.hxx3
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx3
-rw-r--r--sw/source/core/unocore/unofield.cxx2
3 files changed, 5 insertions, 3 deletions
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx
index eafc586886c2..222bf44e794c 100644
--- a/sw/inc/IDocumentContentOperations.hxx
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -85,10 +85,11 @@ enum class SwDeleteFlags
{
Default = 0,
ArtificialSelection = (1<<0), ///< keyboard delete, artificial selection, avoid deleting flys
+ DontCompressRedlines = (1<<1) ///< dont call compress redlines while we are loading document
};
namespace o3tl
{
- template<> struct typed_flags<SwDeleteFlags> : is_typed_flags<SwDeleteFlags, 0x01> {};
+ template<> struct typed_flags<SwDeleteFlags> : is_typed_flags<SwDeleteFlags, 0x03> {};
}
/** Text operation/manipulation interface
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 366cd276440b..773b5b0026d4 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -4409,7 +4409,8 @@ bool DocumentContentOperationsManager::DeleteAndJoinImpl(SwPaM & rPam, SwDeleteF
}
if (!m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline()
- && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty())
+ && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty()
+ && !(flags & SwDeleteFlags::DontCompressRedlines))
{
m_rDoc.getIDocumentRedlineAccess().CompressRedlines();
}
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index aab9b5193646..152c1aa3bc44 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2030,7 +2030,7 @@ void SAL_CALL SwXTextField::attach(
SwPaM aPam( rTextNode, pTextField->GetStart() );
aPam.SetMark();
aPam.Move();
- pDoc->getIDocumentContentOperations().DeleteAndJoin(aPam);
+ pDoc->getIDocumentContentOperations().DeleteAndJoin(aPam, SwDeleteFlags::DontCompressRedlines);
}
// keep inserted annotation
{