summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-08 15:38:16 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-09 13:19:19 +0000
commit6ee22ea9bba71054592fda2e3ed8d6f33045893e (patch)
tree9c080a29ec0002edbcb32b4a3271012510971130
parentf82efcc72fa16b145f101b38ea55d674278e32a1 (diff)
downloadpdfium-6ee22ea9bba71054592fda2e3ed8d6f33045893e.tar.xz
Remove downcast in cxfa_layoutpagemgr.cpp
The cast is too strict for all of the objects to be processed, however all of the fields in use are present in a parent class to which these objects all belong. Bug: 718498 Change-Id: Ibe1d800c73215c36550e54bf18de90cc9d295ef9 Reviewed-on: https://pdfium-review.googlesource.com/5130 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
-rw-r--r--xfa/fxfa/parser/cxfa_layoutpagemgr.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
index b88dca9009..5c94a6a256 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
@@ -1725,18 +1725,16 @@ void CXFA_LayoutPageMgr::MergePageSetContents() {
break;
}
case XFA_Element::PageArea: {
- CXFA_ContainerLayoutItem* pFormLayout = pContainerItem;
+ CXFA_LayoutItem* pFormLayout = pContainerItem;
CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode;
bool bIsExistForm = true;
for (int32_t iLevel = 0; iLevel < 3; iLevel++) {
- pFormLayout = static_cast<CXFA_ContainerLayoutItem*>(
- pFormLayout->m_pFirstChild);
+ pFormLayout = pFormLayout->m_pFirstChild;
if (iLevel == 2) {
while (pFormLayout &&
!XFA_ItemLayoutProcessor_IsTakingSpace(
pFormLayout->m_pFormNode)) {
- pFormLayout = static_cast<CXFA_ContainerLayoutItem*>(
- pFormLayout->m_pNextSibling);
+ pFormLayout = pFormLayout->m_pNextSibling;
}
}
if (!pFormLayout) {