965 editArea->iSecretTextTimer->Cancel(); |
965 editArea->iSecretTextTimer->Cancel(); |
966 return KErrNone; |
966 return KErrNone; |
967 } |
967 } |
968 TPtrC icftext = editArea->iRichText->Read(editArea->iPromptTextLen, |
968 TPtrC icftext = editArea->iRichText->Read(editArea->iPromptTextLen, |
969 editArea->iRichText->DocumentLength()); |
969 editArea->iRichText->DocumentLength()); |
970 TInt startPos = icftext.LocateReverse(KStar) + 1 + editArea->iPromptTextLen; |
970 |
971 |
971 for (TInt i = 0; i < icftext.Length(); i++) |
972 TBuf<1> buf; |
972 { |
973 buf.Append(KStar); |
973 if (icftext[i] != KStar)//find only one none-star char |
974 |
974 { |
975 TInt textlen = editArea->iRichText->DocumentLength(); |
975 TInt startPos = i + editArea->iPromptTextLen; |
976 |
976 TBuf<1> buf; |
977 if (startPos < textlen) |
977 buf.Append(KStar); |
978 { |
978 |
979 editArea->iRichText->DeleteL(startPos, 1); |
979 TInt textlen = editArea->iRichText->DocumentLength(); |
980 editArea->iTextView->HandleInsertDeleteL(TCursorSelection(startPos, startPos), 1); |
980 |
981 editArea->iRichText->InsertL(startPos, buf); |
981 if (startPos < textlen) |
982 editArea->iTextView->HandleInsertDeleteL(TCursorSelection(startPos, startPos+buf.Length()), |
982 { |
983 0); |
983 editArea->iRichText->DeleteL(startPos, 1); |
984 |
984 editArea->iTextView->HandleInsertDeleteL(TCursorSelection( |
985 if (startPos == textlen - 1) |
985 startPos, startPos), 1); |
986 { |
986 editArea->iRichText->InsertL(startPos, buf); |
987 editArea->iSecretTextTimer->Cancel(); |
987 editArea->iTextView->HandleInsertDeleteL(TCursorSelection( |
988 } |
988 startPos, startPos + buf.Length()), 0); |
989 } |
989 |
|
990 if (startPos == textlen - 1) |
|
991 { |
|
992 editArea->iSecretTextTimer->Cancel(); |
|
993 } |
|
994 } |
|
995 break; |
|
996 } |
|
997 } |
|
998 |
990 editArea->UpdateArea(editArea->Rect(),EFalse); |
999 editArea->UpdateArea(editArea->Rect(),EFalse); |
991 return KErrNone; |
1000 return KErrNone; |
992 } |
1001 } |
993 |
1002 |
994 void CFepLayoutMultiLineIcfEditor::UpdateSecretTextL() |
1003 void CFepLayoutMultiLineIcfEditor::UpdateSecretTextL() |
2652 } |
2661 } |
2653 |
2662 |
2654 void CFepLayoutMultiLineIcfEditor::ShowByteWarningBubble(const TDesC& aInfo) |
2663 void CFepLayoutMultiLineIcfEditor::ShowByteWarningBubble(const TDesC& aInfo) |
2655 { |
2664 { |
2656 TSize size = iInfoBubble->Rect().Size(); |
2665 TSize size = iInfoBubble->Rect().Size(); |
2657 CFont::TMeasureTextInput* input = new (ELeave) CFont::TMeasureTextInput; |
2666 CFont::TMeasureTextInput input;// = new (ELeave) CFont::TMeasureTextInput; |
2658 CleanupStack::PushL(input); |
2667 input.iMaxBounds = iRect.Width(); |
2659 input->iMaxBounds = iRect.Width(); |
2668 TInt width = iFont->MeasureText(aInfo, &input, NULL); |
2660 TInt width = iFont->MeasureText(aInfo, input, NULL); |
|
2661 CleanupStack::PopAndDestroy(); |
|
2662 size.SetSize(width, size.iHeight); |
2669 size.SetSize(width, size.iHeight); |
2663 SetInfoBubbleCtrlSize(size); |
2670 SetInfoBubbleCtrlSize(size); |
2664 TRAP_IGNORE(iInfoBubble->SetTextL(aInfo)); |
2671 TRAP_IGNORE(iInfoBubble->SetTextL(aInfo)); |
2665 iHideInfoBubbleTemp = ETrue; |
2672 iHideInfoBubbleTemp = ETrue; |
2666 SetInfoBubbleRect(); |
2673 SetInfoBubbleRect(); |
2971 TInt code = text[i]; |
2978 TInt code = text[i]; |
2972 |
2979 |
2973 CPeninputSmileyImage* smiley = iSmileyManager->SmileyImage( code ); |
2980 CPeninputSmileyImage* smiley = iSmileyManager->SmileyImage( code ); |
2974 if ( smiley ) |
2981 if ( smiley ) |
2975 { |
2982 { |
2976 gc.SetBrushColor( TRgb(255,0,0) ); |
|
2977 gc.SetBrushStyle( CGraphicsContext::ENullBrush ); |
2983 gc.SetBrushStyle( CGraphicsContext::ENullBrush ); |
2978 |
2984 |
2979 smiley->SetImageSize( rect.Size() ); |
2985 smiley->SetImageSize( rect.Size() ); |
2980 |
2986 |
2981 if ( smiley->MaskBitmap() ) |
2987 if ( smiley->MaskBitmap() ) |