From 070fcdfeafb17a9d3ada1418f48fd7f19aa4cf83 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 22 Jun 2016 22:04:54 -0700 Subject: Update GetClassID to GetElementType The GetClassID method actually returns the XFA_Element, change the name of the method to be more suggestive of the return value. The GetClassID was sort-of polymorphich and would call down to subclasses. This CL changes the data to be stored on the CXFA_Object class and just returns what is set. The values are set in the constructor as needed. Review-Url: https://codereview.chromium.org/2082573007 --- xfa/fxfa/app/xfa_ffwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/app/xfa_ffwidget.cpp') diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp index 1611b81397..45b6b7e31a 100644 --- a/xfa/fxfa/app/xfa_ffwidget.cpp +++ b/xfa/fxfa/app/xfa_ffwidget.cpp @@ -1179,7 +1179,7 @@ void XFA_RectWidthoutMargin(CFX_RectF& rt, const CXFA_Margin& mg, FX_BOOL bUI) { rt.Deflate(fLeftInset, fTopInset, fRightInset, fBottomInset); } CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItem* pLayoutItem) { - XFA_Element iType = pLayoutItem->GetFormNode()->GetClassID(); + XFA_Element iType = pLayoutItem->GetFormNode()->GetElementType(); if (XFA_IsCreateWidget(iType)) { return static_cast(pLayoutItem); } @@ -2033,7 +2033,7 @@ void XFA_DrawBox(CXFA_Box box, if (!box || box.GetPresence() != XFA_ATTRIBUTEENUM_Visible) return; - XFA_Element iType = box.GetClassID(); + XFA_Element iType = box.GetElementType(); if (iType != XFA_Element::Arc && iType != XFA_Element::Border && iType != XFA_Element::Rectangle) { return; -- cgit v1.2.3