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

Side by Side Diff: fpdfsdk/src/fpdfview.cpp

Issue 1613823003: Mege to XFA: Redo CPDF_PageObjects - part 1 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 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/fpdfeditpage.cpp ('k') | fpdfsdk/src/fpdfxfa/fpdfxfa_page.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 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
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
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 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdfeditpage.cpp ('k') | fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698