| 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 "../include/fsdk_define.h" | 9 #include "../include/fsdk_define.h" |
| 10 #include "../include/fpdfxfa/fpdfxfa_doc.h" | 10 #include "../include/fpdfxfa/fpdfxfa_doc.h" |
| (...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 | 775 |
| 776 IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); | 776 IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); |
| 777 ASSERT(pWidgetHandler != NULL); | 777 ASSERT(pWidgetHandler != NULL); |
| 778 | 778 |
| 779 CFX_Graphics gs; | 779 CFX_Graphics gs; |
| 780 gs.Create(pDevice); | 780 gs.Create(pDevice); |
| 781 | 781 |
| 782 CFX_Matrix mt; | 782 CFX_Matrix mt; |
| 783 mt = *(CFX_Matrix*)pUser2Device; | 783 mt = *(CFX_Matrix*)pUser2Device; |
| 784 | 784 |
| 785 IXFA_Widget* hWidget = pAnnot->GetXFAWidget(); | |
| 786 ASSERT(hWidget != NULL); | |
| 787 | |
| 788 FX_BOOL bIsHighlight = FALSE; | 785 FX_BOOL bIsHighlight = FALSE; |
| 789 if (pSDKDoc->GetFocusAnnot() != pAnnot) | 786 if (pSDKDoc->GetFocusAnnot() != pAnnot) |
| 790 bIsHighlight = TRUE; | 787 bIsHighlight = TRUE; |
| 791 | 788 |
| 792 pWidgetHandler->RenderWidget(pAnnot->GetXFAWidget(), &gs, &mt, bIsHighlight); | 789 pWidgetHandler->RenderWidget(pAnnot->GetXFAWidget(), &gs, &mt, bIsHighlight); |
| 793 | 790 |
| 794 // to do highlight and shadow | 791 // to do highlight and shadow |
| 795 #endif // PDF_ENABLE_XFA | 792 #endif // PDF_ENABLE_XFA |
| 796 } | 793 } |
| 797 | 794 |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 | 1188 |
| 1192 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { | 1189 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { |
| 1193 if (m_pos < m_iteratorAnnotList.size()) | 1190 if (m_pos < m_iteratorAnnotList.size()) |
| 1194 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; | 1191 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; |
| 1195 return nullptr; | 1192 return nullptr; |
| 1196 } | 1193 } |
| 1197 | 1194 |
| 1198 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { | 1195 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { |
| 1199 return m_bReverse ? PrevAnnot() : NextAnnot(); | 1196 return m_bReverse ? PrevAnnot() : NextAnnot(); |
| 1200 } | 1197 } |
| OLD | NEW |