Remove friendship between CPDFXFA_Context and CPDFXFA_DocEnvironment.
Several methods become public, but no new invasiveness.
- move one unrelated method up to group scalar/pointer returns.
Change-Id: Iebd8399c593e0bae808157680cd97e12ba77016b
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72010
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
index 762e0e1..e70632f 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
@@ -38,17 +38,27 @@
~CPDFXFA_Context() override;
bool LoadXFADoc();
+ LoadStatus GetLoadStatus() const { return m_nLoadStatus; }
+ FormType GetFormType() const { return m_FormType; }
+ int GetOriginalPageCount() const { return m_nPageCount; }
+ void SetOriginalPageCount(int count) {
+ m_nPageCount = count;
+ m_XFAPageList.resize(count);
+ }
+
CFX_XMLDocument* GetXMLDoc() { return m_pXML.get(); }
CXFA_FFDoc* GetXFADoc() { return m_pXFADoc.get(); }
CXFA_FFDocView* GetXFADocView() const { return m_pXFADocView.Get(); }
cppgc::Heap* GetGCHeap() { return m_pGCHeap.get(); }
- FormType GetFormType() const { return m_FormType; }
CPDFSDK_FormFillEnvironment* GetFormFillEnv() const {
return m_pFormFillEnv.Get();
}
void SetFormFillEnv(CPDFSDK_FormFillEnvironment* pFormFillEnv);
RetainPtr<CPDFXFA_Page> GetXFAPage(int page_index);
RetainPtr<CPDFXFA_Page> GetXFAPage(CXFA_FFPageView* pPage) const;
+ std::vector<RetainPtr<CPDFXFA_Page>>* GetXFAPageList() {
+ return &m_XFAPageList;
+ }
void ClearChangeMark();
// CPDF_Document::Extension:
@@ -94,19 +104,6 @@
std::vector<RetainPtr<IFX_SeekableStream>>* fileList);
private:
- friend class CPDFXFA_DocEnvironment;
-
- int GetOriginalPageCount() const { return m_nPageCount; }
- void SetOriginalPageCount(int count) {
- m_nPageCount = count;
- m_XFAPageList.resize(count);
- }
-
- LoadStatus GetLoadStatus() const { return m_nLoadStatus; }
- std::vector<RetainPtr<CPDFXFA_Page>>* GetXFAPageList() {
- return &m_XFAPageList;
- }
-
CJS_Runtime* GetCJSRuntime() const;
bool SavePackage(const RetainPtr<IFX_SeekableStream>& pStream,
XFA_HashCode code);