264 iDisplaySize( -1 ), |
264 iDisplaySize( -1 ), |
265 iWaitResId( -1 ), |
265 iWaitResId( -1 ), |
266 iOriginalSlide( -1 ), |
266 iOriginalSlide( -1 ), |
267 iNextFocus( EMsgComponentIdNull ), |
267 iNextFocus( EMsgComponentIdNull ), |
268 iEditorFlags( EShowInfoPopups ), |
268 iEditorFlags( EShowInfoPopups ), |
269 iMskResId( R_UNIEDITOR_OPTIONS_CLOSE ) |
269 iMskResId( R_UNIEDITOR_OPTIONS_CLOSE ), |
|
270 iOptimizedFlow(EFalse), |
|
271 iSingleJpegImageProcessing(EFalse) |
270 { |
272 { |
271 } |
273 } |
272 |
274 |
273 // --------------------------------------------------------- |
275 // --------------------------------------------------------- |
274 // CUniEditorAppUi::ConstructL |
276 // CUniEditorAppUi::ConstructL |
459 // |
461 // |
460 CUniEditorAppUi::~CUniEditorAppUi() |
462 CUniEditorAppUi::~CUniEditorAppUi() |
461 { |
463 { |
462 iEditorFlags |= EEditorExiting; |
464 iEditorFlags |= EEditorExiting; |
463 |
465 |
|
466 //sendui+jepg optimization changes |
|
467 if(iLaunchOperation) |
|
468 { |
|
469 // check Is iLaunchOperation still attached to |
|
470 // iSlideLoader / iHeader |
|
471 // Set the CUniEditorAppUi |
|
472 // instance to NULL, to avoid crash. |
|
473 if(iLaunchOperation->GetHeader()) |
|
474 { |
|
475 iHeader = NULL; |
|
476 } |
|
477 if(iLaunchOperation->GetSlideLoader()) |
|
478 { |
|
479 iSlideLoader = NULL; |
|
480 } |
|
481 } |
464 if ( iView ) |
482 if ( iView ) |
465 { |
483 { |
466 // To prevent focus changes caused by input blocker deletion & toolbar extension |
484 // To prevent focus changes caused by input blocker deletion & toolbar extension |
467 // closing. |
485 // closing. |
468 iEikonEnv->EikAppUi()->RemoveFromStack( iView ); |
486 iEikonEnv->EikAppUi()->RemoveFromStack( iView ); |
663 // Performs all the last actions before editor launch ends. |
681 // Performs all the last actions before editor launch ends. |
664 // --------------------------------------------------------- |
682 // --------------------------------------------------------- |
665 // |
683 // |
666 void CUniEditorAppUi::FinalizeLaunchL() |
684 void CUniEditorAppUi::FinalizeLaunchL() |
667 { |
685 { |
|
686 // In all normal cases other then Sendui+Jepeg |
|
687 // iOptimizedFlow will be false and flow should be |
|
688 // same as the normal launch |
|
689 if(iOptimizedFlow) |
|
690 { |
|
691 //if iOptimizedFlow is True, it means |
|
692 //sendui+Jepg and this is partial complete call |
|
693 iSingleJpegImageProcessing = ETrue; |
|
694 } |
|
695 |
668 iFinalizeLaunchL = ETrue; |
696 iFinalizeLaunchL = ETrue; |
669 iSmilModel = &Document()->DataModel()->SmilModel(); |
697 iSmilModel = &Document()->DataModel()->SmilModel(); |
670 iHeader = iLaunchOperation->DetachHeader(); |
698 |
671 iSlideLoader = iLaunchOperation->DetachSlideLoader(); |
699 if(!iOptimizedFlow) |
|
700 { |
|
701 //detach the iHeader and iSlideLoader |
|
702 iHeader = iLaunchOperation->DetachHeader(); |
|
703 iSlideLoader = iLaunchOperation->DetachSlideLoader(); |
|
704 } |
|
705 else |
|
706 { |
|
707 // get reference to complete partial lauch operation |
|
708 iHeader = iLaunchOperation->GetHeader(); |
|
709 iSlideLoader = iLaunchOperation->GetSlideLoader(); |
|
710 } |
672 |
711 |
673 SetMessageTypeLockingL(); |
712 SetMessageTypeLockingL(); |
674 |
713 |
675 TInt headersVariation = iHeader->AddHeadersVariation(); |
714 TInt headersVariation = iHeader->AddHeadersVariation(); |
676 |
715 |
772 |
811 |
773 // Enable task swapper to options menu after launch has been completed. |
812 // Enable task swapper to options menu after launch has been completed. |
774 MenuBar()->SetMenuType( CEikMenuBar::EMenuOptions ); |
813 MenuBar()->SetMenuType( CEikMenuBar::EMenuOptions ); |
775 |
814 |
776 UpdateToolbarL(); |
815 UpdateToolbarL(); |
777 |
816 |
778 iEditorFlags |= ELaunchSuccessful; |
817 // partial launch need to call execute to make |
779 |
818 //the editor visible |
780 iView->ExecuteL( ClientRect(), focusedControlId ); |
819 if(iOptimizedFlow) |
|
820 { |
|
821 iView->ExecuteL( ClientRect(), focusedControlId ); |
|
822 } |
|
823 else// not optmized Flow, common flow |
|
824 { |
|
825 // partial launch, dont set the flag |
|
826 iEditorFlags |= ELaunchSuccessful; |
|
827 |
|
828 // in case of sendui+jepg , again finalize launch will be called |
|
829 //after image processing, no need to call iView->ExecuteL |
|
830 // slide will be loaded already by slide loader. |
|
831 if(!iSingleJpegImageProcessing) |
|
832 { |
|
833 //normal flow |
|
834 iView->ExecuteL( ClientRect(), focusedControlId ); |
|
835 } |
|
836 |
|
837 //after the lauch complete for sendui+jepg |
|
838 //rest it. |
|
839 iSingleJpegImageProcessing = EFalse; |
|
840 } |
|
841 |
781 delete iScreenClearer; |
842 delete iScreenClearer; |
782 iScreenClearer = NULL; |
843 iScreenClearer = NULL; |
|
844 |
|
845 // show note inserting |
|
846 if(iOptimizedFlow) |
|
847 { |
|
848 ShowWaitNoteL( R_QTN_UNI_WAIT_INSERTING ); |
|
849 } |
|
850 |
783 |
851 |
784 } |
852 } |
785 |
853 |
786 // --------------------------------------------------------- |
854 // --------------------------------------------------------- |
787 // CUniEditorAppUi::ShowLaunchNotesL |
855 // CUniEditorAppUi::ShowLaunchNotesL |
6417 TUniEditorOperationEvent aEvent ) |
6485 TUniEditorOperationEvent aEvent ) |
6418 { |
6486 { |
6419 if ( iEditorFlags & EEditorExiting ) |
6487 if ( iEditorFlags & EEditorExiting ) |
6420 { |
6488 { |
6421 // Do not handle any event if we are exiting from editor. |
6489 // Do not handle any event if we are exiting from editor. |
|
6490 // rest values. |
|
6491 iOptimizedFlow = EFalse; |
|
6492 iSingleJpegImageProcessing = EFalse; |
6422 return; |
6493 return; |
6423 } |
6494 } |
6424 |
6495 |
6425 if ( aEvent == EUniEditorOperationComplete || |
6496 if ( aEvent == EUniEditorOperationComplete || |
6426 aEvent == EUniEditorOperationError || |
6497 aEvent == EUniEditorOperationError || |
6427 aEvent == EUniEditorOperationCancel ) |
6498 aEvent == EUniEditorOperationCancel ) |
6428 { |
6499 { |
6429 DeactivateInputBlocker(); |
6500 // set iOptimizedFlow |
6430 iEditorFlags &= ~EMsgEditInProgress; |
6501 if( aOperation == EUniEditorOperationLaunch) |
6431 |
6502 { |
|
6503 if(iLaunchOperation) |
|
6504 { |
|
6505 iOptimizedFlow = iLaunchOperation->IsOptimizedFlagSet(); |
|
6506 } |
|
6507 } |
|
6508 // sendui+jepg-> this required after image processing |
|
6509 if(!iOptimizedFlow) |
|
6510 { |
|
6511 DeactivateInputBlocker(); |
|
6512 iEditorFlags &= ~EMsgEditInProgress; |
|
6513 } |
6432 if ( aEvent == EUniEditorOperationCancel && |
6514 if ( aEvent == EUniEditorOperationCancel && |
6433 aOperation != EUniEditorOperationSend ) |
6515 aOperation != EUniEditorOperationSend ) |
6434 { |
6516 { |
6435 // Operation by operation should be considered what is proper action |
6517 // Operation by operation should be considered what is proper action |
6436 // in Cancel situation. Send operation handles the removing of wait note |
6518 // in Cancel situation. Send operation handles the removing of wait note |
6445 } |
6527 } |
6446 |
6528 |
6447 TRAPD( error, DoEditorOperationEventL( aOperation, aEvent ) ); |
6529 TRAPD( error, DoEditorOperationEventL( aOperation, aEvent ) ); |
6448 if ( error != KErrNone ) |
6530 if ( error != KErrNone ) |
6449 { |
6531 { |
|
6532 // error handling |
|
6533 if(iOptimizedFlow) |
|
6534 { |
|
6535 DeactivateInputBlocker(); |
|
6536 iEditorFlags &= ~EMsgEditInProgress; |
|
6537 } |
|
6538 iOptimizedFlow = EFalse; |
|
6539 iSingleJpegImageProcessing = EFalse; |
|
6540 |
6450 // Handle operation handling error. |
6541 // Handle operation handling error. |
6451 if ( error == KLeaveExit ) |
6542 if ( error == KLeaveExit ) |
6452 { |
6543 { |
6453 // Leaving with KLeaveExit does not make function leavable. See Exit() |
6544 // Leaving with KLeaveExit does not make function leavable. See Exit() |
6454 User::Leave( error ); |
6545 User::Leave( error ); |
6461 { |
6552 { |
6462 Exit( EAknSoftkeyClose ); |
6553 Exit( EAknSoftkeyClose ); |
6463 } |
6554 } |
6464 } |
6555 } |
6465 } |
6556 } |
|
6557 //sendui+jepg-> after first call to finallizelauch,rest |
|
6558 // it, so that next call will cover the code finallizelaunch |
|
6559 //as happened for other launch cases. |
|
6560 iOptimizedFlow = EFalse; |
6466 } |
6561 } |
6467 |
6562 |
6468 // --------------------------------------------------------- |
6563 // --------------------------------------------------------- |
6469 // CUniEditorAppUi::DoEditorOperationEventL |
6564 // CUniEditorAppUi::DoEditorOperationEventL |
6470 // --------------------------------------------------------- |
6565 // --------------------------------------------------------- |
6613 // related processing is done at the FinalizeLaunch function. |
6708 // related processing is done at the FinalizeLaunch function. |
6614 // --------------------------------------------------------- |
6709 // --------------------------------------------------------- |
6615 // |
6710 // |
6616 void CUniEditorAppUi::DoLaunchCompleteL() |
6711 void CUniEditorAppUi::DoLaunchCompleteL() |
6617 { |
6712 { |
6618 // Does no harm to call this even if no wait note is set. |
6713 //sendui+jepg -> this required after image processing |
6619 RemoveWaitNote(); |
6714 if(!iOptimizedFlow) |
6620 |
6715 { |
|
6716 // Does no harm to call this even if no wait note is set. |
|
6717 RemoveWaitNote(); |
|
6718 } |
|
6719 |
6621 TBool shutDown( EFalse ); |
6720 TBool shutDown( EFalse ); |
6622 ShowLaunchNotesL( shutDown ); |
6721 // sendui+jepg-> this required after image processing |
|
6722 if(!iOptimizedFlow) |
|
6723 { |
|
6724 ShowLaunchNotesL( shutDown ); |
|
6725 } |
6623 |
6726 |
6624 if ( shutDown ) |
6727 if ( shutDown ) |
6625 { |
6728 { |
6626 // Avoid direct Exit(). It causes actually leaving with -1003. |
6729 // Avoid direct Exit(). It causes actually leaving with -1003. |
6627 // If non-conformant object is sent from sendui and user is not |
6730 // If non-conformant object is sent from sendui and user is not |