summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-22 19:43:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-22 21:04:16 +0200
commit5760cba3b276a372d6cccf3f6b6db7fb26c20351 (patch)
tree8e5072d4d4b8e9fdcf4dad93f5222c74663ff45e
parent25278dc22ff6949da442032ce2dad8638b1c8512 (diff)
tdf#64991 speed up loading large RTL documents
only insert the bounds we are interested in takes load time from 1m51 to 1min39 for me Change-Id: I5a267ae3cf3fe7691481f83b591b02d939931c07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/source/core/txtnode/thints.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 1d3791b119a9..e97df81267df 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -723,8 +723,10 @@ void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint,
const sal_Int32 nOtherStart = pOther->GetStart();
const sal_Int32 nOtherEnd = *pOther->End();
- aBounds.insert( nOtherStart );
- aBounds.insert( nOtherEnd );
+ if (nThisStart <= nOtherStart && nOtherStart <= nThisEnd)
+ aBounds.insert( nOtherStart );
+ if (nThisStart <= nOtherEnd && nOtherEnd <= nThisEnd)
+ aBounds.insert( nOtherEnd );
}
}