diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 21:14:24 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 21:14:24 +0000 |
commit | bafaee12825a06890f114a282880e135a8b0b1ae (patch) | |
tree | 7de5c22a56597512c23537fa160e59a3ad884df4 /views/controls/textfield | |
parent | cef5e45c554dfa304e5ec3b35998b0158fc709d7 (diff) | |
download | chromium_src-bafaee12825a06890f114a282880e135a8b0b1ae.zip chromium_src-bafaee12825a06890f114a282880e135a8b0b1ae.tar.gz chromium_src-bafaee12825a06890f114a282880e135a8b0b1ae.tar.bz2 |
wstring: remove WideToUpper/WideToLower
Also fix two instances of passing a single-char array to a function
that expects a string (we must NUL-terminate the array).
BUG=23581
Review URL: http://codereview.chromium.org/7000005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/textfield')
-rw-r--r-- | views/controls/textfield/native_textfield_win.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/views/controls/textfield/native_textfield_win.cc b/views/controls/textfield/native_textfield_win.cc index 5811cf9..b59e168 100644 --- a/views/controls/textfield/native_textfield_win.cc +++ b/views/controls/textfield/native_textfield_win.cc @@ -189,12 +189,12 @@ string16 NativeTextfieldWin::GetText() const { } void NativeTextfieldWin::UpdateText() { - std::wstring text = textfield_->text(); + string16 text = textfield_->text(); // Adjusting the string direction before setting the text in order to make // sure both RTL and LTR strings are displayed properly. base::i18n::AdjustStringForLocaleDirection(&text); if (textfield_->style() & Textfield::STYLE_LOWERCASE) - text = base::i18n::WideToLower(text); + text = base::i18n::ToLower(text); SetWindowText(text.c_str()); UpdateAccessibleValue(text); } @@ -905,9 +905,9 @@ void NativeTextfieldWin::OnPaste() { std::wstring clipboard_str; clipboard->ReadText(ui::Clipboard::BUFFER_STANDARD, &clipboard_str); if (!clipboard_str.empty()) { - std::wstring collapsed(CollapseWhitespace(clipboard_str, false)); + string16 collapsed(CollapseWhitespace(clipboard_str, false)); if (textfield_->style() & Textfield::STYLE_LOWERCASE) - collapsed = base::i18n::WideToLower(collapsed); + collapsed = base::i18n::ToLower(collapsed); // Force a Paste operation to trigger ContentsChanged, even if identical // contents are pasted into the text box. See http://crbug.com/79002 ReplaceSel(L"", false); |