95 CPIXLOGSTRING("CCPIXMediaVideoDoc::GetCpixDocumentL()"); |
95 CPIXLOGSTRING("CCPIXMediaVideoDoc::GetCpixDocumentL()"); |
96 CSearchDocument* index_item = CCPIXDocFetcher::GetCpixDocumentL(aObject,aAppClass,aObjectDef); |
96 CSearchDocument* index_item = CCPIXDocFetcher::GetCpixDocumentL(aObject,aAppClass,aObjectDef); |
97 ResetExcerpt(); //Reset excerpt initially |
97 ResetExcerpt(); //Reset excerpt initially |
98 TInt slashpos = GetUri().LocateReverse('\\'); |
98 TInt slashpos = GetUri().LocateReverse('\\'); |
99 TPtrC name = GetUri().Mid( (slashpos+1) ); |
99 TPtrC name = GetUri().Mid( (slashpos+1) ); |
100 AddToFieldExcerptL(name); //Add name to excerpt field |
100 |
|
101 CMdEProperty* property(NULL); |
|
102 //Add Name field to document excerpt, ONLY if title field is not empty. |
|
103 CMdEPropertyDef& titlePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KTitleProperty ); |
|
104 if(aObject.Property( titlePropDef, property ) != KErrNotFound) |
|
105 { |
|
106 CMdETextProperty* textProperty = ( CMdETextProperty* ) property; |
|
107 if( textProperty->Value().Compare(KNullDesC) > 0 )AddToFieldExcerptL(name); //Add name to excerpt field |
|
108 } |
|
109 |
101 //URI and Excerpt is done add additional properties here |
110 //URI and Excerpt is done add additional properties here |
102 CMdEProperty* property(NULL); |
|
103 CMdEPropertyDef& descriptionPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KDescriptionProperty ); |
111 CMdEPropertyDef& descriptionPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KDescriptionProperty ); |
104 if(aObject.Property( descriptionPropDef, property ) != KErrNotFound) |
112 if(aObject.Property( descriptionPropDef, property ) != KErrNotFound) |
105 { |
113 { |
106 //Add field to document |
114 //Add field to document |
107 CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); |
115 CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); |