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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 delete pWidget; | 846 delete pWidget; |
847 } | 847 } |
848 | 848 |
849 void CPDFSDK_XFAAnnotHandler::DeleteAnnot(CPDFSDK_Annot* pAnnot) {} | 849 void CPDFSDK_XFAAnnotHandler::DeleteAnnot(CPDFSDK_Annot* pAnnot) {} |
850 | 850 |
851 CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, | 851 CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, |
852 CPDFSDK_Annot* pAnnot) { | 852 CPDFSDK_Annot* pAnnot) { |
853 ASSERT(pAnnot); | 853 ASSERT(pAnnot); |
854 | 854 |
855 CFX_RectF rcBBox; | 855 CFX_RectF rcBBox; |
856 XFA_ELEMENT eType = pAnnot->GetXFAWidget()->GetDataAcc()->GetUIType(); | 856 XFA_Element eType = pAnnot->GetXFAWidget()->GetDataAcc()->GetUIType(); |
857 if (eType == XFA_ELEMENT_Signature) | 857 if (eType == XFA_Element::Signature) |
858 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_Visible, TRUE); | 858 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_Visible, TRUE); |
859 else | 859 else |
860 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_None); | 860 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_None); |
861 | 861 |
862 CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width, | 862 CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width, |
863 rcBBox.top + rcBBox.height); | 863 rcBBox.top + rcBBox.height); |
864 rcWidget.left -= 1.0f; | 864 rcWidget.left -= 1.0f; |
865 rcWidget.right += 1.0f; | 865 rcWidget.right += 1.0f; |
866 rcWidget.bottom -= 1.0f; | 866 rcWidget.bottom -= 1.0f; |
867 rcWidget.top += 1.0f; | 867 rcWidget.top += 1.0f; |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1170 | 1170 |
1171 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { | 1171 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { |
1172 if (m_pos < m_iteratorAnnotList.size()) | 1172 if (m_pos < m_iteratorAnnotList.size()) |
1173 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; | 1173 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; |
1174 return nullptr; | 1174 return nullptr; |
1175 } | 1175 } |
1176 | 1176 |
1177 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { | 1177 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { |
1178 return m_bReverse ? PrevAnnot() : NextAnnot(); | 1178 return m_bReverse ? PrevAnnot() : NextAnnot(); |
1179 } | 1179 } |
OLD | NEW |