equal
deleted
inserted
replaced
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description : CEikRichTextEditor based Rich Text viewer |
14 * Description : CEikRichTextEditor based Rich Text viewer |
15 * Version : %version: e002sa33#40 % |
15 * Version : %version: e002sa32#41 % |
16 * |
16 * |
17 */ |
17 */ |
18 |
18 |
19 #include "cesmrrichtextviewer.h" |
19 #include "cesmrrichtextviewer.h" |
20 |
20 |
718 TInt linkIndex( KErrNotFound ); |
718 TInt linkIndex( KErrNotFound ); |
719 if ( 0 == iLinkList.Count() ) |
719 if ( 0 == iLinkList.Count() ) |
720 { |
720 { |
721 return linkIndex; |
721 return linkIndex; |
722 } |
722 } |
723 |
723 |
724 TCursorSelection currentSelection = Selection(); |
724 TCursorSelection currentSelection = Selection(); |
725 |
725 |
726 for ( TInt i = 0; i < iLinkList.Count(); ++i ) |
726 for ( TInt i = 0; i < iLinkList.Count(); ++i ) |
727 { |
727 { |
728 CESMRRichTextLink* tempLink = iLinkList[i]; |
728 CESMRRichTextLink* tempLink = iLinkList[i]; |
739 } |
739 } |
740 } |
740 } |
741 |
741 |
742 return linkIndex; |
742 return linkIndex; |
743 } |
743 } |
|
744 |
|
745 // ----------------------------------------------------------------------------- |
|
746 // CESMRRichTextViewer::PointerEventOccuresOnALinkL |
|
747 // ----------------------------------------------------------------------------- |
|
748 // |
|
749 EXPORT_C TBool CESMRRichTextViewer::PointerEventOccuresOnALinkL( |
|
750 const TPointerEvent &aPointerEvent ) |
|
751 { |
|
752 FUNC_LOG; |
|
753 TBool ret( EFalse ); |
|
754 |
|
755 RRegion linkArea; |
|
756 CleanupClosePushL( linkArea ); |
|
757 |
|
758 // Find matching link |
|
759 TInt count( iLinkList.Count() ); |
|
760 |
|
761 for ( TInt i = 0; i < count; ++i ) |
|
762 { |
|
763 CESMRRichTextLink* link = iLinkList[ i ]; |
|
764 GetLinkAreaL( linkArea, *link ); |
|
765 |
|
766 if ( linkArea.Contains( aPointerEvent.iPosition ) ) |
|
767 { |
|
768 ret = ETrue; |
|
769 break; |
|
770 } |
|
771 } |
|
772 |
|
773 CleanupStack::PopAndDestroy( &linkArea ); |
|
774 |
|
775 return ret; |
|
776 } |
|
777 |
744 |
778 |
745 // ----------------------------------------------------------------------------- |
779 // ----------------------------------------------------------------------------- |
746 // CESMRRichTextViewer::CESMRRichTextViewer |
780 // CESMRRichTextViewer::CESMRRichTextViewer |
747 // ----------------------------------------------------------------------------- |
781 // ----------------------------------------------------------------------------- |
748 // |
782 // |