summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_ffdocview.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-09-14 07:01:54 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-14 07:01:54 -0700
commita440bb3f11f42b7a22624e9771dd8d9c57075f06 (patch)
treec3dfde4e22bb2a2c4413e55d11dc89daaa1a3fb2 /xfa/fxfa/app/xfa_ffdocview.cpp
parentf2662c4a0bdfbe52d961ab4d2ff9a448323c3af9 (diff)
downloadpdfium-a440bb3f11f42b7a22624e9771dd8d9c57075f06.tar.xz
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
Diffstat (limited to 'xfa/fxfa/app/xfa_ffdocview.cpp')
-rw-r--r--xfa/fxfa/app/xfa_ffdocview.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index 0efdef6db1..7dff9d44f4 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -250,7 +250,7 @@ void CXFA_FFDocView::ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc) {
}
}
if (bChanged) {
- m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc);
+ m_pDoc->GetDocEnvironment()->SetChangeMark(m_pDoc);
}
}
int32_t CXFA_FFDocView::ProcessWidgetEvent(CXFA_EventParam* pParam,
@@ -387,7 +387,7 @@ void CXFA_FFDocView::SetFocusWidgetAcc(CXFA_WidgetAcc* pWidgetAcc) {
if (SetFocus(pNewFocus)) {
m_pFocusAcc = pWidgetAcc;
if (m_iStatus == XFA_DOCVIEW_LAYOUTSTATUS_End) {
- m_pDoc->GetDocProvider()->SetFocusWidget(m_pDoc, m_pFocusWidget);
+ m_pDoc->GetDocEnvironment()->SetFocusWidget(m_pDoc, m_pFocusWidget);
}
}
}
@@ -412,7 +412,7 @@ static int32_t XFA_ProcessEvent(CXFA_FFDocView* pDocView,
return pWidgetAcc->ProcessCalculate();
case XFA_EVENT_Validate:
if (((CXFA_FFDoc*)pDocView->GetDoc())
- ->GetDocProvider()
+ ->GetDocEnvironment()
->IsValidationsEnabled(pDocView->GetDoc())) {
return pWidgetAcc->ProcessValidate(0x01);
}
@@ -526,7 +526,7 @@ CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(
void CXFA_FFDocView::OnPageEvent(CXFA_ContainerLayoutItem* pSender,
uint32_t dwEvent) {
CXFA_FFPageView* pFFPageView = static_cast<CXFA_FFPageView*>(pSender);
- m_pDoc->GetDocProvider()->PageViewEvent(pFFPageView, dwEvent);
+ m_pDoc->GetDocEnvironment()->PageViewEvent(pFFPageView, dwEvent);
}
void CXFA_FFDocView::LockUpdate() {
@@ -560,7 +560,7 @@ void CXFA_FFDocView::AddInvalidateRect(CXFA_FFPageView* pPageView,
void CXFA_FFDocView::RunInvalidate() {
for (const auto& pair : m_mapPageInvalidate)
- m_pDoc->GetDocProvider()->InvalidateRect(pair.first, *pair.second, 0);
+ m_pDoc->GetDocEnvironment()->InvalidateRect(pair.first, *pair.second, 0);
m_mapPageInvalidate.clear();
}
@@ -572,13 +572,13 @@ FX_BOOL CXFA_FFDocView::RunLayout() {
m_pXFADocLayout->DoLayout();
UnlockUpdate();
m_bInLayoutStatus = FALSE;
- m_pDoc->GetDocProvider()->PageViewEvent(nullptr,
- XFA_PAGEVIEWEVENT_StopLayout);
+ m_pDoc->GetDocEnvironment()->PageViewEvent(nullptr,
+ XFA_PAGEVIEWEVENT_StopLayout);
return TRUE;
}
m_bInLayoutStatus = FALSE;
- m_pDoc->GetDocProvider()->PageViewEvent(nullptr,
- XFA_PAGEVIEWEVENT_StopLayout);
+ m_pDoc->GetDocEnvironment()->PageViewEvent(nullptr,
+ XFA_PAGEVIEWEVENT_StopLayout);
UnlockUpdate();
return FALSE;
}
@@ -671,7 +671,7 @@ void CXFA_FFDocView::RunCalculateRecursive(int32_t& iIndex) {
}
}
int32_t CXFA_FFDocView::RunCalculateWidgets() {
- if (!m_pDoc->GetDocProvider()->IsCalculationsEnabled(m_pDoc)) {
+ if (!m_pDoc->GetDocEnvironment()->IsCalculationsEnabled(m_pDoc)) {
return XFA_EVENTERROR_Disabled;
}
int32_t iCounts = m_CalculateAccs.GetSize();
@@ -696,7 +696,7 @@ FX_BOOL CXFA_FFDocView::InitCalculate(CXFA_Node* pNode) {
return TRUE;
}
FX_BOOL CXFA_FFDocView::InitValidate(CXFA_Node* pNode) {
- if (!m_pDoc->GetDocProvider()->IsValidationsEnabled(m_pDoc)) {
+ if (!m_pDoc->GetDocEnvironment()->IsValidationsEnabled(m_pDoc)) {
return FALSE;
}
ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Validate, FALSE, TRUE, nullptr);
@@ -704,7 +704,7 @@ FX_BOOL CXFA_FFDocView::InitValidate(CXFA_Node* pNode) {
return TRUE;
}
FX_BOOL CXFA_FFDocView::RunValidate() {
- if (!m_pDoc->GetDocProvider()->IsValidationsEnabled(m_pDoc)) {
+ if (!m_pDoc->GetDocEnvironment()->IsValidationsEnabled(m_pDoc)) {
return FALSE;
}
int32_t iCounts = m_ValidateAccs.GetSize();
@@ -798,7 +798,7 @@ void CXFA_FFDocView::SetChangeMark() {
if (m_iStatus < XFA_DOCVIEW_LAYOUTSTATUS_End) {
return;
}
- m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc);
+ m_pDoc->GetDocEnvironment()->SetChangeMark(m_pDoc);
}
CXFA_Node* CXFA_FFDocView::GetRootSubform() {
CXFA_Node* pFormPacketNode =