uifw/EikStd/coctlsrc/EIKEDWIN.CPP
branchRCL_3
changeset 16 71dd06cfe933
parent 15 08e69e956a8c
child 18 0aa5fbdfbc30
--- a/uifw/EikStd/coctlsrc/EIKEDWIN.CPP	Wed Mar 31 21:59:52 2010 +0300
+++ b/uifw/EikStd/coctlsrc/EIKEDWIN.CPP	Wed Apr 14 16:14:00 2010 +0300
@@ -520,6 +520,9 @@
     TBool paragraphContainingStartPositionOfInlineTextHasChangedFormat=EFalse;
     TInt numberOfCharactersSuccessfullyDeleted=0;
     TInt numberOfCharactersSuccessfullyInserted=0;
+    
+    iEdwin.ConvertSmileyForDeleteL( selection );
+    
     // handle extended highlights
 
 /* 
@@ -633,23 +636,9 @@
 
 void CEikEdwinFepSupport::SetCursorSelectionForFepL(const TCursorSelection& aCursorSelection)
     {
-    TInt cursorPos( aCursorSelection.iCursorPos );
-    TInt anchorPos( aCursorSelection.iAnchorPos );
-    if ( iEdwin.IsSmileyEnabled() )
-        {  
-        CSmileyManager* smiley( iEdwin.iEdwinExtension->iSmiley );
-        TInt oldPos = ( cursorPos == anchorPos ) ? iEdwin.CursorPos() : anchorPos; 
-        smiley->HandleSetCursor( oldPos, cursorPos );       
-        if ( aCursorSelection.iCursorPos == aCursorSelection.iAnchorPos )
-            {
-            anchorPos = cursorPos;
-            }
-        else
-            {
-            smiley->HandleSetCursor( cursorPos, anchorPos );
-            }
-        }
-	iEdwin.SetSelectionL( cursorPos, anchorPos );
+    TCursorSelection select( aCursorSelection.iCursorPos, aCursorSelection.iAnchorPos );
+    iEdwin.HandleSelectionForSmiley( select );
+    iEdwin.iTextView->SetSelectionL( select );
     iEdwin.ReportEdwinEventL(MEikEdwinObserver::EEventNavigation);
     }
 
@@ -2501,6 +2490,17 @@
         return;
         }
     
+    // If text selection is not visible, don't allow user to select any text
+    // or scroll during selection ( if kinetic scrolling enabled ).
+    if ( kineticScrollingEnabled && iEdwinFepSupport )
+        {
+        CAknEdwinState* edwinState( EditorState() );
+        if ( edwinState && !( edwinState->Flags() & EAknEditorFlagSelectionVisible ) )
+            {
+            return;
+            }
+        }
+    
     const TCursorSelection selection( iTextView->Selection() );
     const TPoint pointerPos( aPointerEvent.iPosition );
     
@@ -2676,7 +2676,7 @@
             iEdwinInternalFlags&=(~ELeftDownInViewRect);
 
             // We can't open cut-copy-paste menu if dragging started
-            if ( IsReadOnly() && IsSelectionVisible() && !( kineticScrollingEnabled
+            if ( IsReadOnly() && IsSelectionVisible() && !( iEdwinUserFlags&ENoAutoSelection ) && !( kineticScrollingEnabled
                 && iEdwinExtension->iPhysicsHandler->DraggingStarted() ) )
                 {
                 iEdwinFepSupport->iFeedback->InstantFeedback(