|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Meeting request description field |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "cesmrviewerdescriptionfield.h" |
|
19 |
|
20 #include "esmrfieldbuilderdef.h" |
|
21 #include "cesmrrichtextviewer.h" |
|
22 #include "cesmrrichtextlink.h" |
|
23 #include "mesmrlistobserver.h" |
|
24 #include "cesmrlocationplugin.h" |
|
25 #include "esmrconfig.hrh" |
|
26 #include "cesmrfeaturesettings.h" |
|
27 #include "cesmrfieldcommandevent.h" |
|
28 #include "nmrlayoutmanager.h" |
|
29 |
|
30 //<cmail> |
|
31 #include "cesmrurlparserplugin.h" |
|
32 //</cmail> |
|
33 #include <calentry.h> |
|
34 #include <AknUtils.h> |
|
35 #include <StringLoader.h> |
|
36 #include <esmrgui.rsg> |
|
37 #include <avkon.rsg> |
|
38 #include <txtrich.h> |
|
39 |
|
40 #include "emailtrace.h" |
|
41 |
|
42 // Unnamed namespace for local definitions and functions |
|
43 namespace { // codescanner::namespace |
|
44 |
|
45 const TInt KMargin (5); |
|
46 |
|
47 }//namespace |
|
48 |
|
49 // ======== MEMBER FUNCTIONS ======== |
|
50 |
|
51 // --------------------------------------------------------------------------- |
|
52 // CESMRViewerDescriptionField::NewL() |
|
53 // --------------------------------------------------------------------------- |
|
54 // |
|
55 CESMRViewerDescriptionField* CESMRViewerDescriptionField::NewL( ) |
|
56 { |
|
57 FUNC_LOG; |
|
58 CESMRViewerDescriptionField* self = new (ELeave) CESMRViewerDescriptionField; |
|
59 CleanupStack::PushL (self ); |
|
60 self->ConstructL ( ); |
|
61 CleanupStack::Pop (self ); |
|
62 return self; |
|
63 } |
|
64 |
|
65 // --------------------------------------------------------------------------- |
|
66 // CESMRViewerDescriptionField::~CESMRViewerDescriptionField() |
|
67 // --------------------------------------------------------------------------- |
|
68 // |
|
69 CESMRViewerDescriptionField::~CESMRViewerDescriptionField( ) |
|
70 { |
|
71 FUNC_LOG; |
|
72 delete iLocationPlugin; |
|
73 delete iFeatures; |
|
74 delete iUrlParser; |
|
75 } |
|
76 |
|
77 // --------------------------------------------------------------------------- |
|
78 // CESMRViewerDescriptionField::InitializeL() |
|
79 // --------------------------------------------------------------------------- |
|
80 // |
|
81 void CESMRViewerDescriptionField::InitializeL() |
|
82 { |
|
83 FUNC_LOG; |
|
84 TAknLayoutText layoutText = |
|
85 NMRLayoutManager::GetLayoutText( Rect(), NMRLayoutManager::EMRTextLayoutMultiRowTextEditor ); |
|
86 iRichTextViewer->SetFontL( layoutText.Font() ); |
|
87 iRichTextViewer->ApplyLayoutChangesL(); |
|
88 |
|
89 if ( IsFocused() ) |
|
90 { |
|
91 iRichTextViewer->FocusChanged( EDrawNow ); |
|
92 } |
|
93 |
|
94 iRichTextViewer->HandleTextChangedL(); |
|
95 iRichTextViewer->SetEventQueue( iEventQueue ); |
|
96 } |
|
97 |
|
98 // --------------------------------------------------------------------------- |
|
99 // CESMRViewerDescriptionField::InternalizeL() |
|
100 // --------------------------------------------------------------------------- |
|
101 // |
|
102 void CESMRViewerDescriptionField::InternalizeL( MESMRCalEntry& aEntry ) |
|
103 { |
|
104 FUNC_LOG; |
|
105 TPtrC text = aEntry.Entry().DescriptionL ( ); |
|
106 if( text.Length() == 0 ) |
|
107 { |
|
108 iObserver->HideControl( FieldId() ); |
|
109 } |
|
110 else if ( FeaturesL().FeatureSupported( |
|
111 CESMRFeatureSettings::EESMRUIMnFwIntegration ) ) |
|
112 { |
|
113 AddShowOnMapLinkL( aEntry ); |
|
114 } |
|
115 else |
|
116 { |
|
117 TPtrC text = aEntry.Entry().DescriptionL(); |
|
118 iRichTextViewer->SetTextL( &text, ETrue ); |
|
119 iRichTextViewer->SetMargins( KMargin ); |
|
120 iRichTextViewer->ApplyLayoutChangesL(); |
|
121 } |
|
122 iDisableRedraw = ETrue; |
|
123 } |
|
124 |
|
125 // --------------------------------------------------------------------------- |
|
126 // CESMRViewerDescriptionField::OfferKeyEventL() |
|
127 // --------------------------------------------------------------------------- |
|
128 // |
|
129 TKeyResponse CESMRViewerDescriptionField::OfferKeyEventL( |
|
130 const TKeyEvent& aEvent, TEventCode aType ) |
|
131 { |
|
132 FUNC_LOG; |
|
133 TKeyResponse response = EKeyWasNotConsumed; |
|
134 response = iRichTextViewer->OfferKeyEventL ( aEvent, aType ); |
|
135 |
|
136 //track up and down events to change MSK |
|
137 if ( aType == EEventKey ) |
|
138 { |
|
139 if ( aEvent.iCode == EKeyUpArrow || aEvent.iCode == EKeyDownArrow ) |
|
140 { |
|
141 if ( !iRichTextViewer->GetSelectedLink() ) |
|
142 { |
|
143 // Restore default middle softkey if field does not contain link |
|
144 RestoreMiddleSoftKeyL(); |
|
145 } |
|
146 } |
|
147 } |
|
148 return response; |
|
149 } |
|
150 |
|
151 // --------------------------------------------------------------------------- |
|
152 // CESMRViewerDescriptionField::MinimumSize() |
|
153 // --------------------------------------------------------------------------- |
|
154 // |
|
155 TSize CESMRViewerDescriptionField::MinimumSize() |
|
156 { |
|
157 TRect rect( Parent()->Rect() ); |
|
158 TRect listRect = |
|
159 NMRLayoutManager::GetLayoutRect( rect, NMRLayoutManager::EMRLayoutListArea ).Rect(); |
|
160 TRect fieldRect = |
|
161 NMRLayoutManager::GetFieldLayoutRect( listRect, 1 ).Rect(); |
|
162 TRect rowRect = |
|
163 NMRLayoutManager::GetFieldRowLayoutRect( fieldRect, 1 ).Rect(); |
|
164 TRect viewerRect = |
|
165 NMRLayoutManager::GetLayoutText( rowRect, NMRLayoutManager::EMRTextLayoutMultiRowTextEditor ).TextRect(); |
|
166 |
|
167 fieldRect.Resize( 0, iSize.iHeight - viewerRect.Height() ); |
|
168 fieldRect.SetWidth( Parent()->Rect().Width() ); |
|
169 return fieldRect.Size(); |
|
170 } |
|
171 |
|
172 // --------------------------------------------------------------------------- |
|
173 // CESMRViewerDescriptionField::SizeChanged() |
|
174 // --------------------------------------------------------------------------- |
|
175 // |
|
176 void CESMRViewerDescriptionField::SizeChanged() |
|
177 { |
|
178 // Store iRichTextViewer original width. |
|
179 TInt richTextViewerWidth = iRichTextViewer->Size().iWidth; |
|
180 TRect rect( Rect() ); |
|
181 rect = NMRLayoutManager::GetFieldRowLayoutRect( rect, 1 ).Rect(); |
|
182 |
|
183 TRect viewerRect = |
|
184 NMRLayoutManager::GetLayoutText( |
|
185 rect, |
|
186 NMRLayoutManager::EMRTextLayoutMultiRowTextEditor ).TextRect(); |
|
187 |
|
188 TRect bgRect( viewerRect.iTl, |
|
189 TSize( viewerRect.Width(), iSize.iHeight ) ); |
|
190 // Move focus rect so that it's relative to field's position. |
|
191 bgRect.Move( -Position() ); |
|
192 |
|
193 // Setting Font for the rich text viewer |
|
194 TAknLayoutText text = NMRLayoutManager::GetLayoutText( |
|
195 Rect(), |
|
196 NMRLayoutManager::EMRTextLayoutTextEditor ); |
|
197 |
|
198 // Failures are ignored. |
|
199 TRAP_IGNORE( |
|
200 // Try setting font |
|
201 iRichTextViewer->SetFontL( text.Font() ); |
|
202 // Try applying changes |
|
203 iRichTextViewer->ApplyLayoutChangesL(); |
|
204 ); |
|
205 |
|
206 iRichTextViewer->SetRect( |
|
207 TRect( viewerRect.iTl, |
|
208 TSize( viewerRect.Width(), iSize.iHeight ) ) ); |
|
209 |
|
210 if ( iRichTextViewer->Size().iWidth != richTextViewerWidth ) |
|
211 { |
|
212 // Most of this case is screen orientation, in this case we need to |
|
213 // Record the index of focusing link, after updating link array, then |
|
214 // reset the focusing to original one. |
|
215 TInt focusingIndex = iRichTextViewer->GetFocusLink(); |
|
216 if ( KErrNotFound != focusingIndex ) |
|
217 { |
|
218 iRichTextViewer->SetFocusLink( focusingIndex ); |
|
219 //wake up current contact menu selection by calling this |
|
220 iRichTextViewer->FocusChanged(ENoDrawNow); |
|
221 } |
|
222 } |
|
223 } |
|
224 |
|
225 // --------------------------------------------------------------------------- |
|
226 // CESMRViewerDescriptionField::CountComponentControls() |
|
227 // --------------------------------------------------------------------------- |
|
228 // |
|
229 TInt CESMRViewerDescriptionField::CountComponentControls() const |
|
230 { |
|
231 return 1; |
|
232 } |
|
233 |
|
234 // --------------------------------------------------------------------------- |
|
235 // CESMRViewerDescriptionField::ComponentControl() |
|
236 // --------------------------------------------------------------------------- |
|
237 // |
|
238 CCoeControl* CESMRViewerDescriptionField::ComponentControl( TInt aIndex ) const |
|
239 { |
|
240 switch ( aIndex ) |
|
241 { |
|
242 case 0: |
|
243 return iRichTextViewer; |
|
244 default: |
|
245 return NULL; |
|
246 } |
|
247 } |
|
248 |
|
249 // --------------------------------------------------------------------------- |
|
250 // CESMRViewerDescriptionField::HandleEdwinSizeEventL() |
|
251 // --------------------------------------------------------------------------- |
|
252 // |
|
253 TBool CESMRViewerDescriptionField::HandleEdwinSizeEventL(CEikEdwin* /*aEdwin*/, |
|
254 TEdwinSizeEvent /*aType*/, TSize aSize ) |
|
255 { |
|
256 FUNC_LOG; |
|
257 iSize = aSize; |
|
258 |
|
259 if ( iObserver && iDisableRedraw ) |
|
260 { |
|
261 iObserver->ControlSizeChanged ( this ); |
|
262 } |
|
263 |
|
264 if ( !iOutlineFocus ) |
|
265 { |
|
266 RecordField(); |
|
267 } |
|
268 |
|
269 return iDisableRedraw; |
|
270 } |
|
271 |
|
272 // --------------------------------------------------------------------------- |
|
273 // CESMRViewerDescriptionField::HandleRichTextLinkSelection |
|
274 // --------------------------------------------------------------------------- |
|
275 // |
|
276 TBool CESMRViewerDescriptionField::HandleRichTextLinkSelection( |
|
277 const CESMRRichTextLink* aLink ) |
|
278 { |
|
279 TBool result = EFalse; |
|
280 if ( aLink && |
|
281 aLink->Type() == CESMRRichTextLink::ETypeLocationUrl ) |
|
282 { |
|
283 TRAPD( error, ShowLocationOnMapL( *aLink ) ) |
|
284 if ( error ) |
|
285 { |
|
286 iCoeEnv->HandleError( error ); |
|
287 } |
|
288 result = ETrue; |
|
289 } |
|
290 return result; |
|
291 } |
|
292 |
|
293 // --------------------------------------------------------------------------- |
|
294 // CESMRViewerDescriptionField::CESMRViewerDescriptionField() |
|
295 // --------------------------------------------------------------------------- |
|
296 // |
|
297 CESMRViewerDescriptionField::CESMRViewerDescriptionField( ) |
|
298 { |
|
299 FUNC_LOG; |
|
300 SetFieldId( EESMRFieldDescription ); |
|
301 SetFocusType( EESMRHighlightFocus ); |
|
302 } |
|
303 |
|
304 // --------------------------------------------------------------------------- |
|
305 // CESMRViewerDescriptionField::ConstructL() |
|
306 // --------------------------------------------------------------------------- |
|
307 // |
|
308 void CESMRViewerDescriptionField::ConstructL( ) |
|
309 { |
|
310 FUNC_LOG; |
|
311 iRichTextViewer = CESMRRichTextViewer::NewL( this ); |
|
312 iRichTextViewer->SetEdwinSizeObserver( this ); |
|
313 CESMRField::ConstructL( iRichTextViewer ); // ownership transferred |
|
314 iRichTextViewer->SetParent( this ); |
|
315 iRichTextViewer->SetLinkObserver( this ); |
|
316 } |
|
317 |
|
318 // --------------------------------------------------------------------------- |
|
319 // CESMRViewerDescriptionField::GetCursorLineVerticalPos() |
|
320 // --------------------------------------------------------------------------- |
|
321 // |
|
322 void CESMRViewerDescriptionField::GetCursorLineVerticalPos( TInt& aUpper, TInt& aLower ) |
|
323 { |
|
324 FUNC_LOG; |
|
325 aLower = iRichTextViewer->CurrentLineNumber() * iRichTextViewer->RowHeight(); |
|
326 aUpper = aLower - iRichTextViewer->RowHeight(); |
|
327 } |
|
328 |
|
329 // --------------------------------------------------------------------------- |
|
330 // CESMRViewerDescriptionField::ListObserverSet |
|
331 // --------------------------------------------------------------------------- |
|
332 // |
|
333 void CESMRViewerDescriptionField::ListObserverSet() |
|
334 { |
|
335 FUNC_LOG; |
|
336 iRichTextViewer->SetListObserver( iObserver ); |
|
337 } |
|
338 |
|
339 // --------------------------------------------------------------------------- |
|
340 // CESMRViewerDescriptionField::ExecuteGenericCommandL() |
|
341 // --------------------------------------------------------------------------- |
|
342 // |
|
343 TBool CESMRViewerDescriptionField::ExecuteGenericCommandL( TInt aCommand ) |
|
344 { |
|
345 FUNC_LOG; |
|
346 TBool isUsed( EFalse ); |
|
347 switch ( aCommand ) |
|
348 { |
|
349 case EESMRCmdClipboardCopy: |
|
350 { |
|
351 iRichTextViewer->CopyCurrentLinkToClipBoardL(); |
|
352 isUsed = ETrue; |
|
353 break; |
|
354 } |
|
355 case EAknSoftkeySelect: |
|
356 { |
|
357 iRichTextViewer->LinkSelectedL(); |
|
358 isUsed = ETrue; |
|
359 break; |
|
360 } |
|
361 default: |
|
362 { |
|
363 break; |
|
364 } |
|
365 } |
|
366 return isUsed; |
|
367 } |
|
368 |
|
369 // --------------------------------------------------------------------------- |
|
370 // CESMRDescriptionField::SetOutlineFocusL |
|
371 // --------------------------------------------------------------------------- |
|
372 // |
|
373 void CESMRViewerDescriptionField::SetOutlineFocusL( TBool aFocus ) |
|
374 { |
|
375 FUNC_LOG; |
|
376 CESMRField::SetOutlineFocusL ( aFocus ); |
|
377 |
|
378 iRichTextViewer->SetFocus( aFocus ); |
|
379 |
|
380 if ( FeaturesL().FeatureSupported( |
|
381 CESMRFeatureSettings::EESMRUIMnFwIntegration ) ) |
|
382 { |
|
383 if ( aFocus ) |
|
384 { |
|
385 SetShowOnMapLinkMiddleSoftKeyL(); |
|
386 } |
|
387 } |
|
388 |
|
389 if ( !aFocus ) |
|
390 { |
|
391 //need to tell action menu that focus has changed |
|
392 iRichTextViewer->ResetActionMenuL(); |
|
393 } |
|
394 } |
|
395 |
|
396 // --------------------------------------------------------------------------- |
|
397 // CESMRDescriptionField::HandleLongtapEventL |
|
398 // --------------------------------------------------------------------------- |
|
399 // |
|
400 void CESMRViewerDescriptionField::HandleLongtapEventL( |
|
401 const TPoint& aPosition ) |
|
402 { |
|
403 FUNC_LOG; |
|
404 |
|
405 if ( iRichTextViewer->Rect().Contains( aPosition ) ) |
|
406 { |
|
407 if( iRichTextViewer->LinkSelectedL() ) |
|
408 { |
|
409 HandleTactileFeedbackL(); |
|
410 } |
|
411 |
|
412 } |
|
413 } |
|
414 |
|
415 // --------------------------------------------------------------------------- |
|
416 // CESMRViewerDescriptionField::AddShowOnMapLinkL |
|
417 // --------------------------------------------------------------------------- |
|
418 // |
|
419 void CESMRViewerDescriptionField::AddShowOnMapLinkL( MESMRCalEntry& aEntry ) |
|
420 { |
|
421 FUNC_LOG; |
|
422 |
|
423 TPtrC urlPointer; |
|
424 TInt position; |
|
425 position = UrlParserL().FindLocationUrl( aEntry.Entry().DescriptionL(), |
|
426 urlPointer ); |
|
427 |
|
428 // Location url is found and need to be replaced with show on map link |
|
429 if ( position >= KErrNone ) |
|
430 { |
|
431 HBufC* showOnMapBuf = |
|
432 StringLoader::LoadLC( R_MEET_REQ_LINK_SHOW_ON_MAP, |
|
433 iCoeEnv ); |
|
434 HBufC* description = |
|
435 HBufC::NewL( aEntry.Entry().DescriptionL().Length() + 1); |
|
436 CleanupStack::PushL( description ); |
|
437 TPtr descriptionPointer( description->Des() ); |
|
438 descriptionPointer.Append( aEntry.Entry().DescriptionL() ); |
|
439 descriptionPointer.Replace( position, |
|
440 urlPointer.Length(), |
|
441 *showOnMapBuf ); |
|
442 CESMRRichTextLink* showOnMapLink = CESMRRichTextLink::NewL( position, |
|
443 showOnMapBuf->Length(), |
|
444 urlPointer, |
|
445 CESMRRichTextLink::ETypeLocationUrl, |
|
446 CESMRRichTextLink::ETriggerKeyOk ); |
|
447 CleanupStack::PushL( showOnMapLink ); |
|
448 iRichTextViewer->SetTextL( description, ETrue ); |
|
449 iRichTextViewer->InsertLinkL( showOnMapLink, 0 ); |
|
450 CleanupStack::Pop( showOnMapLink ); |
|
451 iRichTextViewer->HandleTextChangedL(); |
|
452 CleanupStack::PopAndDestroy( description ); |
|
453 CleanupStack::PopAndDestroy( showOnMapBuf ); |
|
454 |
|
455 StoreGeoValueL( |
|
456 aEntry.Entry(), |
|
457 urlPointer ); |
|
458 } |
|
459 // No location url found. Other description text is added to field. |
|
460 else |
|
461 { |
|
462 TPtrC text = aEntry.Entry().DescriptionL(); |
|
463 iRichTextViewer->SetTextL( &text, ETrue ); |
|
464 } |
|
465 |
|
466 iRichTextViewer->SetMargins( KMargin ); |
|
467 } |
|
468 |
|
469 // --------------------------------------------------------------------------- |
|
470 // CESMRViewerDescriptionField::SetShowOnMapLinkMiddleSoftKeyL |
|
471 // --------------------------------------------------------------------------- |
|
472 // |
|
473 void CESMRViewerDescriptionField::SetShowOnMapLinkMiddleSoftKeyL() |
|
474 { |
|
475 FUNC_LOG; |
|
476 const CESMRRichTextLink* link = iRichTextViewer->GetSelectedLink(); |
|
477 if( link ) |
|
478 { |
|
479 if ( link->Type() == CESMRRichTextLink::ETypeLocationUrl ) |
|
480 { |
|
481 ChangeMiddleSoftKeyL(EESMRCmdShowOnMap, R_QTN_MSK_OPEN ); |
|
482 } |
|
483 else |
|
484 { |
|
485 RestoreMiddleSoftKeyL(); |
|
486 } |
|
487 |
|
488 SetMiddleSoftKeyVisible( ETrue ); |
|
489 } |
|
490 else |
|
491 { |
|
492 RestoreMiddleSoftKeyL(); |
|
493 } |
|
494 } |
|
495 |
|
496 // --------------------------------------------------------------------------- |
|
497 // CESMRViewerDescriptionField::FeaturesL |
|
498 // --------------------------------------------------------------------------- |
|
499 // |
|
500 CESMRFeatureSettings& CESMRViewerDescriptionField::FeaturesL() |
|
501 { |
|
502 FUNC_LOG; |
|
503 if ( !iFeatures ) |
|
504 { |
|
505 iFeatures = CESMRFeatureSettings::NewL(); |
|
506 } |
|
507 |
|
508 return *iFeatures; |
|
509 } |
|
510 |
|
511 // --------------------------------------------------------------------------- |
|
512 // CESMRViewerDescriptionField::LocationPluginL |
|
513 // --------------------------------------------------------------------------- |
|
514 // |
|
515 CESMRLocationPlugin& CESMRViewerDescriptionField::LocationPluginL() |
|
516 { |
|
517 FUNC_LOG; |
|
518 if ( !iLocationPlugin ) |
|
519 { |
|
520 iLocationPlugin = CESMRLocationPlugin::NewL(); |
|
521 } |
|
522 |
|
523 return *iLocationPlugin; |
|
524 } |
|
525 |
|
526 // --------------------------------------------------------------------------- |
|
527 // CESMRViewerDescriptionField::ShowLocationOnMapL |
|
528 // --------------------------------------------------------------------------- |
|
529 // |
|
530 void CESMRViewerDescriptionField::ShowLocationOnMapL( |
|
531 const CESMRRichTextLink& aLink ) |
|
532 { |
|
533 FUNC_LOG; |
|
534 |
|
535 if ( FeaturesL().FeatureSupported( |
|
536 CESMRFeatureSettings::EESMRUIMnFwIntegration ) ) |
|
537 { |
|
538 LocationPluginL().ShowOnMapL( aLink.Value() ); |
|
539 } |
|
540 } |
|
541 |
|
542 // --------------------------------------------------------------------------- |
|
543 // CESMRViewerDescriptionField::StoreGeoValueL |
|
544 // --------------------------------------------------------------------------- |
|
545 // |
|
546 void CESMRViewerDescriptionField::StoreGeoValueL( |
|
547 CCalEntry& aCalEntry, |
|
548 const TDesC& aLocationUrl ) |
|
549 { |
|
550 FUNC_LOG; |
|
551 |
|
552 TReal lat, lon; |
|
553 CCalGeoValue* geoVal = aCalEntry.GeoValueL(); |
|
554 |
|
555 if ( !geoVal || ! geoVal->GetLatLong( lat, lon ) ) |
|
556 { |
|
557 // GEO value not set. Convert URL |
|
558 geoVal = UrlParserL().CreateGeoValueLC( aLocationUrl ); |
|
559 aCalEntry.SetGeoValueL( *geoVal ); |
|
560 CleanupStack::Pop( geoVal ); |
|
561 |
|
562 NotifyEventL( EESMRCmdEnableWaypointIcon ); |
|
563 } |
|
564 } |
|
565 |
|
566 // --------------------------------------------------------------------------- |
|
567 // CESMRViewerDescriptionField::UrlParserL |
|
568 // --------------------------------------------------------------------------- |
|
569 // |
|
570 CESMRUrlParserPlugin& CESMRViewerDescriptionField::UrlParserL() |
|
571 { |
|
572 FUNC_LOG; |
|
573 |
|
574 if ( !iUrlParser ) |
|
575 { |
|
576 iUrlParser = CESMRUrlParserPlugin::NewL(); |
|
577 } |
|
578 |
|
579 return *iUrlParser; |
|
580 } |
|
581 |
|
582 // --------------------------------------------------------------------------- |
|
583 // CESMRViewerDescriptionField::SupportsLongTapFunctionalityL |
|
584 // --------------------------------------------------------------------------- |
|
585 // |
|
586 TBool CESMRViewerDescriptionField::SupportsLongTapFunctionalityL( |
|
587 const TPointerEvent &aPointerEvent ) |
|
588 { |
|
589 FUNC_LOG; |
|
590 TBool ret( EFalse ); |
|
591 |
|
592 if ( iRichTextViewer->Rect().Contains( aPointerEvent.iPosition ) ) |
|
593 { |
|
594 if( iRichTextViewer->PointerEventOccuresOnALinkL( aPointerEvent ) ) |
|
595 { |
|
596 ret = ETrue; |
|
597 } |
|
598 } |
|
599 |
|
600 return ret; |
|
601 } |
|
602 |
|
603 //EOF |
|
604 |