diff options
author | tsepez <tsepez@chromium.org> | 2016-09-13 06:46:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-13 06:46:40 -0700 |
commit | 067990ccf96ae962392a2dbacbfd8348dc4c7676 (patch) | |
tree | 5e6a1d32d1b19bc2f7ff4197693d8612737342fc /fpdfsdk/pdfwindow/PWL_EditCtrl.cpp | |
parent | bb8935e9def5ad865be613eebea597a77fc7c547 (diff) | |
download | pdfium-067990ccf96ae962392a2dbacbfd8348dc4c7676.tar.xz |
Stop converting widestring -> c_str -> widestring in several places.
Avoids a needless alloc and copy.
Review-Url: https://codereview.chromium.org/2338553002
Diffstat (limited to 'fpdfsdk/pdfwindow/PWL_EditCtrl.cpp')
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_EditCtrl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp index febf69e7d0..575fd39089 100644 --- a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp +++ b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp @@ -464,8 +464,8 @@ FX_FLOAT CPWL_EditCtrl::GetCaretFontSize() const { return fFontSize; } -void CPWL_EditCtrl::SetText(const FX_WCHAR* csText) { - m_pEdit->SetText(csText); +void CPWL_EditCtrl::SetText(const CFX_WideString& wsText) { + m_pEdit->SetText(wsText); } void CPWL_EditCtrl::CopyText() {} @@ -476,9 +476,9 @@ void CPWL_EditCtrl::CutText() {} void CPWL_EditCtrl::ShowVScrollBar(FX_BOOL bShow) {} -void CPWL_EditCtrl::InsertText(const FX_WCHAR* csText) { +void CPWL_EditCtrl::InsertText(const CFX_WideString& wsText) { if (!IsReadOnly()) - m_pEdit->InsertText(csText, DEFAULT_CHARSET); + m_pEdit->InsertText(wsText, DEFAULT_CHARSET); } void CPWL_EditCtrl::InsertWord(uint16_t word, int32_t nCharset) { |