Ticket #1354: TextView.cpp.2.diff

File TextView.cpp.2.diff, 671 bytes (added by ksmith, 17 years ago)

This patch uses the GetString method from the TextGapBuffer to obtain the "bulleted" text from the TextView if it is in password mode.

  • TextView.cpp

     
    12391239   
    12401240        BMessage *clip = clipboard->Data();
    12411241        if (clip != NULL) {
    1242             clip->AddData("text/plain", B_MIME_TYPE, Text() + fSelStart,
    1243                 fSelEnd - fSelStart);
     1242            if (!IsTypingHidden()) {
     1243                clip->AddData("text/plain", B_MIME_TYPE, Text() + fSelStart,
     1244                    fSelEnd - fSelStart);
     1245            } else {
     1246                int32 bytes = fSelEnd - fSelStart;
     1247                clip->AddData("text/plain", B_MIME_TYPE, fText->GetString(fSelStart, &bytes),
     1248                    fSelEnd - fSelStart);
     1249            }
    12441250           
    12451251            int32 size;
    12461252            if (fStylable) {