Lines 294-299
Link Here
|
294 |
bool mbCharIsRTL; |
294 |
bool mbCharIsRTL; |
295 |
bool mbParaIsRTL; |
295 |
bool mbParaIsRTL; |
296 |
|
296 |
|
|
|
297 |
SwPosFlyFrms maFlyFrms; // i2916 |
298 |
|
297 |
xub_StrLen SearchNext( xub_StrLen nStartPos ); |
299 |
xub_StrLen SearchNext( xub_StrLen nStartPos ); |
298 |
void SetCharSet(const SwTxtAttr& rTxtAttr, bool bStart); |
300 |
void SetCharSet(const SwTxtAttr& rTxtAttr, bool bStart); |
299 |
void FieldVanish( const String& rTxt ); |
301 |
void FieldVanish( const String& rTxt ); |
Lines 388-393
Link Here
|
388 |
} |
390 |
} |
389 |
aIter = maDirChanges.begin(); |
391 |
aIter = maDirChanges.begin(); |
390 |
|
392 |
|
|
|
393 |
// i2916 |
394 |
// Create list of any graphics which may be anchored in this |
395 |
// paragraph. |
396 |
{ |
397 |
SwPosFlyFrms maAllFlys; |
398 |
|
399 |
rWrt.pDoc->GetAllFlyFmts(maAllFlys, rWrt.bWriteAll ? 0 : rWrt.GetEndPaM(), rWrt.bWrtWW8); |
400 |
ULONG nCurPos = rNd.GetIndex(); |
401 |
|
402 |
for (USHORT n = 0; n < maAllFlys.Count(); n++) |
403 |
{ |
404 |
// Do stuff |
405 |
ULONG flyNdPos = maAllFlys[n]->GetNdIndex().GetIndex(); |
406 |
|
407 |
if (flyNdPos == nCurPos) |
408 |
{ |
409 |
maFlyFrms.Insert(maAllFlys[n]); |
410 |
} |
411 |
else if (flyNdPos > nCurPos) |
412 |
{ |
413 |
// Array is sorted and we've run past our node? |
414 |
break; |
415 |
} |
416 |
} |
417 |
} |
418 |
|
391 |
if( rWrt.pDoc->GetRedlineTbl().Count() ) |
419 |
if( rWrt.pDoc->GetRedlineTbl().Count() ) |
392 |
{ |
420 |
{ |
393 |
SwPosition aPos( rNd, SwIndex( (SwTxtNode*)&rNd ) ); |
421 |
SwPosition aPos( rNd, SwIndex( (SwTxtNode*)&rNd ) ); |
Lines 498-503
Link Here
|
498 |
} |
526 |
} |
499 |
} |
527 |
} |
500 |
|
528 |
|
|
|
529 |
// i2916 |
530 |
// Check to see if there are any graphics anchored to characters |
531 |
// in this paragraph's text. |
532 |
// Set nMinPos to 1 past the placement because anchors in Word |
533 |
// appear after the character they are anchored to. |
534 |
if (maFlyFrms.Count() > 0) |
535 |
{ |
536 |
for (i = 0; i < maFlyFrms.Count(); i++) |
537 |
{ |
538 |
const SwPosition* pAnchorPos = maFlyFrms[i]->GetFmt().GetAnchor().GetCntntAnchor(); |
539 |
|
540 |
nPos = pAnchorPos->nContent.GetIndex(); |
541 |
if (nPos >= nStartPos && nPos <= nMinPos) |
542 |
{ |
543 |
nMinPos = nPos; |
544 |
} |
545 |
|
546 |
nPos++; |
547 |
|
548 |
if (nPos >= nStartPos && nPos <= nMinPos) |
549 |
{ |
550 |
nMinPos = nPos; |
551 |
} |
552 |
} |
553 |
} |
554 |
|
501 |
return nMinPos; |
555 |
return nMinPos; |
502 |
} |
556 |
} |
503 |
|
557 |
|
Lines 584-589
Link Here
|
584 |
rWrt.pOutFmtNode = pOldMod; |
638 |
rWrt.pOutFmtNode = pOldMod; |
585 |
} |
639 |
} |
586 |
|
640 |
|
|
|
641 |
// i2916 |
642 |
// May have an anchored graphic to be placed. |
643 |
if (maFlyFrms.Count() > 0) |
644 |
{ |
645 |
for (xub_StrLen i = 0; i < maFlyFrms.Count(); i++) |
646 |
{ |
647 |
const SwFmtAnchor& rAnchor = maFlyFrms[i]->GetFmt().GetAnchor(); |
648 |
|
649 |
const SwPosition* pAnchorPos = rAnchor.GetCntntAnchor(); |
650 |
|
651 |
xub_StrLen nPos = pAnchorPos->nContent.GetIndex(); |
652 |
|
653 |
if (nPos == nSwPos) |
654 |
{ |
655 |
const SwFrmFmt& rFmt = maFlyFrms[i]->GetFmt(); |
656 |
|
657 |
if ( rAnchor.GetAnchorId() == FLY_AUTO_CNTNT ) |
658 |
{ |
659 |
// OutWW8FlyFrm will flush the attributes |
660 |
// for the anchored character. |
661 |
Point aNdPos = rNd.FindLayoutRect(false, &aNdPos).Pos(); |
662 |
Point* pLayPos = &aNdPos; |
663 |
|
664 |
rWrt.OutWW8FlyFrm(rFmt, *pLayPos); |
665 |
} |
666 |
break; |
667 |
} |
668 |
} |
669 |
} |
670 |
|
587 |
OutRedlines( nSwPos ); |
671 |
OutRedlines( nSwPos ); |
588 |
} |
672 |
} |
589 |
|
673 |
|
Lines 601-606
Link Here
|
601 |
return true; |
685 |
return true; |
602 |
} |
686 |
} |
603 |
} |
687 |
} |
|
|
688 |
|
604 |
return false; |
689 |
return false; |
605 |
} |
690 |
} |
606 |
|
691 |
|
Lines 2319-2325
Link Here
|
2319 |
pLayPos = &aNdPos; |
2404 |
pLayPos = &aNdPos; |
2320 |
} |
2405 |
} |
2321 |
|
2406 |
|
2322 |
OutWW8FlyFrm( rFmt, *pLayPos ); |
2407 |
|
|
|
2408 |
// i2916: |
2409 |
// Anchored Escher objects should be dealt with by the |
2410 |
// Attribute Iterator as part of the text processing, |
2411 |
// in a similar manner to inline graphics, rather than |
2412 |
// simply writing them all out at the start of the |
2413 |
// paragraph. |
2414 |
if ( rFmt.GetAnchor().GetAnchorId() != FLY_AUTO_CNTNT ) |
2415 |
{ |
2416 |
OutWW8FlyFrm( rFmt, *pLayPos ); |
2417 |
} |
2418 |
|
2323 |
++n; |
2419 |
++n; |
2324 |
} |
2420 |
} |
2325 |
} |
2421 |
} |