| OLD | NEW |
| 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/fpdfview.h" | 7 #include "public/fpdfview.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 return nullptr; | 486 return nullptr; |
| 487 | 487 |
| 488 #ifdef PDF_ENABLE_XFA | 488 #ifdef PDF_ENABLE_XFA |
| 489 return pDoc->GetPage(page_index); | 489 return pDoc->GetPage(page_index); |
| 490 #else // PDF_ENABLE_XFA | 490 #else // PDF_ENABLE_XFA |
| 491 CPDF_Dictionary* pDict = pDoc->GetPage(page_index); | 491 CPDF_Dictionary* pDict = pDoc->GetPage(page_index); |
| 492 if (!pDict) | 492 if (!pDict) |
| 493 return NULL; | 493 return NULL; |
| 494 CPDF_Page* pPage = new CPDF_Page; | 494 CPDF_Page* pPage = new CPDF_Page; |
| 495 pPage->Load(pDoc, pDict); | 495 pPage->Load(pDoc, pDict); |
| 496 pPage->ParseContent(); | 496 pPage->ParseContent(nullptr); |
| 497 return pPage; | 497 return pPage; |
| 498 #endif // PDF_ENABLE_XFA | 498 #endif // PDF_ENABLE_XFA |
| 499 } | 499 } |
| 500 | 500 |
| 501 DLLEXPORT double STDCALL FPDF_GetPageWidth(FPDF_PAGE page) { | 501 DLLEXPORT double STDCALL FPDF_GetPageWidth(FPDF_PAGE page) { |
| 502 UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page); | 502 UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page); |
| 503 return pPage ? pPage->GetPageWidth() : 0.0; | 503 return pPage ? pPage->GetPageWidth() : 0.0; |
| 504 } | 504 } |
| 505 | 505 |
| 506 DLLEXPORT double STDCALL FPDF_GetPageHeight(FPDF_PAGE page) { | 506 DLLEXPORT double STDCALL FPDF_GetPageHeight(FPDF_PAGE page) { |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 if (!buffer) { | 1189 if (!buffer) { |
| 1190 *buflen = len; | 1190 *buflen = len; |
| 1191 } else if (*buflen >= len) { | 1191 } else if (*buflen >= len) { |
| 1192 memcpy(buffer, utf16Name.c_str(), len); | 1192 memcpy(buffer, utf16Name.c_str(), len); |
| 1193 *buflen = len; | 1193 *buflen = len; |
| 1194 } else { | 1194 } else { |
| 1195 *buflen = -1; | 1195 *buflen = -1; |
| 1196 } | 1196 } |
| 1197 return (FPDF_DEST)pDestObj; | 1197 return (FPDF_DEST)pDestObj; |
| 1198 } | 1198 } |
| OLD | NEW |