summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-27 11:47:29 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-27 11:47:29 -0700
commite6f11a7b95e26affba59a7057776a787056af8df (patch)
treeac7e527683debb15df04102b9fe333e552965909 /fpdfsdk/src/pdfwindow/PWL_Edit.cpp
parentf7a7d7e07396c3a0fae617ed8f15f29fd491bc3a (diff)
downloadpdfium-e6f11a7b95e26affba59a7057776a787056af8df.tar.xz
Reduce usage of operator LPCWSTR from CFX_WideString().
This involves adding some explicit c_str() calls. Doing so flagged PDF_EncodeText() and FindOptionValue() as having suboptimal signatures, in that we are often throwing away a perfectly fine length and recomputing it. There are still some platform-specific code that needs the operator. R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1101933003
Diffstat (limited to 'fpdfsdk/src/pdfwindow/PWL_Edit.cpp')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Edit.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
index 1cbbf9a17e..f704a67731 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
@@ -78,7 +78,7 @@ void CPWL_Edit::SetText(FX_LPCWSTR csText)
}
}
- m_pEdit->SetText(swText);
+ m_pEdit->SetText(swText.c_str());
}
void CPWL_Edit::RePosChildWnd()
@@ -192,7 +192,7 @@ void CPWL_Edit::PasteText()
if (swClipboard.GetLength() > 0)
{
Clear();
- InsertText(swClipboard);
+ InsertText(swClipboard.c_str());
}
if (m_pFillerNotify)
@@ -682,23 +682,23 @@ FX_BOOL CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
break;
case WM_PWLEDIT_SUGGEST + 0:
SetSel(m_pEdit->WordPlaceToWordIndex(wrLatin.BeginPos),m_pEdit->WordPlaceToWordIndex(wrLatin.EndPos));
- ReplaceSel(sSuggestWords[0].UTF8Decode());
+ ReplaceSel(sSuggestWords[0].UTF8Decode().c_str());
break;
case WM_PWLEDIT_SUGGEST + 1:
SetSel(m_pEdit->WordPlaceToWordIndex(wrLatin.BeginPos),m_pEdit->WordPlaceToWordIndex(wrLatin.EndPos));
- ReplaceSel(sSuggestWords[1].UTF8Decode());
+ ReplaceSel(sSuggestWords[1].UTF8Decode().c_str());
break;
case WM_PWLEDIT_SUGGEST + 2:
SetSel(m_pEdit->WordPlaceToWordIndex(wrLatin.BeginPos),m_pEdit->WordPlaceToWordIndex(wrLatin.EndPos));
- ReplaceSel(sSuggestWords[2].UTF8Decode());
+ ReplaceSel(sSuggestWords[2].UTF8Decode().c_str());
break;
case WM_PWLEDIT_SUGGEST + 3:
SetSel(m_pEdit->WordPlaceToWordIndex(wrLatin.BeginPos),m_pEdit->WordPlaceToWordIndex(wrLatin.EndPos));
- ReplaceSel(sSuggestWords[3].UTF8Decode());
+ ReplaceSel(sSuggestWords[3].UTF8Decode().c_str());
break;
- case WM_PWLEDIT_SUGGEST + 4:
+ case WM_PWLEDIT_SUGGEST + 4:
SetSel(m_pEdit->WordPlaceToWordIndex(wrLatin.BeginPos),m_pEdit->WordPlaceToWordIndex(wrLatin.EndPos));
- ReplaceSel(sSuggestWords[4].UTF8Decode());
+ ReplaceSel(sSuggestWords[4].UTF8Decode().c_str());
break;
default:
break;