summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffwidget.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-18 21:02:37 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-18 21:02:37 +0000
commitbbd02f1cd05f55cabee8fbd23a645ac69ac32574 (patch)
tree7932068c2548ed977e235b8ef38d36317a560c8e /xfa/fxfa/cxfa_ffwidget.cpp
parent4aadb708642003404e666026bb6d390b5989e2b4 (diff)
downloadpdfium-bbd02f1cd05f55cabee8fbd23a645ac69ac32574.tar.xz
Move XFA_IsCreateWidget to CXFA_Object
This CL removes the free XFA_IsCreateWidget method and moves the functionality into CXFA_Object::HasCreatedUIWidget to clarify the purpose. Change-Id: Icca1f49238040b5d87fbb4eb33340f9309f5e2f3 Reviewed-on: https://pdfium-review.googlesource.com/23133 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffwidget.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffwidget.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index 8df7ff7782..71c45c7620 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -221,16 +221,11 @@ void XFA_RectWithoutMargin(CFX_RectF& rt, const CXFA_Margin* margin, bool bUI) {
}
CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItem* pLayoutItem) {
- if (XFA_IsCreateWidget(pLayoutItem->GetFormNode()->GetElementType()))
+ if (pLayoutItem->GetFormNode()->HasCreatedUIWidget())
return static_cast<CXFA_FFWidget*>(pLayoutItem);
return nullptr;
}
-bool XFA_IsCreateWidget(XFA_Element eType) {
- return eType == XFA_Element::Field || eType == XFA_Element::Draw ||
- eType == XFA_Element::Subform || eType == XFA_Element::ExclGroup;
-}
-
CXFA_CalcData::CXFA_CalcData() : m_iRefCount(0) {}
CXFA_CalcData::~CXFA_CalcData() {}