calendarui/views/src/caleneventviewcontainer.cpp
branchRCL_3
changeset 60 96907930389d
parent 59 aba12c885d83
child 67 1539a383d7b6
equal deleted inserted replaced
59:aba12c885d83 60:96907930389d
   395             case EKeyDownArrow:
   395             case EKeyDownArrow:
   396                 {
   396                 {
   397                 // Scroll the text view down by one line
   397                 // Scroll the text view down by one line
   398                 iTextEditor->MakeVisible(EFalse);
   398                 iTextEditor->MakeVisible(EFalse);
   399                 TInt scrollLines = KScrollViewerDown;
   399                 TInt scrollLines = KScrollViewerDown;
       
   400                 //text should not be scrolled out of the border
       
   401 		//introduced based on suggestion from texteditor team 
       
   402 		//to avoid scrolling to invalid lines
       
   403                 iTextEditor->TextLayout()->RestrictScrollToTopsOfLines(ETrue);
   400                 iTextEditor->TextView()->ScrollDisplayLinesL(scrollLines);
   404                 iTextEditor->TextView()->ScrollDisplayLinesL(scrollLines);
       
   405                 iTextEditor->TextLayout()->RestrictScrollToTopsOfLines(EFalse);
   401                 iTextEditor->UpdateScrollBarsL();
   406                 iTextEditor->UpdateScrollBarsL();
   402                 iTextEditor->MakeVisible(ETrue);
   407                 iTextEditor->MakeVisible(ETrue);
   403                 //Set focus immediately for highlight of auto find text
   408                 //Set focus immediately for highlight of auto find text
   404                 iTextEditor->SetFocus(ETrue);
   409                 iTextEditor->SetFocus(ETrue);
   405                 keyResponse = EKeyWasConsumed;
   410                 keyResponse = EKeyWasConsumed;
   518                         
   523                         
   519                             TTmPosInfo2 *posInfo = new(ELeave) TTmPosInfo2;
   524                             TTmPosInfo2 *posInfo = new(ELeave) TTmPosInfo2;
   520                             textView->FindXyPosL(aPointerEvent.iPosition,*posInfo);
   525                             textView->FindXyPosL(aPointerEvent.iPosition,*posInfo);
   521                         
   526                         
   522                             // Check if it is tapped on any attachment name, if yes then open that attachment
   527                             // Check if it is tapped on any attachment name, if yes then open that attachment
   523                             CheckAndOpenTappedAttachment(posInfo);
   528                             CheckAndOpenTappedAttachmentL(posInfo);
   524                             delete posInfo;
   529                             delete posInfo;
   525                             }
   530                             }
   526                         }
   531                         }
   527     			    }
   532     			    }
   528     				break;
   533     				break;
  2561     if(toolbar && toolbar->IsVisible())
  2566     if(toolbar && toolbar->IsVisible())
  2562         {
  2567         {
  2563         toolbar->SetToolbarVisibilityL(EFalse);
  2568         toolbar->SetToolbarVisibilityL(EFalse);
  2564         }
  2569         }
  2565     
  2570     
       
  2571     CCalenEventView* eventView = static_cast<CCalenEventView*>( iView );
       
  2572     eventView->HideNaviPane();
  2566     //open the attachment
  2573     //open the attachment
  2567     OpenAttachmentViewerL(file, *this);
  2574     OpenAttachmentViewerL(file, *this);
       
  2575     if(!iEmbeddedFileOpened)
       
  2576         {
       
  2577         eventView->RedrawStatusPaneL();
       
  2578         }
  2568     CleanupStack::PopAndDestroy(&file);
  2579     CleanupStack::PopAndDestroy(&file);
  2569 
  2580 
  2570     
  2581     
  2571     // Unhide the toolbar after coming back
  2582     // Unhide the toolbar after coming back
  2572     if(toolbar)
  2583     if(toolbar)
  2598 // CCalenEventViewContainer::CheckAndOpenTappedAttachment
  2609 // CCalenEventViewContainer::CheckAndOpenTappedAttachment
  2599 // Checks if it is tapped on any attachment, if yes, then opens that attachment
  2610 // Checks if it is tapped on any attachment, if yes, then opens that attachment
  2600 // (other items were commented in a header).
  2611 // (other items were commented in a header).
  2601 // ----------------------------------------------------------------------------
  2612 // ----------------------------------------------------------------------------
  2602 //
  2613 //
  2603 void CCalenEventViewContainer::CheckAndOpenTappedAttachment(TTmPosInfo2* posInfo)
  2614 void CCalenEventViewContainer::CheckAndOpenTappedAttachmentL(TTmPosInfo2* posInfo)
  2604     {
  2615     {
  2605     // iterate through iAttachmentPosInfoArray to see if posInfo falls in any of the range
  2616     // iterate through iAttachmentPosInfoArray to see if posInfo falls in any of the range
  2606     TInt attachmentToBeOpened = -1;
  2617     TInt attachmentToBeOpened = -1;
  2607     for(TInt i = 0; i < iAttachmentPosInfoArray.Count(); i++)
  2618     for(TInt i = 0; i < iAttachmentPosInfoArray.Count(); i++)
  2608         {
  2619         {