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 #ifndef FPDFSDK_INCLUDE_FSDK_MGR_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_MGR_H_ |
8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 nonstd::unique_ptr<IFX_SystemHandler> m_pSysHandler; | 472 nonstd::unique_ptr<IFX_SystemHandler> m_pSysHandler; |
473 }; | 473 }; |
474 | 474 |
475 class CPDFSDK_Document { | 475 class CPDFSDK_Document { |
476 public: | 476 public: |
477 CPDFSDK_Document(UnderlyingDocumentType* pDoc, CPDFDoc_Environment* pEnv); | 477 CPDFSDK_Document(UnderlyingDocumentType* pDoc, CPDFDoc_Environment* pEnv); |
478 ~CPDFSDK_Document(); | 478 ~CPDFSDK_Document(); |
479 | 479 |
480 CPDFSDK_InterForm* GetInterForm(); | 480 CPDFSDK_InterForm* GetInterForm(); |
481 | 481 |
| 482 // Gets the document object for the next layer down; for master this is |
| 483 // a CPDF_Document, but for XFA it is a CPDFXFA_Document. |
482 UnderlyingDocumentType* GetUnderlyingDocument() const { | 484 UnderlyingDocumentType* GetUnderlyingDocument() const { |
483 return GetXFADocument(); | 485 return GetXFADocument(); |
484 } | 486 } |
| 487 |
| 488 // Gets the CPDF_Document, either directly in master, or from the |
| 489 // CPDFXFA_Document for XFA. |
485 CPDF_Document* GetPDFDocument() const { | 490 CPDF_Document* GetPDFDocument() const { |
486 return m_pDoc ? m_pDoc->GetPDFDoc() : nullptr; | 491 return m_pDoc ? m_pDoc->GetPDFDoc() : nullptr; |
487 } | 492 } |
| 493 |
| 494 // Gets the XFA document directly (XFA-only). |
488 CPDFXFA_Document* GetXFADocument() const { return m_pDoc; } | 495 CPDFXFA_Document* GetXFADocument() const { return m_pDoc; } |
489 | 496 |
490 int GetPageViewCount() const { return m_pageMap.size(); } | 497 int GetPageViewCount() const { return m_pageMap.size(); } |
491 CPDFSDK_PageView* GetPageView(UnderlyingPageType* pPDFXFAPage, | 498 CPDFSDK_PageView* GetPageView(UnderlyingPageType* pPDFXFAPage, |
492 FX_BOOL ReNew = TRUE); | 499 FX_BOOL ReNew = TRUE); |
493 CPDFSDK_PageView* GetPageView(int nIndex); | 500 CPDFSDK_PageView* GetPageView(int nIndex); |
494 CPDFSDK_PageView* GetCurrentView(); | 501 CPDFSDK_PageView* GetCurrentView(); |
495 void RemovePageView(UnderlyingPageType* pPDFPage); | 502 void RemovePageView(UnderlyingPageType* pPDFPage); |
496 void UpdateAllViews(CPDFSDK_PageView* pSender, CPDFSDK_Annot* pAnnot); | 503 void UpdateAllViews(CPDFSDK_PageView* pSender, CPDFSDK_Annot* pAnnot); |
497 | 504 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 } | 689 } |
683 | 690 |
684 if (nStartPos < m) | 691 if (nStartPos < m) |
685 QuickSort(nStartPos, m, bAscend, pCompare); | 692 QuickSort(nStartPos, m, bAscend, pCompare); |
686 if (nStopPos > m) | 693 if (nStopPos > m) |
687 QuickSort(m, nStopPos, bAscend, pCompare); | 694 QuickSort(m, nStopPos, bAscend, pCompare); |
688 } | 695 } |
689 }; | 696 }; |
690 | 697 |
691 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ | 698 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ |
OLD | NEW |