--- a/calendarui/editors/src/CalenDefaultEditors.cpp Wed Sep 01 12:32:31 2010 +0100
+++ b/calendarui/editors/src/CalenDefaultEditors.cpp Tue Sep 14 21:17:03 2010 +0300
@@ -21,6 +21,7 @@
#include "calennotedatautil.h"
#include "calenentryutil.h"
#include "calenunifiededitor.h"
+#include "calenentryutil.h"
// system includes
#include <CalenDefaultEditorsData.rsg>
@@ -41,6 +42,8 @@
#include <calencontext.h>
#include <caleninstanceid.h>
#include "CleanupResetAndDestroy.h"
+#include <bldvariant.hrh> // for feature definitions
+#include <featmgr.h>
// debug
#include "calendarui_debug.h"
@@ -95,6 +98,14 @@
TRACE_ENTRY_POINT;
iResourceLoader.Close();
+ // Do not call UnInitializeLib() if InitalizeLib() leaves.
+ if ( iFeatMgrInitialized )
+ {
+ // Frees the TLS. Must be done after FeatureManager is used.
+ FeatureManager::UnInitializeLib();
+ }
+
+
TRACE_EXIT_POINT;
}
@@ -127,6 +138,13 @@
BaflUtils::NearestLanguageFile( CCoeEnv::Static()->FsSession(), resource );
TInt err = iResourceLoader.Open( resource );
__ASSERT_ALWAYS( err == KErrNone, Panic( EPanicCalenDefaultEditorsResourceLoading ) );
+
+ // Sets up TLS, must be done before FeatureManager is used.
+ FeatureManager::InitializeLibL();
+ // Used in destructor.
+ iFeatMgrInitialized = ETrue;
+
+
TRACE_EXIT_POINT;
}
@@ -282,8 +300,19 @@
// For repeat type, EThisAndAll start Date/Time is first instance Date/Time.
TAgnEntryUiInParams inParamsCopy( aInParams );
if( aRepeatType == CalCommon::EThisAndAll )
- {
- inParamsCopy.iInstanceDate.SetTimeLocalL( aEntry.StartTimeL().TimeLocalL() );
+ {
+ // remove for lunar entries
+ if ( FeatureManager::FeatureSupported( KFeatureIdKorean ) )
+ {
+ if ( !(aEntry.EntryTypeL() == CCalEntry::EAnniv && aEntry.UserInt32L() != ESolar) )
+ {
+ inParamsCopy.iInstanceDate.SetTimeLocalL( aEntry.StartTimeL().TimeLocalL() );
+ }
+ }
+ else // normal case
+ {
+ inParamsCopy.iInstanceDate.SetTimeLocalL( aEntry.StartTimeL().TimeLocalL() );
+ }
}
switch ( aEntry.EntryTypeL() )