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 1745683002: Fixup FX_RECT and FX_SMALL_RECT classes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, Dan's comments Created 4 years, 9 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
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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 if (m_pFormFiller) 694 if (m_pFormFiller)
695 return m_pFormFiller->OnKillFocus(pAnnot, nFlag); 695 return m_pFormFiller->OnKillFocus(pAnnot, nFlag);
696 } 696 }
697 697
698 return TRUE; 698 return TRUE;
699 } 699 }
700 700
701 CFX_FloatRect CPDFSDK_BFAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, 701 CFX_FloatRect CPDFSDK_BFAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
702 CPDFSDK_Annot* pAnnot) { 702 CPDFSDK_Annot* pAnnot) {
703 CFX_ByteString sSubType = pAnnot->GetSubType(); 703 CFX_ByteString sSubType = pAnnot->GetSubType();
704 704 if (sSubType != BFFT_SIGNATURE && m_pFormFiller)
705 if (sSubType == BFFT_SIGNATURE) { 705 return CFX_FloatRect(m_pFormFiller->GetViewBBox(pPageView, pAnnot));
706 } else {
707 if (m_pFormFiller)
708 return m_pFormFiller->GetViewBBox(pPageView, pAnnot);
709 }
710 706
711 return CFX_FloatRect(0, 0, 0, 0); 707 return CFX_FloatRect(0, 0, 0, 0);
712 } 708 }
713 709
714 FX_BOOL CPDFSDK_BFAnnotHandler::HitTest(CPDFSDK_PageView* pPageView, 710 FX_BOOL CPDFSDK_BFAnnotHandler::HitTest(CPDFSDK_PageView* pPageView,
715 CPDFSDK_Annot* pAnnot, 711 CPDFSDK_Annot* pAnnot,
716 const CFX_FloatPoint& point) { 712 const CFX_FloatPoint& point) {
717 ASSERT(pPageView); 713 ASSERT(pPageView);
718 ASSERT(pAnnot); 714 ASSERT(pAnnot);
719 715
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 1099
1104 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { 1100 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() {
1105 if (m_pos < m_iteratorAnnotList.size()) 1101 if (m_pos < m_iteratorAnnotList.size())
1106 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; 1102 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos];
1107 return nullptr; 1103 return nullptr;
1108 } 1104 }
1109 1105
1110 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { 1106 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() {
1111 return m_bReverse ? PrevAnnot() : NextAnnot(); 1107 return m_bReverse ? PrevAnnot() : NextAnnot();
1112 } 1108 }
OLDNEW
« core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp ('K') | « core/src/fpdftext/fpdf_text_int.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698