summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-06-23 09:20:32 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-23 09:20:32 -0700
commit41cb62ec84f8e8ca4ce8075fd4d825f8e22292a2 (patch)
treea47d8cdef2e2c628b4698e6467fd6cd1fb5646a2 /xfa/fxfa/app
parentab5b60edba7e8e80d7ee964d58e58b384fcfe5ee (diff)
downloadpdfium-41cb62ec84f8e8ca4ce8075fd4d825f8e22292a2.tar.xz
Cleanup some variable namings.chromium/2778
This CL cleans up some variable namings from the XFA_Element enum change. Review-Url: https://codereview.chromium.org/2093663002
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r--xfa/fxfa/app/xfa_ffnotify.cpp13
-rw-r--r--xfa/fxfa/app/xfa_ffwidget.cpp18
2 files changed, 14 insertions, 17 deletions
diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp
index e4b8312841..12792bc996 100644
--- a/xfa/fxfa/app/xfa_ffnotify.cpp
+++ b/xfa/fxfa/app/xfa_ffnotify.cpp
@@ -92,7 +92,6 @@ CXFA_LayoutItem* CXFA_FFNotify::OnCreateLayoutItem(CXFA_Node* pNode) {
XFA_Element eType = pNode->GetElementType();
if (eType == XFA_Element::PageArea)
return new CXFA_FFPageView(pDocView, pNode);
-
if (eType == XFA_Element::ContentArea)
return new CXFA_ContainerLayoutItem(pNode);
@@ -320,13 +319,13 @@ void CXFA_FFNotify::OnNodeReady(CXFA_Node* pNode) {
if (!pDocView)
return;
- XFA_Element iType = pNode->GetElementType();
- if (XFA_IsCreateWidget(iType)) {
+ XFA_Element eType = pNode->GetElementType();
+ if (XFA_IsCreateWidget(eType)) {
CXFA_WidgetAcc* pAcc = new CXFA_WidgetAcc(pDocView, pNode);
pNode->SetObject(XFA_ATTRIBUTE_WidgetData, pAcc, &gs_XFADeleteWidgetAcc);
return;
}
- switch (iType) {
+ switch (eType) {
case XFA_Element::BindItems:
pDocView->m_BindItems.Add(pNode);
break;
@@ -381,7 +380,7 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender,
return;
}
- XFA_Element ePType = pParentNode->GetElementType();
+ XFA_Element eType = pParentNode->GetElementType();
FX_BOOL bIsContainerNode = pParentNode->IsContainerNode();
CXFA_WidgetAcc* pWidgetAcc =
static_cast<CXFA_WidgetAcc*>(pWidgetNode->GetWidgetData());
@@ -390,7 +389,7 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender,
bool bUpdateProperty = false;
pDocView->SetChangeMark();
- switch (ePType) {
+ switch (eType) {
case XFA_Element::Caption: {
CXFA_TextLayout* pCapOut = pWidgetAcc->GetCaptionTextLayout();
if (!pCapOut)
@@ -410,7 +409,7 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender,
if (eAttr == XFA_ATTRIBUTE_Value) {
pDocView->AddCalculateNodeNotify(pSender);
- if (ePType == XFA_Element::Value || bIsContainerNode) {
+ if (eType == XFA_Element::Value || bIsContainerNode) {
if (bIsContainerNode) {
pWidgetAcc->UpdateUIDisplay();
pDocView->AddCalculateWidgetAcc(pWidgetAcc);
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index 45b6b7e31a..09f6da0b9f 100644
--- a/xfa/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/fxfa/app/xfa_ffwidget.cpp
@@ -1179,15 +1179,13 @@ 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()->GetElementType();
- if (XFA_IsCreateWidget(iType)) {
+ if (XFA_IsCreateWidget(pLayoutItem->GetFormNode()->GetElementType()))
return static_cast<CXFA_FFWidget*>(pLayoutItem);
- }
return nullptr;
}
-FX_BOOL XFA_IsCreateWidget(XFA_Element iType) {
- return iType == XFA_Element::Field || iType == XFA_Element::Draw ||
- iType == XFA_Element::Subform || iType == XFA_Element::ExclGroup;
+FX_BOOL XFA_IsCreateWidget(XFA_Element eType) {
+ return eType == XFA_Element::Field || eType == XFA_Element::Draw ||
+ eType == XFA_Element::Subform || eType == XFA_Element::ExclGroup;
}
static void XFA_BOX_GetPath_Arc(CXFA_Box box,
CFX_RectF rtDraw,
@@ -2033,13 +2031,13 @@ void XFA_DrawBox(CXFA_Box box,
if (!box || box.GetPresence() != XFA_ATTRIBUTEENUM_Visible)
return;
- XFA_Element iType = box.GetElementType();
- if (iType != XFA_Element::Arc && iType != XFA_Element::Border &&
- iType != XFA_Element::Rectangle) {
+ XFA_Element eType = box.GetElementType();
+ if (eType != XFA_Element::Arc && eType != XFA_Element::Border &&
+ eType != XFA_Element::Rectangle) {
return;
}
CXFA_StrokeArray strokes;
- if (!(dwFlags & XFA_DRAWBOX_ForceRound) && iType != XFA_Element::Arc) {
+ if (!(dwFlags & XFA_DRAWBOX_ForceRound) && eType != XFA_Element::Arc) {
box.GetStrokes(strokes);
}
XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags);