Chromium Code Reviews| 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 | 88 |
|
Tom Sepez
2016/03/02 20:29:21
nit: no blank line here.
| |
| 90 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { | 89 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { |
| 91 pAnnotHandler->OnRelease(pAnnot); | 90 pAnnotHandler->OnRelease(pAnnot); |
| 92 pAnnotHandler->ReleaseAnnot(pAnnot); | 91 pAnnotHandler->ReleaseAnnot(pAnnot); |
| 93 } else { | 92 } else { |
| 94 delete (CPDFSDK_Annot*)pAnnot; | 93 delete (CPDFSDK_Annot*)pAnnot; |
| 95 } | 94 } |
| 96 } | 95 } |
| 97 | 96 |
| 98 void CPDFSDK_AnnotHandlerMgr::Annot_OnCreate(CPDFSDK_Annot* pAnnot) { | 97 void CPDFSDK_AnnotHandlerMgr::Annot_OnCreate(CPDFSDK_Annot* pAnnot) { |
| 99 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); | 98 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1099 | 1098 |
| 1100 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { | 1099 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { |
| 1101 if (m_pos < m_iteratorAnnotList.size()) | 1100 if (m_pos < m_iteratorAnnotList.size()) |
| 1102 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; | 1101 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; |
| 1103 return nullptr; | 1102 return nullptr; |
| 1104 } | 1103 } |
| 1105 | 1104 |
| 1106 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { | 1105 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { |
| 1107 return m_bReverse ? PrevAnnot() : NextAnnot(); | 1106 return m_bReverse ? PrevAnnot() : NextAnnot(); |
| 1108 } | 1107 } |
| OLD | NEW |