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

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

Issue 2295953002: Use enum class for subtypes of CPDF_Annot. (Closed)
Patch Set: Use enum class for subtypes of CPDF_Annot. 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 | « fpdfsdk/include/ipdfsdk_annothandler.h ('k') | no next file » | 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 FX_BOOL Annot::type(IJS_Context* cc, 74 FX_BOOL Annot::type(IJS_Context* cc,
75 CJS_PropValue& vp, 75 CJS_PropValue& vp,
76 CFX_WideString& sError) { 76 CFX_WideString& sError) {
77 if (vp.IsSetting()) { 77 if (vp.IsSetting()) {
78 CJS_Context* pContext = static_cast<CJS_Context*>(cc); 78 CJS_Context* pContext = static_cast<CJS_Context*>(cc);
79 sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY); 79 sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY);
80 return FALSE; 80 return FALSE;
81 } 81 }
82 82
83 vp << m_BAAnnot->GetAnnotSubtype(); 83 vp << CPDF_Annot::AnnotSubtypeToString(m_BAAnnot->GetAnnotSubtype());
84 return TRUE; 84 return TRUE;
85 } 85 }
86 86
87 void Annot::SetSDKAnnot(CPDFSDK_BAAnnot* annot) { 87 void Annot::SetSDKAnnot(CPDFSDK_BAAnnot* annot) {
88 m_BAAnnot = annot; 88 m_BAAnnot = annot;
89 } 89 }
OLDNEW
« no previous file with comments | « fpdfsdk/include/ipdfsdk_annothandler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698