Example #1
0
void CXFA_FFDocView::OnPageEvent(IXFA_LayoutPage* pSender,
                                 XFA_PAGEEVENT eEvent,
                                 int32_t iPageIndex) {
  CXFA_FFPageView* pFFPageView = static_cast<CXFA_FFPageView*>(pSender);
  if (eEvent == XFA_PAGEEVENT_PageRemoved) {
      m_pDoc->GetDocProvider()->PageViewEvent(pFFPageView,
                                              XFA_PAGEVIEWEVENT_PostRemoved);
      return;
  }
  m_pDoc->GetDocProvider()->PageViewEvent(pFFPageView,
                                          XFA_PAGEVIEWEVENT_PostAdded);
  pFFPageView->LoadPageView();
}
Example #2
0
void CXFA_FFDocView::OnPageEvent(IXFA_LayoutPage* pSender,
                                 XFA_PAGEEVENT eEvent,
                                 int32_t iPageIndex) {
  FX_BOOL bNofify = m_iStatus >= XFA_DOCVIEW_LAYOUTSTATUS_End;
  CXFA_FFPageView* pFFPageView = static_cast<CXFA_FFPageView*>(pSender);
  if (eEvent == XFA_PAGEEVENT_PageRemoved) {
    if (bNofify) {
      m_pDoc->GetDocProvider()->PageViewEvent(pFFPageView,
                                              XFA_PAGEVIEWEVENT_PostRemoved);
    }
  } else if (eEvent == XFA_PAGEEVENT_PageAdded) {
    if (bNofify) {
      m_pDoc->GetDocProvider()->PageViewEvent(pFFPageView,
                                              XFA_PAGEVIEWEVENT_PostAdded);
      pFFPageView->LoadPageView();
    }
  }
}