Replace XFA_HWIDGET with IXFA_Widget*
[pdfium.git] / xfa / src / fxfa / src / app / xfa_ffdocview.cpp
index bb6a5ce..7f80c41 100644 (file)
@@ -222,9 +222,9 @@ IXFA_PageView* CXFA_FFDocView::GetPageView(FX_INT32 nIndex)
     }\r
     return (CXFA_FFPageView*)m_pXFADocLayout->GetPage(nIndex);\r
 }\r
-XFA_HWIDGET CXFA_FFDocView::GetWidgetByName(FX_WSTR wsName)\r
+IXFA_Widget* CXFA_FFDocView::GetWidgetByName(FX_WSTR wsName)\r
 {\r
-    return (XFA_HWIDGET)GetWidgetByName(wsName, NULL);\r
+    return GetWidgetByName(wsName, NULL);\r
 }\r
 CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(FX_WSTR wsName)\r
 {\r
@@ -277,7 +277,7 @@ void CXFA_FFDocView::ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc )
         }\r
     }\r
     if (bChanged) {\r
-        m_pDoc->GetDocProvider()->SetChangeMark((XFA_HDOC)m_pDoc);\r
+        m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc);\r
     }\r
 }\r
 FX_INT32 CXFA_FFDocView::ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc )\r
@@ -353,9 +353,9 @@ IXFA_WidgetAccIterator* CXFA_FFDocView::CreateWidgetAccIterator(XFA_WIDGETORDER
     }\r
     return FX_NEW CXFA_WidgetAccIterator(this, pFormRoot);\r
 }\r
-XFA_HWIDGET CXFA_FFDocView::GetFocusWidget()\r
+IXFA_Widget* CXFA_FFDocView::GetFocusWidget()\r
 {\r
-    return (XFA_HWIDGET)m_pFocusWidget;\r
+    return m_pFocusWidget;\r
 }\r
 void CXFA_FFDocView::KillFocus()\r
 {\r
@@ -366,7 +366,7 @@ void CXFA_FFDocView::KillFocus()
     m_pFocusWidget = NULL;\r
     m_pOldFocusWidget = NULL;\r
 }\r
-FX_BOOL CXFA_FFDocView::SetFocus(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFDocView::SetFocus(IXFA_Widget* hWidget)\r
 {\r
     CXFA_FFWidget* pNewFocus = (CXFA_FFWidget*)hWidget;\r
     if (m_pOldFocusWidget == pNewFocus) {\r
@@ -416,10 +416,10 @@ CXFA_WidgetAcc* CXFA_FFDocView::GetFocusWidgetAcc()
 void CXFA_FFDocView::SetFocusWidgetAcc(CXFA_WidgetAcc* pWidgetAcc)\r
 {\r
     CXFA_FFWidget* pNewFocus = pWidgetAcc ? pWidgetAcc->GetNextWidget(NULL) : NULL;\r
-    if (SetFocus((XFA_HWIDGET)pNewFocus)) {\r
+    if (SetFocus(pNewFocus)) {\r
         m_pFocusAcc = pWidgetAcc;\r
         if (m_iStatus >= XFA_DOCVIEW_LAYOUTSTATUS_End) {\r
-            m_pDoc->GetDocProvider()->SetFocusWidget((XFA_HDOC)m_pDoc, (XFA_HWIDGET)m_pFocusWidget);\r
+            m_pDoc->GetDocProvider()->SetFocusWidget(m_pDoc, m_pFocusWidget);\r
         }\r
     }\r
 }\r
@@ -709,8 +709,8 @@ void CXFA_FFDocView::RunCalculateRecursive(FX_INT32& iIndex)
 }\r
 FX_INT32 CXFA_FFDocView::RunCalculateWidgets()\r
 {\r
-    if (!m_pDoc->GetDocProvider()->IsCalculationsEnabled((XFA_HDOC)m_pDoc)) {\r
-        return  XFA_EVENTERROR_Disabled;\r
+    if (!m_pDoc->GetDocProvider()->IsCalculationsEnabled(m_pDoc)) {\r
+        return XFA_EVENTERROR_Disabled;\r
     }\r
     FX_INT32 iCounts = m_CalculateAccs.GetSize();\r
     FX_INT32 iIndex = 0;\r
@@ -737,7 +737,7 @@ FX_BOOL CXFA_FFDocView::InitCalculate(CXFA_Node* pNode)
 }\r
 FX_BOOL CXFA_FFDocView::InitValidate(CXFA_Node* pNode)\r
 {\r
-    if (!m_pDoc->GetDocProvider()->IsValidationsEnabled((XFA_HDOC)m_pDoc)) {\r
+    if (!m_pDoc->GetDocProvider()->IsValidationsEnabled(m_pDoc)) {\r
         return FALSE;\r
     }\r
     ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Validate);\r
@@ -746,7 +746,7 @@ FX_BOOL CXFA_FFDocView::InitValidate(CXFA_Node* pNode)
 }\r
 FX_BOOL CXFA_FFDocView::RunValidate()\r
 {\r
-    if (!m_pDoc->GetDocProvider()->IsValidationsEnabled((XFA_HDOC)m_pDoc)) {\r
+    if (!m_pDoc->GetDocProvider()->IsValidationsEnabled(m_pDoc)) {\r
         return FALSE;\r
     }\r
     FX_INT32 iCounts = m_ValidateAccs.GetSize();\r
@@ -841,7 +841,7 @@ void CXFA_FFDocView::SetChangeMark()
     if (m_iStatus < XFA_DOCVIEW_LAYOUTSTATUS_End) {\r
         return;\r
     }\r
-    m_pDoc->GetDocProvider()->SetChangeMark((XFA_HDOC)m_pDoc);\r
+    m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc);\r
 }\r
 CXFA_Node* CXFA_FFDocView::GetRootSubform()\r
 {\r
@@ -865,15 +865,15 @@ void CXFA_FFDocWidgetIterator::Reset()
     m_ContentIterator.Reset();\r
     m_pCurWidget = NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToFirst()\r
+IXFA_Widget* CXFA_FFDocWidgetIterator::MoveToFirst()\r
 {\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToLast()\r
+IXFA_Widget* CXFA_FFDocWidgetIterator::MoveToLast()\r
 {\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToNext()\r
+IXFA_Widget* CXFA_FFDocWidgetIterator::MoveToNext()\r
 {\r
     CXFA_Node* pItem = m_pCurWidget ? m_ContentIterator.MoveToNext() : m_ContentIterator.GetCurrent();\r
     while (pItem) {\r
@@ -882,22 +882,22 @@ XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToNext()
                 if (!m_pCurWidget->IsLoaded() && (m_pCurWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) {\r
                     m_pCurWidget->LoadWidget();\r
                 }\r
-                return (XFA_HWIDGET)m_pCurWidget;\r
+                return m_pCurWidget;\r
             }\r
         }\r
         pItem = m_ContentIterator.MoveToNext();\r
     }\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFDocWidgetIterator::MoveToPrevious()\r
+IXFA_Widget* CXFA_FFDocWidgetIterator::MoveToPrevious()\r
 {\r
     return NULL;\r
 }\r
-XFA_HWIDGET CXFA_FFDocWidgetIterator::GetCurrentWidget()\r
+IXFA_Widget* CXFA_FFDocWidgetIterator::GetCurrentWidget()\r
 {\r
     return NULL;\r
 }\r
-FX_BOOL CXFA_FFDocWidgetIterator::SetCurrentWidget(XFA_HWIDGET hWidget)\r
+FX_BOOL CXFA_FFDocWidgetIterator::SetCurrentWidget(IXFA_Widget* hWidget)\r
 {\r
     return FALSE;\r
 }\r