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 <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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 if (IPDFSDK_AnnotHandler* pAnnotHandler = | 78 if (IPDFSDK_AnnotHandler* pAnnotHandler = |
79 GetAnnotHandler(FSDK_XFAWIDGET_TYPENAME)) { | 79 GetAnnotHandler(FSDK_XFAWIDGET_TYPENAME)) { |
80 return pAnnotHandler->NewAnnot(pAnnot, pPageView); | 80 return pAnnotHandler->NewAnnot(pAnnot, pPageView); |
81 } | 81 } |
82 | 82 |
83 return NULL; | 83 return NULL; |
84 } | 84 } |
85 #endif // PDF_ENABLE_XFA | 85 #endif // PDF_ENABLE_XFA |
86 | 86 |
87 void CPDFSDK_AnnotHandlerMgr::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { | 87 void CPDFSDK_AnnotHandlerMgr::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { |
88 pAnnot->GetPDFPage(); | |
89 | |
90 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { | 88 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { |
91 pAnnotHandler->OnRelease(pAnnot); | 89 pAnnotHandler->OnRelease(pAnnot); |
92 pAnnotHandler->ReleaseAnnot(pAnnot); | 90 pAnnotHandler->ReleaseAnnot(pAnnot); |
93 } else { | 91 } else { |
94 delete (CPDFSDK_Annot*)pAnnot; | 92 delete (CPDFSDK_Annot*)pAnnot; |
95 } | 93 } |
96 } | 94 } |
97 | 95 |
98 void CPDFSDK_AnnotHandlerMgr::Annot_OnCreate(CPDFSDK_Annot* pAnnot) { | 96 void CPDFSDK_AnnotHandlerMgr::Annot_OnCreate(CPDFSDK_Annot* pAnnot) { |
99 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); | 97 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); |
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 | 1097 |
1100 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { | 1098 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { |
1101 if (m_pos < m_iteratorAnnotList.size()) | 1099 if (m_pos < m_iteratorAnnotList.size()) |
1102 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; | 1100 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; |
1103 return nullptr; | 1101 return nullptr; |
1104 } | 1102 } |
1105 | 1103 |
1106 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { | 1104 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { |
1107 return m_bReverse ? PrevAnnot() : NextAnnot(); | 1105 return m_bReverse ? PrevAnnot() : NextAnnot(); |
1108 } | 1106 } |
OLD | NEW |