meetingrequest/mrgui/mrfieldbuildercommon/src/cesmrrichtextlink.cpp
branchRCL_3
changeset 12 4ce476e64c59
parent 0 8466d47a6819
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
     1 /*
     1 /*
     2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    14 * Description:  Container class for CESMRRichTextViewer links
    14 * Description:  Container class for CESMRRichTextViewer links
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
       
    19 #include "cesmrrichtextlink.h"
       
    20 #include "esmrcommands.h"
    19 #include "emailtrace.h"
    21 #include "emailtrace.h"
    20 #include "cesmrrichtextlink.h"
    22 
       
    23 #include <avkon.hrh>
       
    24 #include <avkon.rsg>
       
    25 #include <esmrgui.rsg>
    21 
    26 
    22 // ======== MEMBER FUNCTIONS ========
    27 // ======== MEMBER FUNCTIONS ========
    23 
    28 
    24 // ---------------------------------------------------------------------------
    29 // ---------------------------------------------------------------------------
    25 // CESMRRichTextLink::NewL
    30 // CESMRRichTextLink::NewL
   110     FUNC_LOG;
   115     FUNC_LOG;
   111     iStartPos = aPos;
   116     iStartPos = aPos;
   112     }
   117     }
   113 
   118 
   114 // ---------------------------------------------------------------------------
   119 // ---------------------------------------------------------------------------
       
   120 // CESMRRichTextLink::MSKCommand
       
   121 // ---------------------------------------------------------------------------
       
   122 //
       
   123 TInt CESMRRichTextLink::MSKCommand() const
       
   124     {
       
   125     TInt command = EAknSoftkeySelect;
       
   126     switch ( iType )
       
   127         {
       
   128         case ETypeEmail:
       
   129         case ETypePhoneNumber:
       
   130         case ETypeURL:
       
   131         case ETypeAttachment:
       
   132             {
       
   133             command = EAknSoftkeyContextOptions;
       
   134             break;
       
   135             }
       
   136         case ETypeShowAll:
       
   137             {
       
   138             command = EESMRCmdShowAllAttendees;
       
   139             break;
       
   140             }
       
   141         case ETypeLocationUrl:
       
   142             {
       
   143             command = EESMRCmdShowOnMap;
       
   144             break;
       
   145             }
       
   146         default:
       
   147             {
       
   148             break;
       
   149             }
       
   150         }
       
   151     
       
   152     return command;
       
   153     }
       
   154 
       
   155 // ---------------------------------------------------------------------------
       
   156 // CESMRRichTextLink::MSKText
       
   157 // ---------------------------------------------------------------------------
       
   158 //
       
   159 TInt CESMRRichTextLink::MSKText() const
       
   160     {
       
   161     TInt resource = R_QTN_MSK_SELECT;
       
   162     switch ( iType )
       
   163         {
       
   164         case ETypeEmail:
       
   165         case ETypePhoneNumber:
       
   166         case ETypeURL:
       
   167         case ETypeAttachment:
       
   168         case ETypeLocationUrl:
       
   169             {
       
   170             resource = R_QTN_MSK_OPEN;
       
   171             break;
       
   172             }
       
   173         case ETypeShowAll:
       
   174             {
       
   175             resource = R_QTN_MEET_REQ_SHOW_ALL;
       
   176             break;
       
   177             }
       
   178         default:
       
   179             {
       
   180             break;
       
   181             }
       
   182         }
       
   183     
       
   184     return resource;
       
   185 }
       
   186 
       
   187 // ---------------------------------------------------------------------------
   115 // CESMRRichTextLink::CESMRRichTextLink
   188 // CESMRRichTextLink::CESMRRichTextLink
   116 // ---------------------------------------------------------------------------
   189 // ---------------------------------------------------------------------------
   117 //
   190 //
   118 CESMRRichTextLink::CESMRRichTextLink(
   191 CESMRRichTextLink::CESMRRichTextLink(
   119 		TInt aStartPos, 
   192 		TInt aStartPos,