calendarui/views/src/caleneventviewcontainer.cpp
branchRCL_3
changeset 31 97232defd20e
parent 30 bd7edf625bdd
equal deleted inserted replaced
30:bd7edf625bdd 31:97232defd20e
    68 #include <calenservices.h>
    68 #include <calenservices.h>
    69 #include <calentoolbar.h>
    69 #include <calentoolbar.h>
    70 #include <calcalendarinfo.h>
    70 #include <calcalendarinfo.h>
    71 #include <DocumentHandler.h>
    71 #include <DocumentHandler.h>
    72 
    72 
       
    73 #include <bldvariant.hrh> // for feature definitions
       
    74 
    73 // user includes
    75 // user includes
    74 #include "caleneventviewcontainer.h"
    76 #include "caleneventviewcontainer.h"
    75 #include "caleneventview.h"
    77 #include "caleneventview.h"
    76 #include "calennativeview.h"
    78 #include "calennativeview.h"
    77 #include "calendarui_debug.h"
    79 #include "calendarui_debug.h"
   158     delete iCenRepSession;	
   160     delete iCenRepSession;	
   159     
   161     
   160     //Reset the attachment posiitons array
   162     //Reset the attachment posiitons array
   161     iAttachmentPosInfoArray.Reset();
   163     iAttachmentPosInfoArray.Reset();
   162     
   164     
       
   165     // Do not call UnInitializeLib() if InitalizeLib() leaves.
       
   166     if ( iFeatMgrInitialized )
       
   167         {
       
   168         // Frees the TLS. Must be done after FeatureManager is used.
       
   169         FeatureManager::UnInitializeLib();  
       
   170         }  
       
   171     
   163 	TRACE_EXIT_POINT;
   172 	TRACE_EXIT_POINT;
   164 	}
   173 	}
   165 
   174 
   166 // ----------------------------------------------------------------------------
   175 // ----------------------------------------------------------------------------
   167 // CCalenEventViewContainer::ConstructImplL
   176 // CCalenEventViewContainer::ConstructImplL
   197     iTextEditor->SetRect( Rect() );
   206     iTextEditor->SetRect( Rect() );
   198 	
   207 	
   199         
   208         
   200     iDocHandler->SetExitObserver( this );
   209     iDocHandler->SetExitObserver( this );
   201     iTextEditor->EnableKineticScrollingL(ETrue);
   210     iTextEditor->EnableKineticScrollingL(ETrue);
       
   211 
       
   212     // Sets up TLS, must be done before FeatureManager is used.
       
   213     FeatureManager::InitializeLibL();
       
   214     // Used in destructor. 
       
   215     iFeatMgrInitialized = ETrue;
       
   216      
   202 	TRACE_EXIT_POINT;
   217 	TRACE_EXIT_POINT;
   203 	}
   218 	}
   204 
   219 
   205 // ----------------------------------------------------------------------------
   220 // ----------------------------------------------------------------------------
   206 // CCalenEventViewContainer::UpdateSize
   221 // CCalenEventViewContainer::UpdateSize
   810             break;
   825             break;
   811 
   826 
   812         case CCalEntry::EAnniv:
   827         case CCalEntry::EAnniv:
   813             {
   828             {
   814             // date field
   829             // date field
   815             AddDateFieldL(iEventViewData->StartDateTime());
   830             if ( FeatureManager::FeatureSupported( KFeatureIdKorean ) )
       
   831                 {
       
   832                 AddDateFieldL( iServices.Infobar() );
       
   833                 }
       
   834             else
       
   835                 {
       
   836                 AddDateFieldL( iEventViewData->StartDateTime() );
       
   837                 }
   816             
   838             
   817             // against the location field in the viewer
   839             // against the location field in the viewer
   818             iTimeFieldLines = 1;
   840             iTimeFieldLines = 1;
   819             // location
   841             // location
   820             AddLocationFieldL();
   842             AddLocationFieldL();
  1530     CleanupStack::PopAndDestroy(textHeading);
  1552     CleanupStack::PopAndDestroy(textHeading);
  1531     AddDateFieldL(aDate);
  1553     AddDateFieldL(aDate);
  1532 
  1554 
  1533     TRACE_EXIT_POINT;
  1555     TRACE_EXIT_POINT;
  1534     }
  1556     }
       
  1557 
       
  1558 // -----------------------------------------------------------------------------
       
  1559 // CCalenEventViewContainer::AddDateFieldL
       
  1560 // Add a date field to the form.
       
  1561 // (other items were commented in a header).
       
  1562 // -----------------------------------------------------------------------------
       
  1563 //
       
  1564 void CCalenEventViewContainer::AddDateFieldL( const TDesC& aDate )
       
  1565     {
       
  1566     TRACE_ENTRY_POINT;
       
  1567 	if (FeatureManager::FeatureSupported( KFeatureIdKorean )) 
       
  1568 		{
       
  1569 		TBuf<KMaxDateLength> formattedDate;
       
  1570     	if ( aDate.Length() < KMaxDateLength && aDate.Length() > 0 )
       
  1571     		{
       
  1572     		formattedDate.Copy( aDate );
       
  1573     		}
       
  1574     	AknTextUtils::DisplayTextLanguageSpecificNumberConversion( formattedDate );
       
  1575     	SetFormatAndAddBodyL( formattedDate );
       
  1576 		}
       
  1577     TRACE_EXIT_POINT;
       
  1578     }
       
  1579 
  1535 // -----------------------------------------------------------------------------
  1580 // -----------------------------------------------------------------------------
  1536 // CCalenEventViewContainer::AddDateFieldL
  1581 // CCalenEventViewContainer::AddDateFieldL
  1537 // Add a field to the form in the format "DATE - DATE".
  1582 // Add a field to the form in the format "DATE - DATE".
  1538 // (other items were commented in a header).
  1583 // (other items were commented in a header).
  1539 // -----------------------------------------------------------------------------
  1584 // -----------------------------------------------------------------------------