diff options
Diffstat (limited to 'xfa/fxfa/parser/cxfa_layoutpagemgr.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_layoutpagemgr.cpp | 141 |
1 files changed, 74 insertions, 67 deletions
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp index c6b76b88cc..b6c95c1d56 100644 --- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp +++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp @@ -38,13 +38,13 @@ class PageSetContainerLayoutItem { public: static CXFA_ContainerLayoutItem* GetFirstChild( CXFA_ContainerLayoutItem* pLayoutItem) { - if (pLayoutItem->m_pFormNode->GetElementType() != XFA_Element::PageSet) + if (pLayoutItem->GetFormNode()->GetElementType() != XFA_Element::PageSet) return nullptr; CXFA_ContainerLayoutItem* pChildItem = static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem->m_pFirstChild); - while (pChildItem && - pChildItem->m_pFormNode->GetElementType() != XFA_Element::PageSet) { + while (pChildItem && pChildItem->GetFormNode()->GetElementType() != + XFA_Element::PageSet) { pChildItem = static_cast<CXFA_ContainerLayoutItem*>(pChildItem->m_pNextSibling); } @@ -55,8 +55,8 @@ class PageSetContainerLayoutItem { CXFA_ContainerLayoutItem* pLayoutItem) { CXFA_ContainerLayoutItem* pChildItem = static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem->m_pNextSibling); - while (pChildItem && - pChildItem->m_pFormNode->GetElementType() != XFA_Element::PageSet) { + while (pChildItem && pChildItem->GetFormNode()->GetElementType() != + XFA_Element::PageSet) { pChildItem = static_cast<CXFA_ContainerLayoutItem*>(pChildItem->m_pNextSibling); } @@ -103,13 +103,15 @@ void SyncContainer(CXFA_FFNotify* pNotify, uint32_t dwRelevantContainer = 0; if (bVisible) { XFA_AttributeEnum eAttributeValue = - pContainerItem->m_pFormNode->JSObject() + pContainerItem->GetFormNode() + ->JSObject() ->TryEnum(XFA_Attribute::Presence, true) .value_or(XFA_AttributeEnum::Visible); if (eAttributeValue == XFA_AttributeEnum::Visible) bVisibleItem = true; - dwRelevantContainer = GetRelevant(pContainerItem->m_pFormNode, dwRelevant); + dwRelevantContainer = + GetRelevant(pContainerItem->GetFormNode(), dwRelevant); dwStatus = (bVisibleItem ? XFA_WidgetStatus_Visible : 0) | dwRelevantContainer; } @@ -211,7 +213,7 @@ bool CheckContentAreaNotUsed( pPageAreaLayoutItem->m_pFirstChild); pLayoutItem; pLayoutItem = static_cast<CXFA_ContainerLayoutItem*>( pLayoutItem->m_pNextSibling)) { - if (pLayoutItem->m_pFormNode == pContentArea) { + if (pLayoutItem->GetFormNode() == pContentArea) { if (!pLayoutItem->m_pFirstChild) { pContentAreaLayoutItem = pLayoutItem; return true; @@ -299,7 +301,7 @@ bool CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) { m_pPageSetLayoutItemRoot->m_pParent = nullptr; m_pPageSetLayoutItemRoot->m_pFirstChild = nullptr; m_pPageSetLayoutItemRoot->m_pNextSibling = nullptr; - m_pPageSetLayoutItemRoot->m_pFormNode = m_pTemplatePageSetRoot; + m_pPageSetLayoutItemRoot->SetFormNode(m_pTemplatePageSetRoot); } else { m_pPageSetLayoutItemRoot = new CXFA_ContainerLayoutItem(m_pTemplatePageSetRoot); @@ -480,17 +482,18 @@ void CXFA_LayoutPageMgr::SubmitContentItem( AppendNewPage(); } m_CurrentContainerRecordIter = GetTailPosition(); - m_pCurPageArea = GetCurrentContainerRecord()->pCurPageArea->m_pFormNode; + m_pCurPageArea = GetCurrentContainerRecord()->pCurPageArea->GetFormNode(); } } float CXFA_LayoutPageMgr::GetAvailHeight() { CXFA_ContainerLayoutItem* pLayoutItem = GetCurrentContainerRecord()->pCurContentArea; - if (!pLayoutItem || !pLayoutItem->m_pFormNode) + if (!pLayoutItem || !pLayoutItem->GetFormNode()) return 0.0f; - float fAvailHeight = pLayoutItem->m_pFormNode->JSObject() + float fAvailHeight = pLayoutItem->GetFormNode() + ->JSObject() ->GetMeasure(XFA_Attribute::H) .ToUnit(XFA_Unit::Pt); if (fAvailHeight >= XFA_LAYOUT_FLOAT_PERCISION) @@ -525,7 +528,7 @@ CXFA_ContainerRecord* CXFA_LayoutPageMgr::CreateContainerRecord( } } else { CXFA_ContainerLayoutItem* pParentPageSetLayout = nullptr; - if (pPageSet == GetCurrentContainerRecord()->pCurPageSet->m_pFormNode) { + if (pPageSet == GetCurrentContainerRecord()->pCurPageSet->GetFormNode()) { pParentPageSetLayout = static_cast<CXFA_ContainerLayoutItem*>( GetCurrentContainerRecord()->pCurPageSet->m_pParent); } else { @@ -574,7 +577,7 @@ void CXFA_LayoutPageMgr::AddPageAreaLayoutItem(CXFA_ContainerRecord* pNewRecord, CXFA_ContainerLayoutItem* pNewPageAreaLayoutItem = nullptr; if (pdfium::IndexInBounds(m_PageArray, m_nAvailPages)) { CXFA_ContainerLayoutItem* pContainerItem = m_PageArray[m_nAvailPages]; - pContainerItem->m_pFormNode = pNewPageArea; + pContainerItem->SetFormNode(pNewPageArea); m_nAvailPages++; pNewPageAreaLayoutItem = pContainerItem; } else { @@ -615,7 +618,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() { for (CXFA_ContainerLayoutItem* pPageSetLayoutItem = sIterator.GetCurrent(); pPageSetLayoutItem; pPageSetLayoutItem = sIterator.MoveToNext()) { XFA_AttributeEnum ePageRelation = - pPageSetLayoutItem->m_pFormNode->JSObject()->GetEnum( + pPageSetLayoutItem->GetFormNode()->JSObject()->GetEnum( XFA_Attribute::Relation); switch (ePageRelation) { case XFA_AttributeEnum::OrderedOccurrence: @@ -628,7 +631,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() { pPageSetLayoutItem->m_pFirstChild; pPageAreaLayoutItem; pPageAreaLayoutItem = pPageAreaLayoutItem->m_pNextSibling) { - if (pPageAreaLayoutItem->m_pFormNode->GetElementType() != + if (pPageAreaLayoutItem->GetFormNode()->GetElementType() != XFA_Element::PageArea) { continue; } @@ -639,13 +642,13 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() { break; if (!FindPageAreaFromPageSet_SimplexDuplex( - pPageSetLayoutItem->m_pFormNode, nullptr, nullptr, nullptr, + pPageSetLayoutItem->GetFormNode(), nullptr, nullptr, nullptr, true, true, nPageAreaCount == 1 ? XFA_AttributeEnum::Only : XFA_AttributeEnum::Last) && (nPageAreaCount == 1 && !FindPageAreaFromPageSet_SimplexDuplex( - pPageSetLayoutItem->m_pFormNode, nullptr, nullptr, nullptr, + pPageSetLayoutItem->GetFormNode(), nullptr, nullptr, nullptr, true, true, XFA_AttributeEnum::Last))) { break; } @@ -656,7 +659,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() { XFA_AttributeEnum eOddOrEven = pNode->JSObject()->GetEnum(XFA_Attribute::OddOrEven); XFA_AttributeEnum eLastChoice = - pLastPageAreaLayoutItem->m_pFormNode->JSObject()->GetEnum( + pLastPageAreaLayoutItem->GetFormNode()->JSObject()->GetEnum( XFA_Attribute::PagePosition); if (eLastChoice == XFA_AttributeEnum::First && (ePageRelation == XFA_AttributeEnum::SimplexPaginated || @@ -672,7 +675,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() { pLastPageAreaLayoutItem->m_pFirstChild; pChildLayoutItem; pChildLayoutItem = pChildLayoutItem->m_pNextSibling) { - if (pChildLayoutItem->m_pFormNode->GetElementType() != + if (pChildLayoutItem->GetFormNode()->GetElementType() != XFA_Element::ContentArea) { continue; } @@ -711,9 +714,9 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() { CXFA_LayoutItem* pChildLayoutItem = pLastPageAreaLayoutItem->m_pFirstChild; CXFA_Node* pContentAreaNode = pNode->GetFirstChild(); - pLastPageAreaLayoutItem->m_pFormNode = pNode; + pLastPageAreaLayoutItem->SetFormNode(pNode); while (pChildLayoutItem && pContentAreaNode) { - if (pChildLayoutItem->m_pFormNode->GetElementType() != + if (pChildLayoutItem->GetFormNode()->GetElementType() != XFA_Element::ContentArea) { pChildLayoutItem = pChildLayoutItem->m_pNextSibling; continue; @@ -723,7 +726,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() { pContentAreaNode = pContentAreaNode->GetNextSibling(); continue; } - pChildLayoutItem->m_pFormNode = pContentAreaNode; + pChildLayoutItem->SetFormNode(pContentAreaNode); pChildLayoutItem = pChildLayoutItem->m_pNextSibling; pContentAreaNode = pContentAreaNode->GetNextSibling(); } @@ -766,7 +769,7 @@ bool CXFA_LayoutPageMgr::RunBreak(XFA_Element eBreakType, if (!pTarget || m_CurrentContainerRecordIter == m_ProposedContainerRecords.end() || pTarget != - GetCurrentContainerRecord()->pCurContentArea->m_pFormNode || + GetCurrentContainerRecord()->pCurContentArea->GetFormNode() || bStartNew) { CXFA_Node* pPageArea = nullptr; if (pTarget) @@ -781,7 +784,7 @@ bool CXFA_LayoutPageMgr::RunBreak(XFA_Element eBreakType, pTarget = nullptr; if (!pTarget || m_CurrentContainerRecordIter == m_ProposedContainerRecords.end() || - pTarget != GetCurrentContainerRecord()->pCurPageArea->m_pFormNode || + pTarget != GetCurrentContainerRecord()->pCurPageArea->GetFormNode() || bStartNew) { CXFA_Node* pPageArea = GetNextAvailPageArea(pTarget, nullptr, true); bRet = !!pPageArea; @@ -1385,7 +1388,7 @@ CXFA_Node* CXFA_LayoutPageMgr::GetNextAvailPageArea( bool CXFA_LayoutPageMgr::GetNextContentArea(CXFA_Node* pContentArea) { CXFA_Node* pCurContentNode = - GetCurrentContainerRecord()->pCurContentArea->m_pFormNode; + GetCurrentContainerRecord()->pCurContentArea->GetFormNode(); if (!pContentArea) { pContentArea = pCurContentNode->GetNextSameClassSibling<CXFA_ContentArea>( XFA_Element::ContentArea); @@ -1401,7 +1404,7 @@ bool CXFA_LayoutPageMgr::GetNextContentArea(CXFA_Node* pContentArea) { return false; } if (pContentAreaLayout) { - if (pContentAreaLayout->m_pFormNode != pCurContentNode) { + if (pContentAreaLayout->GetFormNode() != pCurContentNode) { CXFA_ContainerRecord* pNewRecord = CreateContainerRecord(); pNewRecord->pCurContentArea = pContentAreaLayout; return true; @@ -1531,7 +1534,7 @@ void CXFA_LayoutPageMgr::ProcessLastPageSet() { bool CXFA_LayoutPageMgr::GetNextAvailContentHeight(float fChildHeight) { CXFA_Node* pCurContentNode = - GetCurrentContainerRecord()->pCurContentArea->m_pFormNode; + GetCurrentContainerRecord()->pCurContentArea->GetFormNode(); if (!pCurContentNode) return false; @@ -1544,7 +1547,8 @@ bool CXFA_LayoutPageMgr::GetNextAvailContentHeight(float fChildHeight) { return fNextContentHeight > fChildHeight; } - CXFA_Node* pPageNode = GetCurrentContainerRecord()->pCurPageArea->m_pFormNode; + CXFA_Node* pPageNode = + GetCurrentContainerRecord()->pCurPageArea->GetFormNode(); CXFA_Node* pOccurNode = pPageNode->GetFirstChildByClass<CXFA_Occur>(XFA_Element::Occur); int32_t iMax = 0; @@ -1622,7 +1626,7 @@ void CXFA_LayoutPageMgr::SaveLayoutItem(CXFA_LayoutItem* pParentLayoutItem) { while (pCurLayoutItem) { pNextLayoutItem = pCurLayoutItem->m_pNextSibling; if (pCurLayoutItem->IsContentLayoutItem()) { - if (pCurLayoutItem->m_pFormNode->HasRemovedChildren()) { + if (pCurLayoutItem->GetFormNode()->HasRemovedChildren()) { CXFA_FFNotify* pNotify = m_pTemplatePageSetRoot->GetDocument()->GetNotify(); CXFA_LayoutProcessor* pDocLayout = @@ -1636,9 +1640,9 @@ void CXFA_LayoutPageMgr::SaveLayoutItem(CXFA_LayoutItem* pParentLayoutItem) { continue; } - if (pCurLayoutItem->m_pFormNode->IsLayoutGeneratedNode()) { + if (pCurLayoutItem->GetFormNode()->IsLayoutGeneratedNode()) { CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFANode> - sIterator(pCurLayoutItem->m_pFormNode); + sIterator(pCurLayoutItem->GetFormNode()); for (CXFA_Node* pNode = sIterator.GetCurrent(); pNode; pNode = sIterator.MoveToNext()) { pNode->SetFlag(XFA_NodeFlag_UnusedNode); @@ -1653,7 +1657,7 @@ void CXFA_LayoutPageMgr::SaveLayoutItem(CXFA_LayoutItem* pParentLayoutItem) { pCurLayoutItem->m_pNextSibling = nullptr; pCurLayoutItem->m_pFirstChild = nullptr; if (!pCurLayoutItem->IsContentLayoutItem() && - pCurLayoutItem->m_pFormNode->GetElementType() != + pCurLayoutItem->GetFormNode()->GetElementType() != XFA_Element::PageArea) { delete pCurLayoutItem; } @@ -1714,7 +1718,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { CXFA_TraverseStrategy_ContentAreaContainerLayoutItem> iterator(pRootLayout); CXFA_ContainerLayoutItem* pRootPageSetContainerItem = iterator.GetCurrent(); - ASSERT(pRootPageSetContainerItem->m_pFormNode->GetElementType() == + ASSERT(pRootPageSetContainerItem->GetFormNode()->GetElementType() == XFA_Element::PageSet); if (iIndex < pdfium::CollectionSize<int32_t>(pDocument->m_pPendingPageSet)) { @@ -1722,44 +1726,45 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { iIndex++; } if (!pPendingPageSet) { - if (pRootPageSetContainerItem->m_pFormNode->GetPacketType() == + if (pRootPageSetContainerItem->GetFormNode()->GetPacketType() == XFA_PacketType::Template) { pPendingPageSet = - pRootPageSetContainerItem->m_pFormNode->CloneTemplateToForm(false); + pRootPageSetContainerItem->GetFormNode()->CloneTemplateToForm( + false); } else { - pPendingPageSet = pRootPageSetContainerItem->m_pFormNode; + pPendingPageSet = pRootPageSetContainerItem->GetFormNode(); } } - if (pRootPageSetContainerItem->m_pFormNode->JSObject()->GetLayoutItem() == + if (pRootPageSetContainerItem->GetFormNode()->JSObject()->GetLayoutItem() == pRootPageSetContainerItem) { - pRootPageSetContainerItem->m_pFormNode->JSObject()->SetLayoutItem( + pRootPageSetContainerItem->GetFormNode()->JSObject()->SetLayoutItem( nullptr); } - pRootPageSetContainerItem->m_pFormNode = pPendingPageSet; + pRootPageSetContainerItem->SetFormNode(pPendingPageSet); pPendingPageSet->ClearFlag(XFA_NodeFlag_UnusedNode); for (CXFA_ContainerLayoutItem* pContainerItem = iterator.MoveToNext(); pContainerItem; pContainerItem = iterator.MoveToNext()) { - CXFA_Node* pNode = pContainerItem->m_pFormNode; + CXFA_Node* pNode = pContainerItem->GetFormNode(); if (pNode->GetPacketType() != XFA_PacketType::Template) continue; switch (pNode->GetElementType()) { case XFA_Element::PageSet: { - CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode; - pContainerItem->m_pFormNode = XFA_NodeMerge_CloneOrMergeContainer( - pDocument, pParentNode, pContainerItem->m_pFormNode, true, - nullptr); + CXFA_Node* pParentNode = pContainerItem->m_pParent->GetFormNode(); + pContainerItem->SetFormNode(XFA_NodeMerge_CloneOrMergeContainer( + pDocument, pParentNode, pContainerItem->GetFormNode(), true, + nullptr)); break; } case XFA_Element::PageArea: { CXFA_LayoutItem* pFormLayout = pContainerItem; - CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode; + CXFA_Node* pParentNode = pContainerItem->m_pParent->GetFormNode(); bool bIsExistForm = true; for (int32_t iLevel = 0; iLevel < 3; iLevel++) { pFormLayout = pFormLayout->m_pFirstChild; if (iLevel == 2) { while (pFormLayout && - !pFormLayout->m_pFormNode->PresenceRequiresSpace()) { + !pFormLayout->GetFormNode()->PresenceRequiresSpace()) { pFormLayout = pFormLayout->m_pNextSibling; } } @@ -1769,12 +1774,12 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { } } if (bIsExistForm) { - CXFA_Node* pNewSubform = pFormLayout->m_pFormNode; + CXFA_Node* pNewSubform = pFormLayout->GetFormNode(); if (pContainerItem->m_pOldSubform && pContainerItem->m_pOldSubform != pNewSubform) { CXFA_Node* pExistingNode = XFA_DataMerge_FindFormDOMInstance( - pDocument, pContainerItem->m_pFormNode->GetElementType(), - pContainerItem->m_pFormNode->GetNameHash(), pParentNode); + pDocument, pContainerItem->GetFormNode()->GetElementType(), + pContainerItem->GetFormNode()->GetNameHash(), pParentNode); CXFA_ContainerIterator sIterator(pExistingNode); for (CXFA_Node* pIter = sIterator.GetCurrent(); pIter; pIter = sIterator.MoveToNext()) { @@ -1793,21 +1798,21 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { } pContainerItem->m_pOldSubform = pNewSubform; } - pContainerItem->m_pFormNode = pDocument->DataMerge_CopyContainer( - pContainerItem->m_pFormNode, pParentNode, + pContainerItem->SetFormNode(pDocument->DataMerge_CopyContainer( + pContainerItem->GetFormNode(), pParentNode, ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Record)), true, true, - true); + true)); break; } case XFA_Element::ContentArea: { - CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode; + CXFA_Node* pParentNode = pContainerItem->m_pParent->GetFormNode(); for (CXFA_Node* pChildNode = pParentNode->GetFirstChild(); pChildNode; pChildNode = pChildNode->GetNextSibling()) { if (pChildNode->GetTemplateNodeIfExists() != - pContainerItem->m_pFormNode) { + pContainerItem->GetFormNode()) { continue; } - pContainerItem->m_pFormNode = pChildNode; + pContainerItem->SetFormNode(pChildNode); break; } break; @@ -1827,7 +1832,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { pPendingPageSet->SetFlagAndNotify(XFA_NodeFlag_Initialized); } - CXFA_Node* pPageSet = GetRootLayoutItem()->m_pFormNode; + CXFA_Node* pPageSet = GetRootLayoutItem()->GetFormNode(); while (pPageSet) { CXFA_Node* pNextPageSet = pPageSet->GetNextSameClassSibling<CXFA_PageSet>(XFA_Element::PageSet); @@ -1884,7 +1889,7 @@ void CXFA_LayoutPageMgr::LayoutPageSetContents() { iterator(pRootLayoutItem); for (CXFA_ContainerLayoutItem* pContainerItem = iterator.GetCurrent(); pContainerItem; pContainerItem = iterator.MoveToNext()) { - CXFA_Node* pNode = pContainerItem->m_pFormNode; + CXFA_Node* pNode = pContainerItem->GetFormNode(); switch (pNode->GetElementType()) { case XFA_Element::PageArea: m_pLayoutProcessor->GetRootRootItemLayoutProcessor() @@ -1912,7 +1917,7 @@ void CXFA_LayoutPageMgr::SyncLayoutData() { iteratorParent(pRootLayoutItem); for (CXFA_ContainerLayoutItem* pContainerItem = iteratorParent.GetCurrent(); pContainerItem; pContainerItem = iteratorParent.MoveToNext()) { - switch (pContainerItem->m_pFormNode->GetElementType()) { + switch (pContainerItem->GetFormNode()->GetElementType()) { case XFA_Element::PageArea: { nPageIdx++; uint32_t dwRelevant = @@ -1930,12 +1935,13 @@ void CXFA_LayoutPageMgr::SyncLayoutData() { } XFA_AttributeEnum presence = - pContentItem->m_pFormNode->JSObject() + pContentItem->GetFormNode() + ->JSObject() ->TryEnum(XFA_Attribute::Presence, true) .value_or(XFA_AttributeEnum::Visible); bool bVisible = presence == XFA_AttributeEnum::Visible; uint32_t dwRelevantChild = - GetRelevant(pContentItem->m_pFormNode, dwRelevant); + GetRelevant(pContentItem->GetFormNode(), dwRelevant); SyncContainer(pNotify, m_pLayoutProcessor, pContentItem, dwRelevantChild, bVisible, nPageIdx); pChildLayoutItem = iterator.SkipChildrenAndMoveToNext(); @@ -1966,7 +1972,7 @@ void XFA_ReleaseLayoutItem_NoPageArea(CXFA_LayoutItem* pLayoutItem) { XFA_ReleaseLayoutItem_NoPageArea(pNode); pNode = pNext; } - if (pLayoutItem->m_pFormNode->GetElementType() != XFA_Element::PageArea) + if (pLayoutItem->GetFormNode()->GetElementType() != XFA_Element::PageArea) delete pLayoutItem; } @@ -1980,9 +1986,9 @@ void CXFA_LayoutPageMgr::PrepareLayout() { CXFA_ContainerLayoutItem* pRootLayoutItem = m_pPageSetLayoutItemRoot; if (pRootLayoutItem && - pRootLayoutItem->m_pFormNode->GetPacketType() == XFA_PacketType::Form) { - CXFA_Node* pPageSetFormNode = pRootLayoutItem->m_pFormNode; - pRootLayoutItem->m_pFormNode->GetDocument()->m_pPendingPageSet.clear(); + pRootLayoutItem->GetFormNode()->GetPacketType() == XFA_PacketType::Form) { + CXFA_Node* pPageSetFormNode = pRootLayoutItem->GetFormNode(); + pRootLayoutItem->GetFormNode()->GetDocument()->m_pPendingPageSet.clear(); if (pPageSetFormNode->HasRemovedChildren()) { XFA_ReleaseLayoutItem(pRootLayoutItem); m_pPageSetLayoutItemRoot = nullptr; @@ -1995,8 +2001,9 @@ void CXFA_LayoutPageMgr::PrepareLayout() { pPageSetFormNode->GetNextSameClassSibling<CXFA_PageSet>( XFA_Element::PageSet); pPageSetFormNode->GetParent()->RemoveChild(pPageSetFormNode, false); - pRootLayoutItem->m_pFormNode->GetDocument()->m_pPendingPageSet.push_back( - pPageSetFormNode); + pRootLayoutItem->GetFormNode() + ->GetDocument() + ->m_pPendingPageSet.push_back(pPageSetFormNode); pPageSetFormNode = pNextPageSet; } } |