meetingrequest/mrgui/mrfieldbuilderplugin/src/cesmrviewerlocationfield.cpp
branchRCL_3
changeset 14 b13141f05c3d
parent 13 8592a65ad3fb
child 16 b5fbb9b25d57
equal deleted inserted replaced
13:8592a65ad3fb 14:b13141f05c3d
    26 #include "cmrbutton.h"
    26 #include "cmrbutton.h"
    27 
    27 
    28 #include <calentry.h>
    28 #include <calentry.h>
    29 #include <esmrgui.rsg>
    29 #include <esmrgui.rsg>
    30 #include <data_caging_path_literals.hrh>
    30 #include <data_caging_path_literals.hrh>
    31 #include <aknlayout2scalabledef.h>
    31 #include <AknLayout2ScalableDef.h>
    32 #include <gulicon.h>
    32 #include <gulicon.h>
    33 #include <stringloader.h>
    33 #include <StringLoader.h>
    34 
    34 
    35 // LOCAL DEFINITIONS
    35 // LOCAL DEFINITIONS
    36 
    36 
    37 // ======== MEMBER FUNCTIONS ========
    37 // ======== MEMBER FUNCTIONS ========
    38 
    38 
   341 // CESMRViewerLocationField::SizeChanged
   341 // CESMRViewerLocationField::SizeChanged
   342 // ---------------------------------------------------------------------------
   342 // ---------------------------------------------------------------------------
   343 //
   343 //
   344 void CESMRViewerLocationField::SizeChanged( )
   344 void CESMRViewerLocationField::SizeChanged( )
   345     {
   345     {
       
   346     // Store iRichTextViewer original width.
       
   347     TInt richTextViewerWidth = iRichTextViewer->Size().iWidth;
   346     TRect rect( Rect() );
   348     TRect rect( Rect() );
   347 
   349 
   348     TAknLayoutRect rowLayoutRect(
   350     TAknLayoutRect rowLayoutRect(
   349             NMRLayoutManager::GetFieldRowLayoutRect( rect, 1 ) );
   351             NMRLayoutManager::GetFieldRowLayoutRect( rect, 1 ) );
   350     TRect rowRect( rowLayoutRect.Rect() );
   352     TRect rowRect( rowLayoutRect.Rect() );
   399     		// Try setting font
   401     		// Try setting font
   400     		iRichTextViewer->SetFontL( viewerLayoutText.Font() );
   402     		iRichTextViewer->SetFontL( viewerLayoutText.Font() );
   401     		// Try applying changes
   403     		// Try applying changes
   402     		iRichTextViewer->ApplyLayoutChangesL();
   404     		iRichTextViewer->ApplyLayoutChangesL();
   403 				);
   405 				);
       
   406 
       
   407     if ( iRichTextViewer->Size().iWidth != richTextViewerWidth )
       
   408         {
       
   409         // Most of this case is screen orientation, in this case we need to 
       
   410         // Record the index of focusing link, after updating link array, then 
       
   411         // reset the focusing to original one.
       
   412         TInt focusingIndex = iRichTextViewer->GetFocusLink();
       
   413         if ( KErrNotFound != focusingIndex )
       
   414             {
       
   415             iRichTextViewer->SetFocusLink( focusingIndex );
       
   416             //wake up current contact menu selection by calling this
       
   417             iRichTextViewer->FocusChanged(ENoDrawNow);
       
   418             }
       
   419         }  
   404     }
   420     }
   405 
   421 
   406 // ---------------------------------------------------------------------------
   422 // ---------------------------------------------------------------------------
   407 // CESMRViewerLocationField::SetContainerWindowL
   423 // CESMRViewerLocationField::SetContainerWindowL
   408 // ---------------------------------------------------------------------------
   424 // ---------------------------------------------------------------------------