[Libreoffice-commits] core.git: sw/source
Serge Krot
Serge.Krot at cib.de
Fri Jul 6 08:23:58 UTC 2018
sw/source/core/text/porlay.cxx | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
New commits:
commit 97de51107824b5b3452e5343672c838da4b04b84
Author: Serge Krot <Serge.Krot at 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
(cherry picked from commit f8afdb8ba99074a85b331065b4642081467557ec)
Reviewed-on: https://gerrit.libreoffice.org/49578
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index d7d7ad015e77..7d5b87b8437a 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -54,6 +54,7 @@
#include <IDocumentRedlineAccess.hxx>
#include <IDocumentSettingAccess.hxx>
#include <IDocumentContentOperations.hxx>
+#include <IMark.hxx>
using namespace ::com::sun::star;
using namespace i18n::ScriptType;
@@ -2251,6 +2252,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)
More information about the Libreoffice-commits
mailing list