Use std::map in CXFA_ItemLayoutProcessor

BUG=

Review-Url: https://codereview.chromium.org/1999883002
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
index 8b85ba8..860de2d 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
@@ -2974,26 +2974,25 @@
                                                        FX_FLOAT fHeight) {
   m_pLayoutItem->m_sSize = CFX_SizeF(fWidth, fHeight);
 }
+
 FX_BOOL CXFA_ItemLayoutProcessor::JudgeLeaderOrTrailerForOccur(
     CXFA_Node* pFormNode) {
-  if (pFormNode == NULL) {
+  if (!pFormNode)
     return FALSE;
-  }
+
   CXFA_Node* pTemplate = pFormNode->GetTemplateNode();
-  if (!pTemplate) {
+  if (!pTemplate)
     pTemplate = pFormNode;
-  }
+
   CXFA_Occur NodeOccur(pTemplate->GetFirstChildByClass(XFA_ELEMENT_Occur));
   int32_t iMax = NodeOccur.GetMax();
-  if (iMax > -1) {
-    int32_t iCount =
-        (int32_t)(uintptr_t)m_PendingNodesCount.GetValueAt(pTemplate);
-    if (iCount >= iMax) {
-      return FALSE;
-    }
-    iCount++;
-    m_PendingNodesCount.SetAt(pTemplate, (void*)(uintptr_t)(iCount));
+  if (iMax < 0)
     return TRUE;
-  }
+
+  int32_t iCount = m_PendingNodesCount[pTemplate];
+  if (iCount >= iMax)
+    return FALSE;
+
+  m_PendingNodesCount[pTemplate] = iCount + 1;
   return TRUE;
 }
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.h b/xfa/fxfa/parser/xfa_layout_itemlayout.h
index 8e7032e..f7376d2 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.h
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.h
@@ -10,6 +10,7 @@
 #include <float.h>
 
 #include <list>
+#include <map>
 
 #include "core/fxcrt/include/fx_basic.h"
 #include "xfa/fxfa/parser/xfa_doclayout.h"
@@ -182,7 +183,7 @@
   FX_BOOL m_bBreakPending;
   CFX_ArrayTemplate<FX_FLOAT> m_rgSpecifiedColumnWidths;
   CFX_ArrayTemplate<CXFA_ContentLayoutItem*> m_arrayKeepItems;
-  CFX_MapPtrToPtr m_PendingNodesCount;
+  std::map<CXFA_Node*, int32_t> m_PendingNodesCount;
   FX_FLOAT m_fLastRowWidth;
   FX_FLOAT m_fLastRowY;
   FX_FLOAT m_fWidthLimite;