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

Side by Side Diff: fpdfsdk/fpdf_ext.cpp

Issue 2004703002: Add missing STDCALL for FPDFDoc_GetPageMode(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 7 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 | public/fpdf_ext.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 "public/fpdf_ext.h" 7 #include "public/fpdf_ext.h"
8 8
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 #ifndef PDF_ENABLE_XFA 184 #ifndef PDF_ENABLE_XFA
185 // XFA Forms 185 // XFA Forms
186 CPDF_InterForm* pInterForm = new CPDF_InterForm(pDoc, FALSE); 186 CPDF_InterForm* pInterForm = new CPDF_InterForm(pDoc, FALSE);
187 if (pInterForm->HasXFAForm()) { 187 if (pInterForm->HasXFAForm()) {
188 FPDF_UnSupportError(FPDF_UNSP_DOC_XFAFORM); 188 FPDF_UnSupportError(FPDF_UNSP_DOC_XFAFORM);
189 } 189 }
190 delete pInterForm; 190 delete pInterForm;
191 #endif // PDF_ENABLE_XFA 191 #endif // PDF_ENABLE_XFA
192 } 192 }
193 193
194 DLLEXPORT int FPDFDoc_GetPageMode(FPDF_DOCUMENT document) { 194 DLLEXPORT int STDCALL FPDFDoc_GetPageMode(FPDF_DOCUMENT document) {
195 CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); 195 CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
196 if (!pDoc) 196 if (!pDoc)
197 return PAGEMODE_UNKNOWN; 197 return PAGEMODE_UNKNOWN;
198 198
199 CPDF_Dictionary* pRoot = pDoc->GetRoot(); 199 CPDF_Dictionary* pRoot = pDoc->GetRoot();
200 if (!pRoot) 200 if (!pRoot)
201 return PAGEMODE_UNKNOWN; 201 return PAGEMODE_UNKNOWN;
202 202
203 CPDF_Object* pName = pRoot->GetObjectBy("PageMode"); 203 CPDF_Object* pName = pRoot->GetObjectBy("PageMode");
204 if (!pName) 204 if (!pName)
205 return PAGEMODE_USENONE; 205 return PAGEMODE_USENONE;
206 206
207 CFX_ByteString strPageMode = pName->GetString(); 207 CFX_ByteString strPageMode = pName->GetString();
208 if (strPageMode.IsEmpty() || strPageMode.EqualNoCase("UseNone")) 208 if (strPageMode.IsEmpty() || strPageMode.EqualNoCase("UseNone"))
209 return PAGEMODE_USENONE; 209 return PAGEMODE_USENONE;
210 if (strPageMode.EqualNoCase("UseOutlines")) 210 if (strPageMode.EqualNoCase("UseOutlines"))
211 return PAGEMODE_USEOUTLINES; 211 return PAGEMODE_USEOUTLINES;
212 if (strPageMode.EqualNoCase("UseThumbs")) 212 if (strPageMode.EqualNoCase("UseThumbs"))
213 return PAGEMODE_USETHUMBS; 213 return PAGEMODE_USETHUMBS;
214 if (strPageMode.EqualNoCase("FullScreen")) 214 if (strPageMode.EqualNoCase("FullScreen"))
215 return PAGEMODE_FULLSCREEN; 215 return PAGEMODE_FULLSCREEN;
216 if (strPageMode.EqualNoCase("UseOC")) 216 if (strPageMode.EqualNoCase("UseOC"))
217 return PAGEMODE_USEOC; 217 return PAGEMODE_USEOC;
218 if (strPageMode.EqualNoCase("UseAttachments")) 218 if (strPageMode.EqualNoCase("UseAttachments"))
219 return PAGEMODE_USEATTACHMENTS; 219 return PAGEMODE_USEATTACHMENTS;
220 220
221 return PAGEMODE_UNKNOWN; 221 return PAGEMODE_UNKNOWN;
222 } 222 }
OLDNEW
« no previous file with comments | « no previous file | public/fpdf_ext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698