summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unoportenum.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-04-22 15:10:19 +0200
committerJan Holesovsky <kendy@suse.cz>2011-04-22 15:10:19 +0200
commita093a28ffe7cae74fb731e84dd3de09102763303 (patch)
tree8ce5586e27a76180d800c09f8b60d5cce3d1c140 /sw/source/core/unocore/unoportenum.cxx
parent8dc7fcfb5e5a8de2411d2bb29f450cabc3690859 (diff)
parent99796d2482c2931a1023b8230a3f6b18d1f48ebf (diff)
Merge commit 'ooo/DEV300_m106' into libreoffice-3-4
Conflicts: sw/source/core/docnode/ndnotxt.cxx sw/source/core/inc/viewimp.hxx sw/source/core/layout/fly.cxx sw/source/core/layout/paintfrm.cxx sw/source/filter/ww8/WW8TableInfo.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/wrtww8.hxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/xml/xmlitemi.cxx sw/source/filter/xml/xmlmeta.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/shells/grfsh.cxx
Diffstat (limited to 'sw/source/core/unocore/unoportenum.cxx')
-rw-r--r--sw/source/core/unocore/unoportenum.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 04bbd54c893b..9225ab8533cb 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -155,12 +155,16 @@ namespace
++ppMark)
{
::sw::mark::IMark* const pBkmk = ppMark->get();
- bool hasOther = pBkmk->IsExpanded();
+ ::sw::mark::CrossRefBookmark *const pCrossRefMark(
+ dynamic_cast< ::sw::mark::CrossRefBookmark*>(pBkmk));
+ bool const hasOther = pBkmk->IsExpanded();
const SwPosition& rStartPos = pBkmk->GetMarkStart();
if(rStartPos.nNode == nOwnNode)
{
- const sal_uInt8 nType = hasOther ? BKM_TYPE_START : BKM_TYPE_START_END;
+ // #i109272#: cross reference marks: need special handling!
+ sal_uInt8 const nType = (hasOther || pCrossRefMark)
+ ? BKM_TYPE_START : BKM_TYPE_START_END;
rBkmArr.insert(SwXBookmarkPortion_ImplSharedPtr(
new SwXBookmarkPortion_Impl(
SwXBookmark::CreateXBookmark(rDoc, *pBkmk),
@@ -173,8 +177,10 @@ namespace
auto_ptr<SwPosition> pCrossRefEndPos;
const SwPosition* pEndPos = NULL;
if(hasOther)
+ {
pEndPos = &rEndPos;
- else if(dynamic_cast< ::sw::mark::CrossRefBookmark*>(pBkmk))
+ }
+ else if (pCrossRefMark)
{
// Crossrefbookmarks only remember the start position but have to span the whole paragraph
pCrossRefEndPos = auto_ptr<SwPosition>(new SwPosition(rEndPos));