diff options
Diffstat (limited to 'xfa/src')
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffnotify.cpp | 8 | ||||
-rw-r--r-- | xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp index a65819de22..9dd93f387a 100644 --- a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp @@ -615,12 +615,12 @@ void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_FFDocView* pDocView, void* pParam2) { CXFA_FFWidget* pWidget = static_cast<CXFA_FFWidget*>(pSender); pDocView->DeleteLayoutItem(pWidget); - if (pDocView->GetLayoutStatus() < XFA_DOCVIEW_LAYOUTSTATUS_End) { + if (pDocView->GetLayoutStatus() < XFA_DOCVIEW_LAYOUTSTATUS_End) return; - } m_pDoc->GetDocProvider()->WidgetEvent(pWidget, pWidget->GetDataAcc(), - XFA_WIDGETEVENT_PreRemoved, NULL, NULL); - pWidget->AddInvalidateRect(NULL); + XFA_WIDGETEVENT_PreRemoved, nullptr, + pWidget->GetPageView()); + pWidget->AddInvalidateRect(nullptr); } void CXFA_FFNotify::OnLayoutItemRectChanged(CXFA_FFDocView* pDocView, IXFA_DocLayout* pLayout, diff --git a/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp b/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp index 00908944b2..8e0a9444c5 100644 --- a/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp +++ b/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp @@ -40,14 +40,18 @@ FX_DWORD XFA_GetRelevant(CXFA_Node* pFormItem, FX_DWORD dwParentRelvant) { } void XFA_ReleaseLayoutItem(CXFA_LayoutItem* pLayoutItem) { CXFA_LayoutItem* pNode = pLayoutItem->m_pFirstChild; + IXFA_Notify* pNotify = + pLayoutItem->m_pFormNode->GetDocument()->GetParser()->GetNotify(); + IXFA_DocLayout* pDocLayout = + pLayoutItem->m_pFormNode->GetDocument()->GetDocLayout(); while (pNode) { CXFA_LayoutItem* pNext = pNode->m_pNextSibling; pNode->m_pParent = nullptr; + pNotify->OnLayoutEvent(pDocLayout, static_cast<CXFA_LayoutItem*>(pNode), + XFA_LAYOUTEVENT_ItemRemoving); XFA_ReleaseLayoutItem(pNode); pNode = pNext; } - IXFA_Notify* pNotify = - pLayoutItem->m_pFormNode->GetDocument()->GetParser()->GetNotify(); if (pLayoutItem->m_pFormNode->GetClassID() == XFA_ELEMENT_PageArea) { pNotify->OnPageEvent(static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem), XFA_PAGEEVENT_PageRemoved); |