132 void CUniEditorSendUiOperation::ConstructL() |
132 void CUniEditorSendUiOperation::ConstructL() |
133 { |
133 { |
134 BaseConstructL(); |
134 BaseConstructL(); |
135 |
135 |
136 iDeleteAllLimit = ( iDocument.MaxMessageSize() * KSendAsDeleteAllPercentage ) / 100; |
136 iDeleteAllLimit = ( iDocument.MaxMessageSize() * KSendAsDeleteAllPercentage ) / 100; |
|
137 iOptimizedFlow = EFalse; |
137 } |
138 } |
138 |
139 |
139 // --------------------------------------------------------- |
140 // --------------------------------------------------------- |
140 // CUniEditorSendUiOperation::DoCancelCleanup |
141 // CUniEditorSendUiOperation::DoCancelCleanup |
141 // |
142 // |
220 // Check message content when message created by SendAs |
221 // Check message content when message created by SendAs |
221 // --------------------------------------------------------- |
222 // --------------------------------------------------------- |
222 // |
223 // |
223 void CUniEditorSendUiOperation::DoSendUiCheckL() |
224 void CUniEditorSendUiOperation::DoSendUiCheckL() |
224 { |
225 { |
|
226 // check is it, one embedded object with jpeg image |
|
227 // captured from camera\ seleted from photo\ filemanager |
|
228 TInt objectCount =iDocument.DataModel()->ObjectList().Count() ; |
|
229 TInt slideCount =iDocument.DataModel()->SmilModel().SlideCount() ; |
|
230 if ( (objectCount == 1)&&(slideCount == 1)&& |
|
231 (iDocument.DataModel()->AttachmentList().Count()== 0)) |
|
232 { |
|
233 CUniObject* obj = |
|
234 iDocument.DataModel()->SmilModel().GetObjectByIndex( slideCount-1, objectCount-1 ); |
|
235 if(obj->MediaInfo()->MimeType().CompareF( KMsgMimeImageJpeg )== 0) |
|
236 { |
|
237 iOptimizedFlow = ETrue; |
|
238 } |
|
239 } |
|
240 |
225 if ( iDocument.DataModel()->ObjectList().Count() || |
241 if ( iDocument.DataModel()->ObjectList().Count() || |
226 iDocument.DataModel()->AttachmentList().Count() ) |
242 iDocument.DataModel()->AttachmentList().Count() ) |
227 { |
243 { |
228 DoCheckFilesL(); |
244 DoCheckFilesL(); |
229 } |
245 } |
459 if ( !iImageOperation ) |
475 if ( !iImageOperation ) |
460 { |
476 { |
461 iImageOperation = CUniEditorProcessImageOperation::NewL( *this, iDocument, iFs ); |
477 iImageOperation = CUniEditorProcessImageOperation::NewL( *this, iDocument, iFs ); |
462 } |
478 } |
463 |
479 |
|
480 iImageOperation->SetOptimizedFlow(iOptimizedFlow); |
464 // Processes if needed: |
481 // Processes if needed: |
465 iImageOperation->Process( static_cast<CMsgImageInfo*>( aObject->MediaInfo() ), |
482 iImageOperation->Process( static_cast<CMsgImageInfo*>( aObject->MediaInfo() ), |
466 aObject->AttachmentId(), |
483 aObject->AttachmentId(), |
467 iPreviousSize ); |
484 iPreviousSize ); |
468 iPreparedObject = aObject; |
485 iPreparedObject = aObject; |
562 // --------------------------------------------------------- |
579 // --------------------------------------------------------- |
563 // CUniEditorSendUiOperation::HandleOperationEvent |
580 // CUniEditorSendUiOperation::HandleOperationEvent |
564 // --------------------------------------------------------- |
581 // --------------------------------------------------------- |
565 // |
582 // |
566 void CUniEditorSendUiOperation::HandleOperationEvent( TUniEditorOperationType aOperation, |
583 void CUniEditorSendUiOperation::HandleOperationEvent( TUniEditorOperationType aOperation, |
567 TUniEditorOperationEvent /*aEvent*/ ) |
584 TUniEditorOperationEvent aEvent ) |
568 { |
585 { |
569 TBool remove( EFalse ); |
586 TBool remove( EFalse ); |
570 |
587 |
571 TMsvAttachmentId attaId( KMsvNullIndexEntryId ); |
588 TMsvAttachmentId attaId( KMsvNullIndexEntryId ); |
572 CMsgMediaInfo* info = NULL; |
589 CMsgMediaInfo* info = NULL; |
573 |
590 |
574 if ( aOperation == EUniEditorOperationProcessImage ) |
591 if ( aOperation == EUniEditorOperationProcessImage ) |
575 { |
592 { |
|
593 if( aEvent == EUniEditorOperationPartialComplete) |
|
594 { |
|
595 if(iOptimizedFlow) |
|
596 { |
|
597 iObserver.EditorOperationEvent( EUniEditorOperationSendUi, |
|
598 EUniEditorOperationPartialComplete ); |
|
599 iOptimizedFlow = EFalse; |
|
600 } |
|
601 return; |
|
602 } |
|
603 iOptimizedFlow = EFalse; |
576 // Process image error handling |
604 // Process image error handling |
577 CArrayFixFlat<TInt>* errors = iImageOperation->GetErrors(); |
605 CArrayFixFlat<TInt>* errors = iImageOperation->GetErrors(); |
578 for ( TInt i = 0; i < errors->Count(); i++ ) |
606 for ( TInt i = 0; i < errors->Count(); i++ ) |
579 { |
607 { |
580 if ( errors->At( i ) == EUniProcessImgUserAbort ) |
608 if ( errors->At( i ) == EUniProcessImgUserAbort ) |