From a440bb3f11f42b7a22624e9771dd8d9c57075f06 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 14 Sep 2016 07:01:54 -0700 Subject: Split CPDFXFA_Document apart [DO NOT COMMIT] This CL renames IXFA_DocProvider to IXFA_DocEnvironment to better describe the purpose. Then, CPDFXFA_Document has all of the IXFA_DocEnvironment methods removed and placed in CPDFXFA_DocEnvironment. The CPDFXFA_Document then has a CPDFXFA_DocEnvironment. This splits the code related to the document apart from the XFA callback methods to work with that document. Review-Url: https://codereview.chromium.org/2328573002 --- xfa/fxfa/app/xfa_ffnotify.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa/app/xfa_ffnotify.cpp') diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp index 09003f023c..859de5ca39 100644 --- a/xfa/fxfa/app/xfa_ffnotify.cpp +++ b/xfa/fxfa/app/xfa_ffnotify.cpp @@ -238,8 +238,8 @@ void CXFA_FFNotify::AddCalcValidate(CXFA_Node* pNode) { CXFA_FFDoc* CXFA_FFNotify::GetHDOC() { return m_pDoc; } -IXFA_DocProvider* CXFA_FFNotify::GetDocProvider() { - return m_pDoc->GetDocProvider(); +IXFA_DocEnvironment* CXFA_FFNotify::GetDocEnvironment() const { + return m_pDoc->GetDocEnvironment(); } IXFA_AppProvider* CXFA_FFNotify::GetAppProvider() { return m_pDoc->GetApp()->GetAppProvider(); @@ -444,7 +444,7 @@ void CXFA_FFNotify::OnChildAdded(CXFA_Node* pSender) { !(pDocView->m_bInLayoutStatus) && (pDocView->GetLayoutStatus() == XFA_DOCVIEW_LAYOUTSTATUS_End); if (bLayoutReady) - m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc); + m_pDoc->GetDocEnvironment()->SetChangeMark(m_pDoc); } void CXFA_FFNotify::OnChildRemoved() { @@ -456,7 +456,7 @@ void CXFA_FFNotify::OnChildRemoved() { !(pDocView->m_bInLayoutStatus) && (pDocView->GetLayoutStatus() == XFA_DOCVIEW_LAYOUTSTATUS_End); if (bLayoutReady) - m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc); + m_pDoc->GetDocEnvironment()->SetChangeMark(m_pDoc); } void CXFA_FFNotify::OnLayoutItemAdded(CXFA_LayoutProcessor* pLayout, @@ -480,7 +480,7 @@ void CXFA_FFNotify::OnLayoutItemAdded(CXFA_LayoutProcessor* pLayout, (dwStatus & (XFA_WidgetStatus_Visible | XFA_WidgetStatus_Viewable)) == (XFA_WidgetStatus_Visible | XFA_WidgetStatus_Viewable)) { pWidget->SetPageView(pNewPageView); - m_pDoc->GetDocProvider()->WidgetPostAdd(pWidget, pWidget->GetDataAcc()); + m_pDoc->GetDocEnvironment()->WidgetPostAdd(pWidget, pWidget->GetDataAcc()); } if (pDocView->GetLayoutStatus() != XFA_DOCVIEW_LAYOUTSTATUS_End || !(dwStatus & XFA_WidgetStatus_Visible)) { @@ -508,6 +508,6 @@ void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_LayoutProcessor* pLayout, return; pDocView->DeleteLayoutItem(pWidget); - m_pDoc->GetDocProvider()->WidgetPreRemove(pWidget, pWidget->GetDataAcc()); + m_pDoc->GetDocEnvironment()->WidgetPreRemove(pWidget, pWidget->GetDataAcc()); pWidget->AddInvalidateRect(nullptr); } -- cgit v1.2.3