textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicfeditor.cpp
branchRCL_3
changeset 56 8152b1f1763a
parent 50 5a1685599b76
equal deleted inserted replaced
50:5a1685599b76 56:8152b1f1763a
  1062         {
  1062         {
  1063         iFormatChange = ETrue;
  1063         iFormatChange = ETrue;
  1064         }    
  1064         }    
  1065     
  1065     
  1066     TFontSpec fontSpec;
  1066     TFontSpec fontSpec;
  1067     fontSpec = aFont->FontSpecInTwips();
       
  1068     fontSpec.iHeight = aFont->HeightInPixels();
  1067     fontSpec.iHeight = aFont->HeightInPixels();
  1069     CFont*  font;
  1068     CFont*  font;
  1070     iCoeEnv->ScreenDevice()->ReleaseFont(CONST_CAST(CFont*, iFont));
  1069     iCoeEnv->ScreenDevice()->ReleaseFont(CONST_CAST(CFont*, iFont));
  1071     iCoeEnv->ScreenDevice()->GetNearestFontInPixels((CFont*&)font,fontSpec);
  1070     iCoeEnv->ScreenDevice()->GetNearestFontInPixels((CFont*&)font,fontSpec);
  1072     
  1071     
  1081     iCharFormatMask.SetAttrib(EAttFontTypeface);
  1080     iCharFormatMask.SetAttrib(EAttFontTypeface);
  1082 
  1081 
  1083     iCharFormat.iFontSpec.iHeight = iCoeEnv->ScreenDevice()->VerticalPixelsToTwips(iFontHeight);
  1082     iCharFormat.iFontSpec.iHeight = iCoeEnv->ScreenDevice()->VerticalPixelsToTwips(iFontHeight);
  1084     iCharFormat.iFontSpec.iFontStyle.SetStrokeWeight(EStrokeWeightNormal);
  1083     iCharFormat.iFontSpec.iFontStyle.SetStrokeWeight(EStrokeWeightNormal);
  1085     iCharFormat.iFontSpec.iFontStyle.SetBitmapType(EAntiAliasedGlyphBitmap);
  1084     iCharFormat.iFontSpec.iFontStyle.SetBitmapType(EAntiAliasedGlyphBitmap);
  1086     iCharFormat.iFontSpec.iTypeface = iFont->FontSpecInTwips().iTypeface;
       
  1087 
  1085 
  1088     iRichText->ApplyCharFormatL(iCharFormat, iCharFormatMask, 0, iRichText->DocumentLength());    
  1086     iRichText->ApplyCharFormatL(iCharFormat, iCharFormatMask, 0, iRichText->DocumentLength());    
  1089     if( InlineStateOn() || AutoCompletionStateOn() )
  1087     if( InlineStateOn() || AutoCompletionStateOn() )
  1090         {
  1088         {
  1091         iCharFormatMask.ClearAll();
  1089         iCharFormatMask.ClearAll();
  2701 TBool CFepLayoutMultiLineIcfEditor::SetAutoCompleteStateL(TBool aAutoComplete, 
  2699 TBool CFepLayoutMultiLineIcfEditor::SetAutoCompleteStateL(TBool aAutoComplete, 
  2702                                                    TInt aStartPos, 
  2700                                                    TInt aStartPos, 
  2703                                                    TInt aMidPos,
  2701                                                    TInt aMidPos,
  2704                                                    TInt aEndPos)
  2702                                                    TInt aEndPos)
  2705     {
  2703     {
  2706     TBool changed = ( iAutoComplete != aAutoComplete );
       
  2707     // If auto is on, we need draw every time, as grey part is not making the text changed
  2704     // If auto is on, we need draw every time, as grey part is not making the text changed
  2708     // if we use traditional way to check change, auto part is not turn to black when grey part is there.
  2705     // if we use traditional way to check change, auto part is not turn to black when grey part is there.
  2709     changed = iAutoComplete; 
  2706     TBool changed = ( aAutoComplete || iAutoComplete != aAutoComplete );
  2710     iAutoComplete = aAutoComplete;
  2707     iAutoComplete = aAutoComplete;
  2711     
  2708     
  2712     if ( aAutoComplete )
  2709     if ( aAutoComplete )
  2713         {
  2710         {
  2714         iState = CFepLayoutMultiLineIcf::EIcfAutoComplete;
  2711         iState = CFepLayoutMultiLineIcf::EIcfAutoComplete;