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

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

Issue 1547833002: Switch from nonstd::unique_ptr to std::unique_ptr. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase 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
« no previous file with comments | « fpdfsdk/src/fsdk_mgr.cpp ('k') | fpdfsdk/src/javascript/JS_Object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3123 matching lines...) Expand 10 before | Expand all | Expand 10 after
3134 for (CPDF_FormField* pFormField : FieldArray) 3134 for (CPDF_FormField* pFormField : FieldArray)
3135 swSort.Add(new CFX_WideString(pFormField->GetFullName())); 3135 swSort.Add(new CFX_WideString(pFormField->GetFullName()));
3136 swSort.Sort(JS_COMPARESTRING); 3136 swSort.Sort(JS_COMPARESTRING);
3137 3137
3138 CJS_Context* pContext = (CJS_Context*)cc; 3138 CJS_Context* pContext = (CJS_Context*)cc;
3139 CJS_Runtime* pRuntime = pContext->GetJSRuntime(); 3139 CJS_Runtime* pRuntime = pContext->GetJSRuntime();
3140 ASSERT(pRuntime); 3140 ASSERT(pRuntime);
3141 3141
3142 CJS_Array FormFieldArray(pRuntime); 3142 CJS_Array FormFieldArray(pRuntime);
3143 for (int j = 0, jsz = swSort.GetSize(); j < jsz; j++) { 3143 for (int j = 0, jsz = swSort.GetSize(); j < jsz; j++) {
3144 nonstd::unique_ptr<CFX_WideString> pStr(swSort.GetAt(j)); 3144 std::unique_ptr<CFX_WideString> pStr(swSort.GetAt(j));
3145 v8::Local<v8::Object> pObj = FXJS_NewFxDynamicObj( 3145 v8::Local<v8::Object> pObj = FXJS_NewFxDynamicObj(
3146 pRuntime->GetIsolate(), pRuntime, CJS_Field::g_nObjDefnID); 3146 pRuntime->GetIsolate(), pRuntime, CJS_Field::g_nObjDefnID);
3147 ASSERT(!pObj.IsEmpty()); 3147 ASSERT(!pObj.IsEmpty());
3148 3148
3149 CJS_Field* pJSField = 3149 CJS_Field* pJSField =
3150 (CJS_Field*)FXJS_GetPrivate(pRuntime->GetIsolate(), pObj); 3150 (CJS_Field*)FXJS_GetPrivate(pRuntime->GetIsolate(), pObj);
3151 Field* pField = (Field*)pJSField->GetEmbedObject(); 3151 Field* pField = (Field*)pJSField->GetEmbedObject();
3152 pField->AttachField(m_pJSDoc, *pStr); 3152 pField->AttachField(m_pJSDoc, *pStr);
3153 3153
3154 CJS_Value FormFieldValue(pRuntime); 3154 CJS_Value FormFieldValue(pRuntime);
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
3620 } 3620 }
3621 } 3621 }
3622 3622
3623 void Field::AddField(CPDFSDK_Document* pDocument, 3623 void Field::AddField(CPDFSDK_Document* pDocument,
3624 int nPageIndex, 3624 int nPageIndex,
3625 int nFieldType, 3625 int nFieldType,
3626 const CFX_WideString& sName, 3626 const CFX_WideString& sName,
3627 const CPDF_Rect& rcCoords) { 3627 const CPDF_Rect& rcCoords) {
3628 // Not supported. 3628 // Not supported.
3629 } 3629 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fsdk_mgr.cpp ('k') | fpdfsdk/src/javascript/JS_Object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698