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

Side by Side Diff: fpdfsdk/src/javascript/Field.cpp

Issue 1545183002: Merge to XFA: Switch from nonstd::unique_ptr to std::unique_ptr. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: xfa Created 4 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "Field.h" 7 #include "Field.h"
8 8
9 #include "Document.h" 9 #include "Document.h"
10 #include "Icon.h" 10 #include "Icon.h"
(...skipping 3122 matching lines...) Expand 10 before | Expand all | Expand 10 after
3133 for (CPDF_FormField* pFormField : FieldArray) 3133 for (CPDF_FormField* pFormField : FieldArray)
3134 swSort.Add(new CFX_WideString(pFormField->GetFullName())); 3134 swSort.Add(new CFX_WideString(pFormField->GetFullName()));
3135 swSort.Sort(JS_COMPARESTRING); 3135 swSort.Sort(JS_COMPARESTRING);
3136 3136
3137 CJS_Context* pContext = (CJS_Context*)cc; 3137 CJS_Context* pContext = (CJS_Context*)cc;
3138 CJS_Runtime* pRuntime = pContext->GetJSRuntime(); 3138 CJS_Runtime* pRuntime = pContext->GetJSRuntime();
3139 ASSERT(pRuntime); 3139 ASSERT(pRuntime);
3140 3140
3141 CJS_Array FormFieldArray(pRuntime); 3141 CJS_Array FormFieldArray(pRuntime);
3142 for (int j = 0, jsz = swSort.GetSize(); j < jsz; j++) { 3142 for (int j = 0, jsz = swSort.GetSize(); j < jsz; j++) {
3143 nonstd::unique_ptr<CFX_WideString> pStr(swSort.GetAt(j)); 3143 std::unique_ptr<CFX_WideString> pStr(swSort.GetAt(j));
3144 v8::Local<v8::Object> pObj = FXJS_NewFxDynamicObj( 3144 v8::Local<v8::Object> pObj = FXJS_NewFxDynamicObj(
3145 pRuntime->GetIsolate(), pRuntime, CJS_Field::g_nObjDefnID); 3145 pRuntime->GetIsolate(), pRuntime, CJS_Field::g_nObjDefnID);
3146 ASSERT(!pObj.IsEmpty()); 3146 ASSERT(!pObj.IsEmpty());
3147 3147
3148 CJS_Field* pJSField = 3148 CJS_Field* pJSField =
3149 (CJS_Field*)FXJS_GetPrivate(pRuntime->GetIsolate(), pObj); 3149 (CJS_Field*)FXJS_GetPrivate(pRuntime->GetIsolate(), pObj);
3150 Field* pField = (Field*)pJSField->GetEmbedObject(); 3150 Field* pField = (Field*)pJSField->GetEmbedObject();
3151 pField->AttachField(m_pJSDoc, *pStr); 3151 pField->AttachField(m_pJSDoc, *pStr);
3152 3152
3153 CJS_Value FormFieldValue(pRuntime); 3153 CJS_Value FormFieldValue(pRuntime);
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
3619 } 3619 }
3620 } 3620 }
3621 3621
3622 void Field::AddField(CPDFSDK_Document* pDocument, 3622 void Field::AddField(CPDFSDK_Document* pDocument,
3623 int nPageIndex, 3623 int nPageIndex,
3624 int nFieldType, 3624 int nFieldType,
3625 const CFX_WideString& sName, 3625 const CFX_WideString& sName,
3626 const CPDF_Rect& rcCoords) { 3626 const CPDF_Rect& rcCoords) {
3627 // Not supported. 3627 // Not supported.
3628 } 3628 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698