harvesterplugins/notes/src/notesplugin.cpp
changeset 20 68cdadcf169e
parent 17 7d8c8d8f5eab
--- a/harvesterplugins/notes/src/notesplugin.cpp	Wed Aug 18 09:49:49 2010 +0300
+++ b/harvesterplugins/notes/src/notesplugin.cpp	Thu Sep 02 20:27:46 2010 +0300
@@ -360,15 +360,17 @@
 
 		//For notes, no content is expected in excerpt for now.
 		//See appclass-hierarchy.txt for details.
-#ifdef USE_HIGHLIGHTER		
-    	TInt excerptLength = entry->DescriptionL().Length() + 1 + dateString.Length();
-		HBufC* excerpt = HBufC::NewLC(excerptLength);
-		TPtr excerptDes = excerpt->Des();		
-		excerptDes.Append(entry->DescriptionL());
-		excerptDes.Append(KExcerptDelimiter);
-		excerptDes.Append(dateString);
-      index_item->AddExcerptL(*excerpt);
-      CleanupStack::PopAndDestroy(excerpt);
+#ifdef USE_HIGHLIGHTER
+		_LIT(KExcerptTimeFormat,"%04d/%02d/%02d %02d:%02d");
+		index_item->AddHLDisplayFieldL(entry->DescriptionL());
+		
+		dateString.Format( KExcerptTimeFormat, datetime.Year(),
+		                                     TInt(datetime.Month()+ 1),
+		                                     datetime.Day() + 1,
+		                                     datetime.Hour(),
+		                                     datetime.Minute());
+        index_item->AddExcerptL(dateString);
+    
 #endif      
 		
 		// Send for indexing