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

Side by Side Diff: fpdfsdk/javascript/Annot.cpp

Issue 2319543003: Remove unused context parameter from JSGetStringFromID (Closed)
Patch Set: rebase Created 4 years, 3 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 | « no previous file | fpdfsdk/javascript/Document.cpp » ('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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 "fpdfsdk/javascript/Annot.h" 7 #include "fpdfsdk/javascript/Annot.h"
8 8
9 #include "fpdfsdk/javascript/JS_Define.h" 9 #include "fpdfsdk/javascript/JS_Define.h"
10 #include "fpdfsdk/javascript/JS_Object.h" 10 #include "fpdfsdk/javascript/JS_Object.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 CFX_WideString annotName; 84 CFX_WideString annotName;
85 vp >> annotName; 85 vp >> annotName;
86 baAnnot->SetAnnotName(annotName); 86 baAnnot->SetAnnotName(annotName);
87 return TRUE; 87 return TRUE;
88 } 88 }
89 89
90 FX_BOOL Annot::type(IJS_Context* cc, 90 FX_BOOL Annot::type(IJS_Context* cc,
91 CJS_PropValue& vp, 91 CJS_PropValue& vp,
92 CFX_WideString& sError) { 92 CFX_WideString& sError) {
93 if (vp.IsSetting()) { 93 if (vp.IsSetting()) {
94 CJS_Context* pContext = static_cast<CJS_Context*>(cc); 94 sError = JSGetStringFromID(IDS_STRING_JSREADONLY);
95 sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY);
96 return FALSE; 95 return FALSE;
97 } 96 }
98 97
99 CPDFSDK_BAAnnot* baAnnot = ToBAAnnot(m_pAnnot); 98 CPDFSDK_BAAnnot* baAnnot = ToBAAnnot(m_pAnnot);
100 if (!baAnnot) 99 if (!baAnnot)
101 return FALSE; 100 return FALSE;
102 101
103 vp << CPDF_Annot::AnnotSubtypeToString(baAnnot->GetAnnotSubtype()); 102 vp << CPDF_Annot::AnnotSubtypeToString(baAnnot->GetAnnotSubtype());
104 return TRUE; 103 return TRUE;
105 } 104 }
106 105
107 void Annot::SetSDKAnnot(CPDFSDK_BAAnnot* annot) { 106 void Annot::SetSDKAnnot(CPDFSDK_BAAnnot* annot) {
108 m_pAnnot = annot; 107 m_pAnnot = annot;
109 SetWatchedPtr(&m_pAnnot); 108 SetWatchedPtr(&m_pAnnot);
110 } 109 }
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/javascript/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698