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

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

Issue 1417983006: XFA: Simplify CPDFSDK_PageView::PageView_OnDraw(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rebase Created 5 years, 1 month 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/fsdk_mgr.h ('k') | fpdfsdk/src/fsdk_mgr.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/fpdf_formfill.h" 7 #include "../../public/fpdf_formfill.h"
8 #include "../../public/fpdfview.h" 8 #include "../../public/fpdfview.h"
9 #include "../../third_party/base/nonstd_unique_ptr.h" 9 #include "../../third_party/base/nonstd_unique_ptr.h"
10 #include "../include/fsdk_define.h" 10 #include "../include/fsdk_define.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // Grayscale output 310 // Grayscale output
311 if (flags & FPDF_GRAYSCALE) { 311 if (flags & FPDF_GRAYSCALE) {
312 options.m_ColorMode = RENDER_COLOR_GRAY; 312 options.m_ColorMode = RENDER_COLOR_GRAY;
313 options.m_ForeColor = 0; 313 options.m_ForeColor = 0;
314 options.m_BackColor = 0xffffff; 314 options.m_BackColor = 0xffffff;
315 } 315 }
316 options.m_AddFlags = flags >> 8; 316 options.m_AddFlags = flags >> 8;
317 options.m_pOCContext = new CPDF_OCContext(pPDFDoc); 317 options.m_pOCContext = new CPDF_OCContext(pPDFDoc);
318 318
319 if (CPDFSDK_PageView* pPageView = pFXDoc->GetPageView((CPDFXFA_Page*)page)) 319 if (CPDFSDK_PageView* pPageView = pFXDoc->GetPageView((CPDFXFA_Page*)page))
320 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, &clip); 320 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip);
321 321
322 pDevice->RestoreState(); 322 pDevice->RestoreState();
323 delete options.m_pOCContext; 323 delete options.m_pOCContext;
324 options.m_pOCContext = NULL; 324 options.m_pOCContext = NULL;
325 } 325 }
326 DLLEXPORT void STDCALL FPDF_Widget_Undo(FPDF_DOCUMENT document, 326 DLLEXPORT void STDCALL FPDF_Widget_Undo(FPDF_DOCUMENT document,
327 FPDF_WIDGET hWidget) { 327 FPDF_WIDGET hWidget) {
328 if (NULL == hWidget || NULL == document) 328 if (NULL == hWidget || NULL == document)
329 return; 329 return;
330 330
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc); 670 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc);
671 } 671 }
672 } else { 672 } else {
673 if (aa.ActionExist(CPDF_AAction::ClosePage)) { 673 if (aa.ActionExist(CPDF_AAction::ClosePage)) {
674 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); 674 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage);
675 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc); 675 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc);
676 } 676 }
677 } 677 }
678 } 678 }
679 } 679 }
OLDNEW
« no previous file with comments | « fpdfsdk/include/fsdk_mgr.h ('k') | fpdfsdk/src/fsdk_mgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698