summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_layoutitem.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-07-30 19:31:19 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-30 19:31:19 +0000
commitd718d634b7aa3311a5b6298574d06f091365259f (patch)
tree39560860d111a143e6d3b27e42245ca79710daab /xfa/fxfa/parser/cxfa_layoutitem.cpp
parent5822da79e645ad896c4aeec623d38a92ee7231a8 (diff)
downloadpdfium-d718d634b7aa3311a5b6298574d06f091365259f.tar.xz
Type-safe iteration over CXFA_ContentLayoutItems.
There's no reason that every CXFA_LayoutItem must be a CXFA_ContentLayout item, so use checked conversions. The code may already be arranging things so the constraint is already satisfied, but this adds an additional layer of safety. Tidy some long expressions with pre-existing typedef for node iterator while we're at it. Change-Id: If1448131ca73bfedb2266b070f1a913688598e64 Reviewed-on: https://pdfium-review.googlesource.com/39051 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_layoutitem.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_layoutitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/cxfa_layoutitem.cpp b/xfa/fxfa/parser/cxfa_layoutitem.cpp
index aac7e5db41..42294a508b 100644
--- a/xfa/fxfa/parser/cxfa_layoutitem.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutitem.cpp
@@ -28,7 +28,7 @@ void XFA_ReleaseLayoutItem(CXFA_LayoutItem* pLayoutItem) {
}
pNotify->OnLayoutItemRemoving(pDocLayout, pLayoutItem);
if (pLayoutItem->GetFormNode()->GetElementType() == XFA_Element::PageArea) {
- pNotify->OnPageEvent(static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem),
+ pNotify->OnPageEvent(ToContainerLayoutItem(pLayoutItem),
XFA_PAGEVIEWEVENT_PostRemoved);
}
delete pLayoutItem;