Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Unified Diff: core/src/fpdfdoc/doc_formfield.cpp

Issue 1108903002: Merge to XFA: Reduce usage of operator LPCWSTR from CFX_WideString(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfdoc/doc_form.cpp ('k') | core/src/fpdftext/fpdf_text_int.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_formfield.cpp
diff --git a/core/src/fpdfdoc/doc_formfield.cpp b/core/src/fpdfdoc/doc_formfield.cpp
index 64e9c287cc7021c36c935e8a974d93c953023ba2..9964c71cdeb5ced1556fb19b92f83861746b9986 100644
--- a/core/src/fpdfdoc/doc_formfield.cpp
+++ b/core/src/fpdfdoc/doc_formfield.cpp
@@ -646,7 +646,7 @@ FX_BOOL CPDF_FormField::SetItemSelection(int index, FX_BOOL bSelected, FX_BOOL b
if (m_Type == ListBox) {
SelectOption(index, TRUE);
if (!(m_Flags & FORMLIST_MULTISELECT)) {
- m_pDict->SetAtString("V", PDF_EncodeText(opt_value, opt_value.GetLength()));
+ m_pDict->SetAtString("V", PDF_EncodeText(opt_value));
} else {
CPDF_Array* pArray = CPDF_Array::Create();
if (pArray == NULL) {
@@ -668,7 +668,7 @@ FX_BOOL CPDF_FormField::SetItemSelection(int index, FX_BOOL bSelected, FX_BOOL b
m_pDict->SetAt("V", pArray);
}
} else if (m_Type == ComboBox) {
- m_pDict->SetAtString("V", PDF_EncodeText(opt_value, opt_value.GetLength()));
+ m_pDict->SetAtString("V", PDF_EncodeText(opt_value));
CPDF_Array* pI = CPDF_Array::Create();
if (pI == NULL) {
return FALSE;
@@ -783,7 +783,7 @@ int CPDF_FormField::FindOption(CFX_WideString csOptLabel)
}
return -1;
}
-int CPDF_FormField::FindOptionValue(FX_LPCWSTR csOptValue, int iStartIndex)
+int CPDF_FormField::FindOptionValue(const CFX_WideString& csOptValue, int iStartIndex)
{
if (iStartIndex < 0) {
iStartIndex = 0;
@@ -882,7 +882,7 @@ FX_BOOL CPDF_FormField::CheckControl(int iControlIndex, FX_BOOL bChecked, FX_BOO
if (bNotify && m_pForm->m_pFormNotify != NULL) {
SaveCheckedFieldStatus(this, statusArray);
}
- CFX_WideString csWExport = pControl->GetExportValue();
+ CFX_WideString csWExport = pControl->GetExportValue();
CFX_ByteString csBExport = PDF_EncodeText(csWExport);
int iCount = CountControls();
FX_BOOL bUnison = PDF_FormField_IsUnison(this);
« no previous file with comments | « core/src/fpdfdoc/doc_form.cpp ('k') | core/src/fpdftext/fpdf_text_int.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698