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>
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 1d3791b..e97df81 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 );
}
}