summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-12-30 16:56:12 -0800
committerBo Xu <bo_xu@foxitsoftware.com>2014-12-30 17:07:17 -0800
commitc616483e834b791b92b0c0d4f99d0ea3b66f1a4f (patch)
treee9589ee48c4aeb5e0ab5e9ba0766e6d8c1f768dd /fpdfsdk/src/formfiller
parentbb1405dda43fd4b605fd9c2808dc0ead87f54ccc (diff)
downloadpdfium-c616483e834b791b92b0c0d4f99d0ea3b66f1a4f.tar.xz
XFA: merge patch from CL 733693003, get rid of FX_LPCSTR cast
Get rid of FX_LPCSTR cast. Follow up on https://codereview.chromium.org/733693003 R=brucedawson@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/809993004
Diffstat (limited to 'fpdfsdk/src/formfiller')
-rw-r--r--fpdfsdk/src/formfiller/FFL_ComboBox.cpp2
-rw-r--r--fpdfsdk/src/formfiller/FFL_TextField.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
index 1c5b49812e..2607a76b5c 100644
--- a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
@@ -377,7 +377,7 @@ void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd)
CFX_WideString wsText = pEdit->GetText();
int nCharacters = wsText.GetLength();
CFX_ByteString bsUTFText = wsText.UTF16LE_Encode();
- unsigned short* pBuffer = (unsigned short*)(FX_LPCSTR)bsUTFText;
+ unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str();
m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, nCharacters, TRUE);
pEdit->SetEditNotify(this);
diff --git a/fpdfsdk/src/formfiller/FFL_TextField.cpp b/fpdfsdk/src/formfiller/FFL_TextField.cpp
index f9c93914a5..dce166282e 100644
--- a/fpdfsdk/src/formfiller/FFL_TextField.cpp
+++ b/fpdfsdk/src/formfiller/FFL_TextField.cpp
@@ -374,7 +374,7 @@ void CFFL_TextField::OnSetFocus(CPWL_Wnd* pWnd)
CFX_WideString wsText = pEdit->GetText();
int nCharacters = wsText.GetLength();
CFX_ByteString bsUTFText = wsText.UTF16LE_Encode();
- unsigned short* pBuffer = (unsigned short*)(FX_LPCSTR)bsUTFText;
+ unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str();
m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, nCharacters, TRUE);
pEdit->SetEditNotify(this);