Lines 70-75
Link Here
|
70 |
#ifndef _UNOOBJ_HXX |
70 |
#ifndef _UNOOBJ_HXX |
71 |
#include <unoobj.hxx> |
71 |
#include <unoobj.hxx> |
72 |
#endif |
72 |
#endif |
|
|
73 |
#ifndef _UNOFIELD_HXX |
74 |
#include <unofield.hxx> |
75 |
#endif |
73 |
#ifndef _UNOREDLINE_HXX |
76 |
#ifndef _UNOREDLINE_HXX |
74 |
#include <unoredline.hxx> |
77 |
#include <unoredline.hxx> |
75 |
#endif |
78 |
#endif |
Lines 294-300
Link Here
|
294 |
BYTE nBkmType; |
297 |
BYTE nBkmType; |
295 |
const SwPosition aPosition; |
298 |
const SwPosition aPosition; |
296 |
|
299 |
|
297 |
SwXBookmarkPortion_Impl( SwXBookmark* pXMark, BYTE nType, const SwPosition &rPosition ) |
300 |
SwXBookmarkPortion_Impl( SwXBookmark* pXMark, BYTE nType, const SwPosition &rPosition ) |
298 |
: xBookmark ( pXMark ) |
301 |
: xBookmark ( pXMark ) |
299 |
, nBkmType ( nType ) |
302 |
, nBkmType ( nType ) |
300 |
, aPosition ( rPosition ) |
303 |
, aPosition ( rPosition ) |
Lines 315-321
Link Here
|
315 |
// #i16896# for bookmark portions at the same position, the start should |
318 |
// #i16896# for bookmark portions at the same position, the start should |
316 |
// always precede the end. Hence compare positions, and use bookmark type |
319 |
// always precede the end. Hence compare positions, and use bookmark type |
317 |
// as tie-breaker for same position. |
320 |
// as tie-breaker for same position. |
318 |
// return ( r1->nIndex == r2->nIndex ) |
321 |
// return ( r1->nIndex == r2->nIndex ) |
319 |
// ? ( r1->nBkmType < r2->nBkmType ) |
322 |
// ? ( r1->nBkmType < r2->nBkmType ) |
320 |
// : ( r1->nIndex < r2->nIndex ); |
323 |
// : ( r1->nIndex < r2->nIndex ); |
321 |
|
324 |
|
Lines 329-335
Link Here
|
329 |
} |
332 |
} |
330 |
}; |
333 |
}; |
331 |
typedef std::multiset < SwXBookmarkPortion_ImplSharedPtr, BookmarkCompareStruct > SwXBookmarkPortion_ImplList; |
334 |
typedef std::multiset < SwXBookmarkPortion_ImplSharedPtr, BookmarkCompareStruct > SwXBookmarkPortion_ImplList; |
|
|
335 |
//----------------------------------------------------------------------------- |
336 |
struct SwXFieldBookmarkPortion_Impl |
337 |
{ |
338 |
Reference<XTextContent> m_xField; |
339 |
BYTE m_nBkmType; |
340 |
const SwPosition m_aPosition; |
341 |
xub_StrLen m_nLength; |
342 |
|
343 |
SwXFieldBookmarkPortion_Impl( SwXTextField* pXField, BYTE nType, |
344 |
const SwPosition &rPosition, xub_StrLen nLength ) |
345 |
: m_xField ( pXField ) |
346 |
, m_nBkmType ( nType ) |
347 |
, m_aPosition ( rPosition ) |
348 |
, m_nLength( nLength ) |
349 |
{ |
350 |
} |
351 |
ULONG getIndex () |
352 |
{ |
353 |
return m_aPosition.nContent.GetIndex(); |
354 |
} |
355 |
}; |
332 |
|
356 |
|
|
|
357 |
typedef boost::shared_ptr < SwXFieldBookmarkPortion_Impl > SwXFieldBookmarkPortion_ImplSharedPtr; |
358 |
struct FieldBookmarkCompareStruct |
359 |
{ |
360 |
bool operator () ( const SwXFieldBookmarkPortion_ImplSharedPtr &r1, |
361 |
const SwXFieldBookmarkPortion_ImplSharedPtr &r2 ) |
362 |
{ |
363 |
return r1->m_aPosition < r2->m_aPosition; |
364 |
} |
365 |
}; |
366 |
typedef std::multiset < SwXFieldBookmarkPortion_ImplSharedPtr, FieldBookmarkCompareStruct > |
367 |
SwXFieldBookmarkPortion_ImplList; |
333 |
//----------------------------------------------------------------------------- |
368 |
//----------------------------------------------------------------------------- |
334 |
void lcl_ExportBookmark( |
369 |
void lcl_ExportBookmark( |
335 |
SwXBookmarkPortion_ImplList& rBkmArr, ULONG nIndex, |
370 |
SwXBookmarkPortion_ImplList& rBkmArr, ULONG nIndex, |
Lines 346-352
Link Here
|
346 |
} |
381 |
} |
347 |
if ( nIndex < pPtr->getIndex() ) |
382 |
if ( nIndex < pPtr->getIndex() ) |
348 |
break; |
383 |
break; |
349 |
|
384 |
|
350 |
SwXTextPortion* pPortion; |
385 |
SwXTextPortion* pPortion; |
351 |
if(BKM_TYPE_START == pPtr->nBkmType || BKM_TYPE_START_END == pPtr->nBkmType) |
386 |
if(BKM_TYPE_START == pPtr->nBkmType || BKM_TYPE_START_END == pPtr->nBkmType) |
352 |
{ |
387 |
{ |
Lines 367-372
Link Here
|
367 |
rBkmArr.erase( aIter++ ); |
402 |
rBkmArr.erase( aIter++ ); |
368 |
} |
403 |
} |
369 |
} |
404 |
} |
|
|
405 |
//----------------------------------------------------------------------------- |
406 |
void lcl_ExportFieldBookmark( |
407 |
SwXFieldBookmarkPortion_ImplList& rFieldBkmArr, ULONG nIndex, |
408 |
SwUnoCrsr* pUnoCrsr, Reference<XText> & rParent, XTextRangeArr& rPortionArr) |
409 |
{ |
410 |
for ( SwXFieldBookmarkPortion_ImplList::iterator aIter = rFieldBkmArr.begin(), aEnd = rFieldBkmArr.end(); |
411 |
aIter != aEnd; ) |
412 |
{ |
413 |
SwXFieldBookmarkPortion_ImplSharedPtr pPtr = (*aIter); |
414 |
if ( nIndex > pPtr->getIndex() ) |
415 |
{ |
416 |
rFieldBkmArr.erase( aIter++ ); |
417 |
continue; |
418 |
} |
419 |
if ( nIndex < pPtr->getIndex() ) |
420 |
break; |
421 |
|
422 |
SwXTextPortion* pPortion; |
423 |
if(BKM_TYPE_START == pPtr->m_nBkmType || BKM_TYPE_START_END == pPtr->m_nBkmType) |
424 |
{ |
425 |
pUnoCrsr->Right( pPtr->m_nLength,CRSR_SKIP_CHARS,FALSE,FALSE ); |
426 |
rPortionArr.Insert( |
427 |
new Reference< XTextRange >(pPortion = new SwXTextPortion(pUnoCrsr, rParent, PORTION_FIELD)), |
428 |
rPortionArr.Count()); |
429 |
pPortion->SetBookmarkField( pPtr->m_xField ); |
430 |
pPortion->SetCollapsed(BKM_TYPE_START_END == pPtr->m_nBkmType ? TRUE : FALSE); |
431 |
if(*pUnoCrsr->GetPoint() < *pUnoCrsr->GetMark()) |
432 |
pUnoCrsr->Exchange(); |
433 |
*pUnoCrsr->GetMark() = *pUnoCrsr->GetPoint(); |
434 |
|
435 |
} |
436 |
/* if(BKM_TYPE_END == pPtr->m_nBkmType) |
437 |
{ |
438 |
rPortionArr.Insert( |
439 |
new Reference< XTextRange >(pPortion = new SwXTextPortion(pUnoCrsr, rParent, PORTION_BOOKMARK_END)), |
440 |
rPortionArr.Count()); |
441 |
pPortion->SetBookmark(pPtr->xBookmark); |
442 |
}*/ |
443 |
rFieldBkmArr.erase( aIter++ ); |
444 |
} |
445 |
} |
370 |
/* -----------------------------18.12.00 14:51-------------------------------- |
446 |
/* -----------------------------18.12.00 14:51-------------------------------- |
371 |
|
447 |
|
372 |
---------------------------------------------------------------------------*/ |
448 |
---------------------------------------------------------------------------*/ |
Lines 404-410
Link Here
|
404 |
bool operator () ( const SwXRedlinePortion_ImplSharedPtr &r1, |
480 |
bool operator () ( const SwXRedlinePortion_ImplSharedPtr &r1, |
405 |
const SwXRedlinePortion_ImplSharedPtr &r2 ) |
481 |
const SwXRedlinePortion_ImplSharedPtr &r2 ) |
406 |
{ |
482 |
{ |
407 |
return getPosition ( r1 ) < getPosition ( r2 ); |
483 |
return getPosition ( r1 ) < getPosition ( r2 ); |
408 |
} |
484 |
} |
409 |
}; |
485 |
}; |
410 |
typedef std::multiset < SwXRedlinePortion_ImplSharedPtr, RedlineCompareStruct > SwXRedlinePortion_ImplList; |
486 |
typedef std::multiset < SwXRedlinePortion_ImplSharedPtr, RedlineCompareStruct > SwXRedlinePortion_ImplList; |
Lines 419-424
Link Here
|
419 |
const xub_StrLen& nFirstFrameIndex, |
495 |
const xub_StrLen& nFirstFrameIndex, |
420 |
SwXBookmarkPortion_ImplList& aBkmArr, |
496 |
SwXBookmarkPortion_ImplList& aBkmArr, |
421 |
SwXRedlinePortion_ImplList& aRedArr, |
497 |
SwXRedlinePortion_ImplList& aRedArr, |
|
|
498 |
SwXFieldBookmarkPortion_ImplList& rFieldBkmArr, |
422 |
sal_Int32 nEndPos ) |
499 |
sal_Int32 nEndPos ) |
423 |
{ |
500 |
{ |
424 |
Reference<XTextRange> xRef; |
501 |
Reference<XTextRange> xRef; |
Lines 622-627
Link Here
|
622 |
{ |
699 |
{ |
623 |
nMovePos = (sal_uInt16)(*aRedArr.begin())->getRealIndex(); |
700 |
nMovePos = (sal_uInt16)(*aRedArr.begin())->getRealIndex(); |
624 |
} |
701 |
} |
|
|
702 |
//break up portions for field bookmarks |
703 |
if( rFieldBkmArr.size() && (*rFieldBkmArr.begin())->getIndex() < nMovePos ) |
704 |
nMovePos = (sal_uInt16)(*rFieldBkmArr.begin())->getIndex(); |
625 |
// break up if the destination is behind a frame |
705 |
// break up if the destination is behind a frame |
626 |
if(nFirstFrameIndex != STRING_MAXLEN && nMovePos > nFirstFrameIndex) |
706 |
if(nFirstFrameIndex != STRING_MAXLEN && nMovePos > nFirstFrameIndex) |
627 |
nMovePos = nFirstFrameIndex; |
707 |
nMovePos = nFirstFrameIndex; |
Lines 644-649
Link Here
|
644 |
return xRef; |
724 |
return xRef; |
645 |
} |
725 |
} |
646 |
//----------------------------------------------------------------------------- |
726 |
//----------------------------------------------------------------------------- |
|
|
727 |
void lcl_FillFieldBookmarkArray(SwDoc& rDoc, SwUnoCrsr& rUnoCrsr, |
728 |
SwXFieldBookmarkPortion_ImplList& rFieldBkmArr ) |
729 |
{ |
730 |
const SwBookmarks& rMarks = rDoc.getBookmarks(); |
731 |
sal_uInt16 nArrLen = rMarks.Count(); |
732 |
if ( nArrLen > 0 ) |
733 |
{ |
734 |
const SwNodeIndex nOwnNode = rUnoCrsr.GetPoint()->nNode; |
735 |
//search for fields as bookmark - currently InputFields only |
736 |
for( sal_uInt16 n = 0; n < nArrLen; ++n ) |
737 |
{ |
738 |
SwBookmark* pMark = rMarks.GetObject( n ); |
739 |
if( !pMark->IsFieldBookMark() ) |
740 |
continue; |
741 |
SwFieldBookmark* pFieldMark = dynamic_cast< SwFieldBookmark* >( pMark ); |
742 |
|
743 |
const SwPosition& rPos1 = *pMark->Start(); |
744 |
const SwPosition* pPos2 = pMark->End(); |
745 |
if(rPos1.nNode == nOwnNode) |
746 |
{ |
747 |
BYTE nType = BKM_TYPE_START; |
748 |
DBG_ASSERT(!pPos2 || pPos2->nNode == nOwnNode, |
749 |
"field bookmarks are currently limited to be inside of a paragraph") |
750 |
|
751 |
rFieldBkmArr.insert( SwXFieldBookmarkPortion_ImplSharedPtr ( |
752 |
new SwXFieldBookmarkPortion_Impl( |
753 |
SwXTextFieldTypes::GetObject(*pFieldMark), nType, rPos1, |
754 |
pPos2->nContent.GetIndex() - rPos1.nContent.GetIndex() ))); |
755 |
} |
756 |
// currently field bookmarks must not spread over different paragraphs |
757 |
// if(pPos2 && pPos2->nNode == nOwnNode) |
758 |
// { |
759 |
// BYTE nType = bBackward ? BKM_TYPE_START : BKM_TYPE_END; |
760 |
// new SwXFieldBookmarkPortion_Impl( SwXTextFieldTypes::GetObject(*pFieldMark), nType, *pPos2 ) ) ); |
761 |
// } |
762 |
} |
763 |
} |
764 |
} |
765 |
//----------------------------------------------------------------------------- |
647 |
void lcl_FillBookmarkArray(SwDoc& rDoc,SwUnoCrsr& rUnoCrsr, SwXBookmarkPortion_ImplList& rBkmArr ) |
766 |
void lcl_FillBookmarkArray(SwDoc& rDoc,SwUnoCrsr& rUnoCrsr, SwXBookmarkPortion_ImplList& rBkmArr ) |
648 |
{ |
767 |
{ |
649 |
const SwBookmarks& rMarks = rDoc.getBookmarks(); |
768 |
const SwBookmarks& rMarks = rDoc.getBookmarks(); |
Lines 669-682
Link Here
|
669 |
nType = BKM_TYPE_START_END; |
788 |
nType = BKM_TYPE_START_END; |
670 |
} |
789 |
} |
671 |
|
790 |
|
672 |
rBkmArr.insert ( SwXBookmarkPortion_ImplSharedPtr ( |
791 |
rBkmArr.insert ( SwXBookmarkPortion_ImplSharedPtr ( |
673 |
new SwXBookmarkPortion_Impl ( SwXBookmarks::GetObject( *pMark, &rDoc ), nType, rPos1 ))); |
792 |
new SwXBookmarkPortion_Impl ( SwXBookmarks::GetObject( *pMark, &rDoc ), nType, rPos1 ))); |
674 |
|
793 |
|
675 |
} |
794 |
} |
676 |
if(pPos2 && pPos2->nNode == nOwnNode) |
795 |
if(pPos2 && pPos2->nNode == nOwnNode) |
677 |
{ |
796 |
{ |
678 |
BYTE nType = bBackward ? BKM_TYPE_START : BKM_TYPE_END; |
797 |
BYTE nType = bBackward ? BKM_TYPE_START : BKM_TYPE_END; |
679 |
rBkmArr.insert( SwXBookmarkPortion_ImplSharedPtr ( |
798 |
rBkmArr.insert( SwXBookmarkPortion_ImplSharedPtr ( |
680 |
new SwXBookmarkPortion_Impl( SwXBookmarks::GetObject( *pMark, &rDoc ), nType, *pPos2 ) ) ); |
799 |
new SwXBookmarkPortion_Impl( SwXBookmarks::GetObject( *pMark, &rDoc ), nType, *pPos2 ) ) ); |
681 |
} |
800 |
} |
682 |
} |
801 |
} |
Lines 701-710
Link Here
|
701 |
const SwNodeIndex nRedNode = pRedStart->nNode; |
820 |
const SwNodeIndex nRedNode = pRedStart->nNode; |
702 |
IDocumentRedlineAccess::RedlineType_t nType = pRedline->GetType(); |
821 |
IDocumentRedlineAccess::RedlineType_t nType = pRedline->GetType(); |
703 |
if ( nOwnNode == nRedNode ) |
822 |
if ( nOwnNode == nRedNode ) |
704 |
rRedArr.insert( SwXRedlinePortion_ImplSharedPtr ( |
823 |
rRedArr.insert( SwXRedlinePortion_ImplSharedPtr ( |
705 |
new SwXRedlinePortion_Impl ( pRedline, TRUE) ) ); |
824 |
new SwXRedlinePortion_Impl ( pRedline, TRUE) ) ); |
706 |
if( pRedline->HasMark() && pRedline->End()->nNode == nOwnNode ) |
825 |
if( pRedline->HasMark() && pRedline->End()->nNode == nOwnNode ) |
707 |
rRedArr.insert( SwXRedlinePortion_ImplSharedPtr ( |
826 |
rRedArr.insert( SwXRedlinePortion_ImplSharedPtr ( |
708 |
new SwXRedlinePortion_Impl ( pRedline, FALSE) ) ); |
827 |
new SwXRedlinePortion_Impl ( pRedline, FALSE) ) ); |
709 |
} |
828 |
} |
710 |
} |
829 |
} |
Lines 737-743
Link Here
|
737 |
rPortionArr.Count()); |
856 |
rPortionArr.Count()); |
738 |
rRedlineArr.erase ( aIter++ ); |
857 |
rRedlineArr.erase ( aIter++ ); |
739 |
} |
858 |
} |
740 |
// MTG: 23/11/05: If we've iterated past nIndex, exit the loop |
859 |
// MTG: 23/11/05: If we've iterated past nIndex, exit the loop |
741 |
else |
860 |
else |
742 |
break; |
861 |
break; |
743 |
} |
862 |
} |
Lines 756-763
Link Here
|
756 |
if (rRedlineArr.size()) |
875 |
if (rRedlineArr.size()) |
757 |
lcl_ExportRedline(rRedlineArr, nIndex, pUnoCrsr, rParent, rPortionArr); |
876 |
lcl_ExportRedline(rRedlineArr, nIndex, pUnoCrsr, rParent, rPortionArr); |
758 |
} |
877 |
} |
|
|
878 |
|
879 |
/*-- 04.04.2007 13:38:34--------------------------------------------------- |
880 |
|
881 |
-----------------------------------------------------------------------*/ |
882 |
void lcl_ExportFieldBookmarks( SwXFieldBookmarkPortion_ImplList& rFieldBkmArr, |
883 |
ULONG nIndex, SwUnoCrsr* pUnoCrsr, |
884 |
Reference<XText> & rParent, XTextRangeArr& rPortionArr ) |
885 |
{ |
886 |
if (rFieldBkmArr.size()) |
887 |
lcl_ExportFieldBookmark(rFieldBkmArr, nIndex, pUnoCrsr, rParent, rPortionArr); |
888 |
} |
759 |
//----------------------------------------------------------------------------- |
889 |
//----------------------------------------------------------------------------- |
760 |
sal_Int32 lcl_GetNextIndex(SwXBookmarkPortion_ImplList& rBkmArr, SwXRedlinePortion_ImplList& rRedlineArr) |
890 |
sal_Int32 lcl_GetNextIndex( |
|
|
891 |
SwXBookmarkPortion_ImplList& rBkmArr, |
892 |
SwXRedlinePortion_ImplList& rRedlineArr, |
893 |
SwXFieldBookmarkPortion_ImplList& rFieldBkmArr ) |
761 |
{ |
894 |
{ |
762 |
sal_Int32 nRet = -1; |
895 |
sal_Int32 nRet = -1; |
763 |
if(rBkmArr.size()) |
896 |
if(rBkmArr.size()) |
Lines 772-777
Link Here
|
772 |
if(nRet < 0 || nTmp < nRet) |
905 |
if(nRet < 0 || nTmp < nRet) |
773 |
nRet = nTmp; |
906 |
nRet = nTmp; |
774 |
} |
907 |
} |
|
|
908 |
if(rFieldBkmArr.size()) |
909 |
{ |
910 |
const SwXFieldBookmarkPortion_ImplSharedPtr pPtr = (*rFieldBkmArr.begin()); |
911 |
sal_Int32 nTmp = pPtr->getIndex(); |
912 |
if(nRet < 0 || nTmp < nRet) |
913 |
nRet = nTmp; |
914 |
} |
775 |
return nRet; |
915 |
return nRet; |
776 |
}; |
916 |
}; |
777 |
//----------------------------------------------------------------------------- |
917 |
//----------------------------------------------------------------------------- |
Lines 792-801
Link Here
|
792 |
{ |
932 |
{ |
793 |
SwXBookmarkPortion_ImplList aBkmArr; |
933 |
SwXBookmarkPortion_ImplList aBkmArr; |
794 |
SwXRedlinePortion_ImplList aRedArr; |
934 |
SwXRedlinePortion_ImplList aRedArr; |
|
|
935 |
SwXFieldBookmarkPortion_ImplList aFieldBkmArr; |
795 |
|
936 |
|
796 |
SwDoc* pDoc = pUnoCrsr->GetDoc(); |
937 |
SwDoc* pDoc = pUnoCrsr->GetDoc(); |
797 |
lcl_FillRedlineArray(*pDoc, *pUnoCrsr, aRedArr); |
938 |
lcl_FillRedlineArray(*pDoc, *pUnoCrsr, aRedArr); |
798 |
lcl_FillBookmarkArray(*pDoc, *pUnoCrsr, aBkmArr ); |
939 |
lcl_FillBookmarkArray(*pDoc, *pUnoCrsr, aBkmArr ); |
|
|
940 |
lcl_FillFieldBookmarkArray(*pDoc, *pUnoCrsr, aFieldBkmArr ); |
799 |
#if OSL_DEBUG_LEVEL > 1 |
941 |
#if OSL_DEBUG_LEVEL > 1 |
800 |
for (SwXBookmarkPortion_ImplList::const_iterator aIter = aBkmArr.begin(), aEnd = aBkmArr.end(); |
942 |
for (SwXBookmarkPortion_ImplList::const_iterator aIter = aBkmArr.begin(), aEnd = aBkmArr.end(); |
801 |
aIter != aEnd; |
943 |
aIter != aEnd; |
Lines 834-839
Link Here
|
834 |
if(!pCNd->Len()) |
976 |
if(!pCNd->Len()) |
835 |
{ |
977 |
{ |
836 |
lcl_ExportBkmAndRedline(aBkmArr, aRedArr, 0, pUnoCrsr, xParent, aPortionArr); |
978 |
lcl_ExportBkmAndRedline(aBkmArr, aRedArr, 0, pUnoCrsr, xParent, aPortionArr); |
|
|
979 |
lcl_ExportFieldBookmarks( aFieldBkmArr, 0, pUnoCrsr, xParent, aPortionArr ); |
837 |
// the paragraph is empty |
980 |
// the paragraph is empty |
838 |
xRef = new SwXTextPortion(pUnoCrsr, xParent, ePortionType); |
981 |
xRef = new SwXTextPortion(pUnoCrsr, xParent, ePortionType); |
839 |
// are there any frames? |
982 |
// are there any frames? |
Lines 894-899
Link Here
|
894 |
if(!xRef.is()) |
1037 |
if(!xRef.is()) |
895 |
{ |
1038 |
{ |
896 |
lcl_ExportBkmAndRedline(aBkmArr, aRedArr, nCurrentIndex, pUnoCrsr, xParent, aPortionArr); |
1039 |
lcl_ExportBkmAndRedline(aBkmArr, aRedArr, nCurrentIndex, pUnoCrsr, xParent, aPortionArr); |
|
|
1040 |
lcl_ExportFieldBookmarks( aFieldBkmArr, nCurrentIndex, pUnoCrsr, xParent, aPortionArr ); |
897 |
if(pHints) |
1041 |
if(pHints) |
898 |
{ |
1042 |
{ |
899 |
xRef = lcl_ExportHints(pHints, |
1043 |
xRef = lcl_ExportHints(pHints, |
Lines 905-910
Link Here
|
905 |
nFirstFrameIndex, |
1049 |
nFirstFrameIndex, |
906 |
aBkmArr, |
1050 |
aBkmArr, |
907 |
aRedArr, |
1051 |
aRedArr, |
|
|
1052 |
aFieldBkmArr, |
908 |
nEndPos); |
1053 |
nEndPos); |
909 |
|
1054 |
|
910 |
} |
1055 |
} |
Lines 914-920
Link Here
|
914 |
} |
1059 |
} |
915 |
else |
1060 |
else |
916 |
{ |
1061 |
{ |
917 |
sal_Int32 nNextIndex = lcl_GetNextIndex(aBkmArr, aRedArr); |
1062 |
sal_Int32 nNextIndex = lcl_GetNextIndex(aBkmArr, aRedArr, aFieldBkmArr); |
918 |
DBG_ASSERT( nNextIndex <= pCNd->Len(), "illegal next index" ); |
1063 |
DBG_ASSERT( nNextIndex <= pCNd->Len(), "illegal next index" ); |
919 |
if( nNextIndex > pCNd->Len() ) |
1064 |
if( nNextIndex > pCNd->Len() ) |
920 |
{ |
1065 |
{ |
Lines 963-969
Link Here
|
963 |
bAtEnd = sal_True; |
1108 |
bAtEnd = sal_True; |
964 |
lcl_ExportBkmAndRedline(aBkmArr, aRedArr, nLocalEnd, |
1109 |
lcl_ExportBkmAndRedline(aBkmArr, aRedArr, nLocalEnd, |
965 |
pUnoCrsr, xParent, aPortionArr); |
1110 |
pUnoCrsr, xParent, aPortionArr); |
966 |
if(ND_TEXTNODE == pNode->GetNodeType()) |
1111 |
lcl_ExportFieldBookmarks( aFieldBkmArr, nLocalEnd, |
|
|
1112 |
pUnoCrsr, xParent, aPortionArr ); |
1113 |
|
1114 |
if(ND_TEXTNODE == pNode->GetNodeType()) |
967 |
{ |
1115 |
{ |
968 |
SwTxtNode* pTxtNode = (SwTxtNode*)pNode; |
1116 |
SwTxtNode* pTxtNode = (SwTxtNode*)pNode; |
969 |
SwpHints* pHints = pTxtNode->GetpSwpHints(); |
1117 |
SwpHints* pHints = pTxtNode->GetpSwpHints(); |
Lines 979-984
Link Here
|
979 |
STRING_MAXLEN, |
1127 |
STRING_MAXLEN, |
980 |
aBkmArr, |
1128 |
aBkmArr, |
981 |
aRedArr, |
1129 |
aRedArr, |
|
|
1130 |
aFieldBkmArr, |
982 |
nEndPos); |
1131 |
nEndPos); |
983 |
if(xRef.is()) |
1132 |
if(xRef.is()) |
984 |
aPortionArr.Insert(new Reference<XTextRange>(xRef), aPortionArr.Count()); |
1133 |
aPortionArr.Insert(new Reference<XTextRange>(xRef), aPortionArr.Count()); |