diff -r d09ac5c1e252 -r 0bf1d54f37d9 mobilemessaging/unieditor/application/src/UniEditorSaveOperation.cpp --- a/mobilemessaging/unieditor/application/src/UniEditorSaveOperation.cpp Thu Jan 07 12:45:05 2010 +0200 +++ b/mobilemessaging/unieditor/application/src/UniEditorSaveOperation.cpp Mon Jan 18 20:16:40 2010 +0200 @@ -383,20 +383,23 @@ iEditStore = iDocument.Mtm().Entry().EditStoreL(); if ( iComposeSmil ) { - iDocument.DataModel()->SmilList().RemoveSmilL( *iEditStore ); - if ( iSaveType == ESendingSave ) - { - iDocument.DataModel()->SmilModel().RemoveEmptySlides(); - } + if( !(iSaveType == ESendingSave && iDocument.UniState() == EUniSms) ) + { + iDocument.DataModel()->SmilList().RemoveSmilL( *iEditStore ); + if ( iSaveType == ESendingSave ) + { + iDocument.DataModel()->SmilModel().RemoveEmptySlides(); + } - if ( iDocument.DataModel()->SmilModel().SlideCount() != 0 ) - { - // Model is not empty -> Compose new SMIL - iDom = iDocument.DataModel()->SmilModel().ComposeL(); - iDocument.DataModel()->SmilList().CreateSmilAttachmentL( *this, *iEditStore, iDom ); - SetPending(); - return; - } + if ( iDocument.DataModel()->SmilModel().SlideCount() != 0 ) + { + // Model is not empty -> Compose new SMIL + iDom = iDocument.DataModel()->SmilModel().ComposeL(); + iDocument.DataModel()->SmilList().CreateSmilAttachmentL( *this, *iEditStore, iDom ); + SetPending(); + return; + } + } } iOperationState = EUniEditorSaveFinalize; @@ -657,11 +660,9 @@ TBuf description; description.Zero(); - length = subject.Length(); - CMsgExpandableControl* header = static_cast( iView.ControlById( EMsgComponentIdSubject ) ); - + length = subject.Length(); // Saving as pure text from the editor which may contain emoticons. - HBufC *text = header->Editor().GetTextInHBufL(); + HBufC *text = iHeader.SubjectControl()->Editor().GetTextInHBufL(); CleanupStack::PushL( text ); description.Copy( text->Ptr(), length ); CleanupStack::PopAndDestroy( text );