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/fpdf_formfill.h" | 7 #include "public/fpdf_formfill.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 options.m_ForeColor = 0; | 367 options.m_ForeColor = 0; |
368 options.m_BackColor = 0xffffff; | 368 options.m_BackColor = 0xffffff; |
369 } | 369 } |
370 options.m_AddFlags = flags >> 8; | 370 options.m_AddFlags = flags >> 8; |
371 options.m_pOCContext = new CPDF_OCContext(pPDFDoc, CPDF_OCContext::View); | 371 options.m_pOCContext = new CPDF_OCContext(pPDFDoc, CPDF_OCContext::View); |
372 | 372 |
373 if (CPDFSDK_PageView* pPageView = pFXDoc->GetPageView(pPage)) | 373 if (CPDFSDK_PageView* pPageView = pFXDoc->GetPageView(pPage)) |
374 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip); | 374 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip); |
375 #endif // PDF_ENABLE_XFA | 375 #endif // PDF_ENABLE_XFA |
376 | 376 |
377 pDevice->RestoreState(); | 377 pDevice->RestoreState(false); |
378 delete options.m_pOCContext; | 378 delete options.m_pOCContext; |
379 #ifdef PDF_ENABLE_XFA | 379 #ifdef PDF_ENABLE_XFA |
380 options.m_pOCContext = NULL; | 380 options.m_pOCContext = NULL; |
381 #endif // PDF_ENABLE_XFA | 381 #endif // PDF_ENABLE_XFA |
382 } | 382 } |
383 | 383 |
384 DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle, | 384 DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle, |
385 FPDF_BITMAP bitmap, | 385 FPDF_BITMAP bitmap, |
386 FPDF_PAGE page, | 386 FPDF_PAGE page, |
387 int start_x, | 387 int start_x, |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc); | 717 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc); |
718 } | 718 } |
719 } else { | 719 } else { |
720 if (aa.ActionExist(CPDF_AAction::ClosePage)) { | 720 if (aa.ActionExist(CPDF_AAction::ClosePage)) { |
721 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); | 721 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); |
722 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc); | 722 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc); |
723 } | 723 } |
724 } | 724 } |
725 } | 725 } |
726 } | 726 } |
OLD | NEW |