sw/source/core/text/redlnitr.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 306ae32bfa92b06588173ee495acf3cb384ffb24
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Jul 25 16:01:59 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jul 25 22:31:06 2022 +0200

    tdf#119840 HideIterator no need to always call GetRedlinePos
    
    if we are not going to process redlines.
    
    Shaves 5% off load time
    
    Change-Id: Ie46370b3f6172c35c057f7f9cb3285c76afa9d24
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137437
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 2a7a4b9309ac..374035d479e0 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -83,7 +83,7 @@ public:
         , m_isHideRedlines(isHideRedlines)
         , m_eFieldmarkMode(eMode)
         , m_Start(rTextNode, 0)
-        , m_RedlineIndex(m_rIDRA.GetRedlinePos(rTextNode, RedlineType::Any))
+        , m_RedlineIndex(isHideRedlines ? m_rIDRA.GetRedlinePos(rTextNode, 
RedlineType::Any) : SwRedlineTable::npos)
         , m_pStartPos(nullptr)
         , m_pEndPos(&m_Start)
     {

Reply via email to