messagingappbase/msgeditor/viewsrc/MsgBodyControlEditor.cpp
branchRCL_3
changeset 20 94cccd85bd25
parent 18 fbb813aef148
child 24 696bfeff199e
--- a/messagingappbase/msgeditor/viewsrc/MsgBodyControlEditor.cpp	Tue May 25 12:38:02 2010 +0300
+++ b/messagingappbase/msgeditor/viewsrc/MsgBodyControlEditor.cpp	Wed Jun 09 09:37:26 2010 +0300
@@ -119,7 +119,6 @@
                                       CItemFinder::EUriScheme );
 
     iItemFinder->AddObserver( *this );
-    iItemFinder->SetItemFinderObserverL( this );  
     
     iFocusChangedBeforeParseFinish = EFalse;
 
@@ -738,5 +737,29 @@
          MsgEditorCustomDraw()->SkinChanged();;    
     	}
     }
+// ---------------------------------------------------------
+// CMsgBodyControlEditor::PrepareForReadOnlyL
+//
+// Sets SetItemFinderObserverL for viewers
+// ---------------------------------------------------------
+//
+
+void CMsgBodyControlEditor::PrepareForReadOnlyL( TBool aReadOnly )
+   {
+   if ( iItemFinder )
+       {
+       if ( aReadOnly )
+           {
+           iItemFinder->SetItemFinderObserverL( this ); 
+           }
+       else
+           {
+           iItemFinder->SetItemFinderObserverL( NULL );
+           }
+       } 
+
+   CMsgExpandableControlEditor::PrepareForReadOnlyL( aReadOnly );
+   }
+
 
 //  End of File