meetingrequest/mrgui/mrfieldbuilderplugin/src/cesmrviewerlocationfield.cpp
branchRCL_3
changeset 19 b13141f05c3d
parent 17 8592a65ad3fb
child 24 b5fbb9b25d57
--- a/meetingrequest/mrgui/mrfieldbuilderplugin/src/cesmrviewerlocationfield.cpp	Wed Apr 14 15:42:15 2010 +0300
+++ b/meetingrequest/mrgui/mrfieldbuilderplugin/src/cesmrviewerlocationfield.cpp	Tue Apr 27 16:20:14 2010 +0300
@@ -28,9 +28,9 @@
 #include <calentry.h>
 #include <esmrgui.rsg>
 #include <data_caging_path_literals.hrh>
-#include <aknlayout2scalabledef.h>
+#include <AknLayout2ScalableDef.h>
 #include <gulicon.h>
-#include <stringloader.h>
+#include <StringLoader.h>
 
 // LOCAL DEFINITIONS
 
@@ -343,6 +343,8 @@
 //
 void CESMRViewerLocationField::SizeChanged( )
     {
+    // Store iRichTextViewer original width.
+    TInt richTextViewerWidth = iRichTextViewer->Size().iWidth;
     TRect rect( Rect() );
 
     TAknLayoutRect rowLayoutRect(
@@ -401,6 +403,20 @@
     		// Try applying changes
     		iRichTextViewer->ApplyLayoutChangesL();
 				);
+
+    if ( iRichTextViewer->Size().iWidth != richTextViewerWidth )
+        {
+        // Most of this case is screen orientation, in this case we need to 
+        // Record the index of focusing link, after updating link array, then 
+        // reset the focusing to original one.
+        TInt focusingIndex = iRichTextViewer->GetFocusLink();
+        if ( KErrNotFound != focusingIndex )
+            {
+            iRichTextViewer->SetFocusLink( focusingIndex );
+            //wake up current contact menu selection by calling this
+            iRichTextViewer->FocusChanged(ENoDrawNow);
+            }
+        }  
     }
 
 // ---------------------------------------------------------------------------