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

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

Issue 834413002: XFA: merge patch from CL 792953005, fix most VC++ warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Pulled latest code. Created 5 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/fpdfformfill.cpp ('k') | pdfium.gyp » ('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 "../include/fsdk_define.h" 7 #include "../include/fsdk_define.h"
8 #include "../include/fpdfxfa/fpdfxfa_doc.h" 8 #include "../include/fpdfxfa/fpdfxfa_doc.h"
9 #include "../include/fpdfxfa/fpdfxfa_page.h" 9 #include "../include/fpdfxfa/fpdfxfa_page.h"
10 #include "../include/fpdfxfa/fpdfxfa_util.h" 10 #include "../include/fpdfxfa/fpdfxfa_util.h"
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); 671 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
672 CPDFXFA_Page* pPage = GetPDFXFAPage(); 672 CPDFXFA_Page* pPage = GetPDFXFAPage();
673 673
674 if (pPage == NULL) return; 674 if (pPage == NULL) return;
675 675
676 if (pPage->GetDocument()->GetDocType() == DOCTYPE_DYNIMIC_XFA) { 676 if (pPage->GetDocument()->GetDocType() == DOCTYPE_DYNIMIC_XFA) {
677 CFX_Graphics gs; 677 CFX_Graphics gs;
678 gs.Create(pDevice); 678 gs.Create(pDevice);
679 if (pClip) { 679 if (pClip) {
680 CFX_RectF rectClip; 680 CFX_RectF rectClip;
681 » » » rectClip.Set(pClip->left, pClip->top, pClip->Width(), pC lip->Height()); 681 » » » rectClip.Set(static_cast<FX_FLOAT>(pClip->left),
682 » » » » static_cast<FX_FLOAT>(pClip->top),
683 » » » » static_cast<FX_FLOAT>(pClip->Width()),
684 » » » » static_cast<FX_FLOAT>(pClip->Height()));
682 gs.SetClipRect(rectClip); 685 gs.SetClipRect(rectClip);
683 } 686 }
684 IXFA_RenderContext* pRenderContext = XFA_RenderContext_Create(); 687 IXFA_RenderContext* pRenderContext = XFA_RenderContext_Create();
685 if (!pRenderContext) 688 if (!pRenderContext)
686 return; 689 return;
687 CXFA_RenderOptions renderOptions; 690 CXFA_RenderOptions renderOptions;
688 renderOptions.m_bHighlight = TRUE; 691 renderOptions.m_bHighlight = TRUE;
689 pRenderContext->StartRender(pPage->GetXFAPageView(), &gs, *pUser 2Device, renderOptions); 692 pRenderContext->StartRender(pPage->GetXFAPageView(), &gs, *pUser 2Device, renderOptions);
690 pRenderContext->DoRender(); 693 pRenderContext->DoRender();
691 pRenderContext->StopRender(); 694 pRenderContext->StopRender();
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 1249
1247 for(int i=0; i<m_fxAnnotArray.GetSize(); i++) 1250 for(int i=0; i<m_fxAnnotArray.GetSize(); i++)
1248 { 1251 {
1249 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); 1252 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i);
1250 if(pAnnot == pFocusAnnot) 1253 if(pAnnot == pFocusAnnot)
1251 return pAnnot; 1254 return pAnnot;
1252 } 1255 }
1253 return NULL; 1256 return NULL;
1254 } 1257 }
1255 1258
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdfformfill.cpp ('k') | pdfium.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698