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

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

Issue 1513363002: Remove CFX_AffineMatrix/CPDF_Matrix (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits Created 5 years 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/fpdfview.cpp ('k') | fpdfsdk/src/fsdk_baseannot.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 <algorithm> 7 #include <algorithm>
8 8
9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" 9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h"
10 #include "fpdfsdk/include/fsdk_annothandler.h" 10 #include "fpdfsdk/include/fsdk_annothandler.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 IPDFSDK_AnnotHandler* CPDFSDK_AnnotHandlerMgr::GetAnnotHandler( 108 IPDFSDK_AnnotHandler* CPDFSDK_AnnotHandlerMgr::GetAnnotHandler(
109 const CFX_ByteString& sType) const { 109 const CFX_ByteString& sType) const {
110 auto it = m_mapType2Handler.find(sType); 110 auto it = m_mapType2Handler.find(sType);
111 return it != m_mapType2Handler.end() ? it->second : nullptr; 111 return it != m_mapType2Handler.end() ? it->second : nullptr;
112 } 112 }
113 113
114 void CPDFSDK_AnnotHandlerMgr::Annot_OnDraw(CPDFSDK_PageView* pPageView, 114 void CPDFSDK_AnnotHandlerMgr::Annot_OnDraw(CPDFSDK_PageView* pPageView,
115 CPDFSDK_Annot* pAnnot, 115 CPDFSDK_Annot* pAnnot,
116 CFX_RenderDevice* pDevice, 116 CFX_RenderDevice* pDevice,
117 CPDF_Matrix* pUser2Device, 117 CFX_Matrix* pUser2Device,
118 FX_DWORD dwFlags) { 118 FX_DWORD dwFlags) {
119 ASSERT(pAnnot); 119 ASSERT(pAnnot);
120 120
121 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { 121 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) {
122 pAnnotHandler->OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); 122 pAnnotHandler->OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags);
123 } else { 123 } else {
124 static_cast<CPDFSDK_BAAnnot*>(pAnnot) 124 static_cast<CPDFSDK_BAAnnot*>(pAnnot)
125 ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); 125 ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr);
126 } 126 }
127 } 127 }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 372
373 CPDF_FormControl* pCtrol = pWidget->GetFormControl(); 373 CPDF_FormControl* pCtrol = pWidget->GetFormControl();
374 pInterForm->RemoveMap(pCtrol); 374 pInterForm->RemoveMap(pCtrol);
375 375
376 delete pWidget; 376 delete pWidget;
377 } 377 }
378 378
379 void CPDFSDK_BFAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, 379 void CPDFSDK_BFAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView,
380 CPDFSDK_Annot* pAnnot, 380 CPDFSDK_Annot* pAnnot,
381 CFX_RenderDevice* pDevice, 381 CFX_RenderDevice* pDevice,
382 CPDF_Matrix* pUser2Device, 382 CFX_Matrix* pUser2Device,
383 FX_DWORD dwFlags) { 383 FX_DWORD dwFlags) {
384 CFX_ByteString sSubType = pAnnot->GetSubType(); 384 CFX_ByteString sSubType = pAnnot->GetSubType();
385 385
386 if (sSubType == BFFT_SIGNATURE) { 386 if (sSubType == BFFT_SIGNATURE) {
387 static_cast<CPDFSDK_BAAnnot*>(pAnnot) 387 static_cast<CPDFSDK_BAAnnot*>(pAnnot)
388 ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); 388 ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr);
389 } else { 389 } else {
390 if (m_pFormFiller) { 390 if (m_pFormFiller) {
391 m_pFormFiller->OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); 391 m_pFormFiller->OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags);
392 } 392 }
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 683
684 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { 684 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() {
685 if (m_pos < m_iteratorAnnotList.size()) 685 if (m_pos < m_iteratorAnnotList.size())
686 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; 686 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos];
687 return nullptr; 687 return nullptr;
688 } 688 }
689 689
690 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { 690 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() {
691 return m_bReverse ? PrevAnnot() : NextAnnot(); 691 return m_bReverse ? PrevAnnot() : NextAnnot();
692 } 692 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdfview.cpp ('k') | fpdfsdk/src/fsdk_baseannot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698