Rebased ref, commits from common ancestor:
commit f8afdb8ba99074a85b331065b4642081467557ec
Author: Serge Krot <serge.k...@cib.de>
Date:   Mon Feb 12 10:19:10 2018 +0100

    tdf#101856: Use bookmark attributes at load
    
    Conflicts:
            sw/source/core/text/porlay.cxx
    
    Change-Id: I935c50f8b3a1d7179121b9230a7f7f25fa6aea22

diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 0c9ebb64a103..66d86985e653 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -50,6 +50,7 @@
 #include <IDocumentRedlineAccess.hxx>
 #include <IDocumentSettingAccess.hxx>
 #include <IDocumentContentOperations.hxx>
+#include <IMark.hxx>
 
 using namespace ::com::sun::star;
 using namespace i18n::ScriptType;
@@ -2082,6 +2083,25 @@ void SwScriptInfo::selectHiddenTextProperty(const 
SwTextNode& rNode, MultiSelect
             }
         }
     }
+
+    for (const SwIndex* pIndex = rNode.GetFirstIndex(); pIndex; pIndex = 
pIndex->GetNext())
+    {
+        const sw::mark::IMark* pMark = pIndex->GetMark();
+        const sw::mark::IBookmark* pBookmark = dynamic_cast<const 
sw::mark::IBookmark*>(pMark);
+        if (pBookmark && pBookmark->IsHidden())
+        {
+            // intersect bookmark range with textnode range and add the 
intersection to rHiddenMulti
+
+            const sal_Int32 nSt =  
pBookmark->GetMarkStart().nContent.GetIndex();
+            const sal_Int32 nEnd = pBookmark->GetMarkEnd().nContent.GetIndex();
+
+            if( nEnd > nSt )
+            {
+                Range aTmp( nSt, nEnd - 1 );
+                rHiddenMulti.Select(aTmp, true);
+            }
+        }
+    }
 }
 
 void SwScriptInfo::selectRedLineDeleted(const SwTextNode& rNode, 
MultiSelection &rHiddenMulti, bool bSelect)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to