diff options
author | tsepez <tsepez@chromium.org> | 2016-09-08 11:28:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-08 11:28:14 -0700 |
commit | a31da74cffa8c3ff919051cc49bc006aeb55d345 (patch) | |
tree | 0457bd7c0a74298d47e25cd1cdbf13b2622493ef /fpdfsdk/cpdfsdk_interform.cpp | |
parent | cd5dc855df0ca37b7667b5f3ceb951d2d417d99f (diff) | |
download | pdfium-a31da74cffa8c3ff919051cc49bc006aeb55d345.tar.xz |
Pass CFX_WideString further down widget callers
Avoid a couple of places where we copy the raw string back into a
brand-new widestring.
There are a few places where the difference between a null
ptr and an empty string control the logic, and I left these
as-is. Other places can just take the string by const ref.
Review-Url: https://codereview.chromium.org/2323493002
Diffstat (limited to 'fpdfsdk/cpdfsdk_interform.cpp')
-rw-r--r-- | fpdfsdk/cpdfsdk_interform.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp index a8e2663a9b..1f182d4a0c 100644 --- a/fpdfsdk/cpdfsdk_interform.cpp +++ b/fpdfsdk/cpdfsdk_interform.cpp @@ -323,7 +323,7 @@ CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField, } void CPDFSDK_InterForm::ResetFieldAppearance(CPDF_FormField* pFormField, - const FX_WCHAR* sValue, + const CFX_WideString* sValue, FX_BOOL bValueChanged) { for (int i = 0, sz = pFormField->CountControls(); i < sz; i++) { CPDF_FormControl* pFormCtrl = pFormField->GetControl(i); @@ -634,7 +634,7 @@ void CPDFSDK_InterForm::AfterValueChange(CPDF_FormField* pField) { OnCalculate(pField); FX_BOOL bFormatted = FALSE; CFX_WideString sValue = OnFormat(pField, bFormatted); - ResetFieldAppearance(pField, bFormatted ? sValue.c_str() : nullptr, TRUE); + ResetFieldAppearance(pField, bFormatted ? &sValue : nullptr, TRUE); UpdateField(pField); } } |