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 "fpdfsdk/include/fsdk_annothandler.h" | 7 #include "fpdfsdk/include/fsdk_annothandler.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 delete pWidget; | 775 delete pWidget; |
776 } | 776 } |
777 | 777 |
778 CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, | 778 CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, |
779 CPDFSDK_Annot* pAnnot) { | 779 CPDFSDK_Annot* pAnnot) { |
780 ASSERT(pAnnot); | 780 ASSERT(pAnnot); |
781 | 781 |
782 CFX_RectF rcBBox; | 782 CFX_RectF rcBBox; |
783 XFA_ELEMENT eType = pAnnot->GetXFAWidget()->GetDataAcc()->GetUIType(); | 783 XFA_ELEMENT eType = pAnnot->GetXFAWidget()->GetDataAcc()->GetUIType(); |
784 if (eType == XFA_ELEMENT_Signature) | 784 if (eType == XFA_ELEMENT_Signature) |
785 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WIDGETSTATUS_Visible, TRUE); | 785 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_Visible, TRUE); |
786 else | 786 else |
787 pAnnot->GetXFAWidget()->GetBBox(rcBBox, 0); | 787 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_None); |
788 | 788 |
789 CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width, | 789 CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width, |
790 rcBBox.top + rcBBox.height); | 790 rcBBox.top + rcBBox.height); |
791 rcWidget.left -= 1.0f; | 791 rcWidget.left -= 1.0f; |
792 rcWidget.right += 1.0f; | 792 rcWidget.right += 1.0f; |
793 rcWidget.bottom -= 1.0f; | 793 rcWidget.bottom -= 1.0f; |
794 rcWidget.top += 1.0f; | 794 rcWidget.top += 1.0f; |
795 | 795 |
796 return rcWidget; | 796 return rcWidget; |
797 } | 797 } |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 | 1093 |
1094 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { | 1094 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { |
1095 if (m_pos < m_iteratorAnnotList.size()) | 1095 if (m_pos < m_iteratorAnnotList.size()) |
1096 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; | 1096 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; |
1097 return nullptr; | 1097 return nullptr; |
1098 } | 1098 } |
1099 | 1099 |
1100 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { | 1100 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { |
1101 return m_bReverse ? PrevAnnot() : NextAnnot(); | 1101 return m_bReverse ? PrevAnnot() : NextAnnot(); |
1102 } | 1102 } |
OLD | NEW |