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 "core/include/fpdfapi/cpdf_array.h" | 9 #include "core/include/fpdfapi/cpdf_array.h" |
10 #include "core/include/fpdfapi/cpdf_document.h" | 10 #include "core/include/fpdfapi/cpdf_document.h" |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 n %= 3600; | 478 n %= 3600; |
479 dt.minute = (uint8_t)(n / 60); | 479 dt.minute = (uint8_t)(n / 60); |
480 dt.second = (uint8_t)(n % 60); | 480 dt.second = (uint8_t)(n % 60); |
481 if (days != 0) | 481 if (days != 0) |
482 AddDays(days); | 482 AddDays(days); |
483 | 483 |
484 return *this; | 484 return *this; |
485 } | 485 } |
486 | 486 |
487 CPDFSDK_Annot::CPDFSDK_Annot(CPDFSDK_PageView* pPageView) | 487 CPDFSDK_Annot::CPDFSDK_Annot(CPDFSDK_PageView* pPageView) |
488 : m_pPageView(pPageView), m_bSelected(FALSE), m_nTabOrder(-1) { | 488 : m_pPageView(pPageView), m_bSelected(FALSE), m_nTabOrder(-1) {} |
489 } | |
490 | 489 |
491 CPDFSDK_BAAnnot::CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, | 490 CPDFSDK_BAAnnot::CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, |
492 CPDFSDK_PageView* pPageView) | 491 CPDFSDK_PageView* pPageView) |
493 : CPDFSDK_Annot(pPageView), m_pAnnot(pAnnot) { | 492 : CPDFSDK_Annot(pPageView), m_pAnnot(pAnnot) {} |
494 } | |
495 | 493 |
496 CPDF_Annot* CPDFSDK_BAAnnot::GetPDFAnnot() const { | 494 CPDF_Annot* CPDFSDK_BAAnnot::GetPDFAnnot() const { |
497 return m_pAnnot; | 495 return m_pAnnot; |
498 } | 496 } |
499 | 497 |
500 FX_BOOL CPDFSDK_Annot::IsSelected() { | 498 FX_BOOL CPDFSDK_Annot::IsSelected() { |
501 return m_bSelected; | 499 return m_bSelected; |
502 } | 500 } |
503 | 501 |
504 void CPDFSDK_Annot::SetSelected(FX_BOOL bSelected) { | 502 void CPDFSDK_Annot::SetSelected(FX_BOOL bSelected) { |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 | 957 |
960 CPDF_Page* CPDFSDK_Annot::GetPDFPage() { | 958 CPDF_Page* CPDFSDK_Annot::GetPDFPage() { |
961 return m_pPageView ? m_pPageView->GetPDFPage() : nullptr; | 959 return m_pPageView ? m_pPageView->GetPDFPage() : nullptr; |
962 } | 960 } |
963 | 961 |
964 #ifdef PDF_ENABLE_XFA | 962 #ifdef PDF_ENABLE_XFA |
965 CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() { | 963 CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() { |
966 return m_pPageView ? m_pPageView->GetPDFXFAPage() : nullptr; | 964 return m_pPageView ? m_pPageView->GetPDFXFAPage() : nullptr; |
967 } | 965 } |
968 #endif // PDF_ENABLE_XFA | 966 #endif // PDF_ENABLE_XFA |
OLD | NEW |