mobilemessaging/unieditor/model/src/UniTextObject.cpp
branchRCL_3
changeset 15 52d61119153d
parent 0 72b543305e3a
equal deleted inserted replaced
14:c6838af47512 15:52d61119153d
   368 //
   368 //
   369 void CUniTextObject::CreateFileName( TFileName& aFileName )
   369 void CUniTextObject::CreateFileName( TFileName& aFileName )
   370     {
   370     {
   371     if ( iTextEditor && iTextEditor->Text()->DocumentLength() )
   371     if ( iTextEditor && iTextEditor->Text()->DocumentLength() )
   372         {
   372         {
   373     	TPtrC ptr = iTextEditor->Text()->Read( 0, KMaxFilenameLenghtForAttachment );        
   373     	HBufC *ptr = iTextEditor->GetTextInHBufL();
       
   374         CleanupStack::PushL( ptr );
   374         MsgAttachmentUtils::GetFileNameFromBuffer( 
   375         MsgAttachmentUtils::GetFileNameFromBuffer( 
   375             aFileName, 
   376             aFileName, 
   376             ptr, 
   377             *ptr, 
   377             KMaxFilenameLenghtForAttachment, 
   378             KMaxFilenameLenghtForAttachment, 
   378             &KExtTextPlain_16 );
   379             &KExtTextPlain_16 );
       
   380         CleanupStack::PopAndDestroy( ptr );
       
   381         
   379         }
   382         }
   380     if ( aFileName.Length() == 0 ||
   383     if ( aFileName.Length() == 0 ||
   381         !iFs.IsValidName( aFileName ) )
   384         !iFs.IsValidName( aFileName ) )
   382         {
   385         {
   383         // No filename -> Use default
   386         // No filename -> Use default