summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller/FFL_TextField.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-27 11:22:20 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-27 11:22:20 -0700
commit15a62973b9b89c3e229cc0ab501c45967f91b325 (patch)
treed95505963de5d8640fb85067639b6fdaf159d1b6 /fpdfsdk/src/formfiller/FFL_TextField.cpp
parentef25d9995e494bd596ffea8fb8c09c2e48daa9a0 (diff)
downloadpdfium-15a62973b9b89c3e229cc0ab501c45967f91b325.tar.xz
Kill 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. R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1101933003
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_TextField.cpp')
-rw-r--r--fpdfsdk/src/formfiller/FFL_TextField.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_TextField.cpp b/fpdfsdk/src/formfiller/FFL_TextField.cpp
index f45d95364d..f488fac6ae 100644
--- a/fpdfsdk/src/formfiller/FFL_TextField.cpp
+++ b/fpdfsdk/src/formfiller/FFL_TextField.cpp
@@ -129,9 +129,8 @@ CPWL_Wnd* CFFL_TextField::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageVi
pWnd->SetLimitChar(nMaxLen);
}
}
-
- pWnd->SetText(swValue);
-
+
+ pWnd->SetText(swValue.c_str());
return pWnd;
}
@@ -251,7 +250,7 @@ void CFFL_TextField::SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AA
{
pEdit->SetFocus();
pEdit->SetSel(fa.nSelStart, fa.nSelEnd);
- pEdit->ReplaceSel(fa.sChange);
+ pEdit->ReplaceSel(fa.sChange.c_str());
}
break;
default:
@@ -292,7 +291,7 @@ void CFFL_TextField::RestoreState(CPDFSDK_PageView* pPageView)
if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, TRUE))
{
- pWnd->SetText(m_State.sValue);
+ pWnd->SetText(m_State.sValue.c_str());
pWnd->SetSel(m_State.nStart, m_State.nEnd);
}
}