summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_ffdocview.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_document_parser.cpp3
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp15
3 files changed, 12 insertions, 12 deletions
diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp
index affdca2b6e..e4beae4dfc 100644
--- a/xfa/fxfa/cxfa_ffdocview.cpp
+++ b/xfa/fxfa/cxfa_ffdocview.cpp
@@ -235,9 +235,9 @@ void CXFA_FFDocView::ResetNode(CXFA_Node* pNode) {
if (pFormNode->GetElementType() != XFA_Element::Field &&
pFormNode->GetElementType() != XFA_Element::ExclGroup) {
CXFA_ReadyNodeIterator it(pFormNode);
- while (CXFA_Node* pNode = it.MoveToNext()) {
- bChanged |= ResetSingleNodeData(pNode);
- if (pNode->GetElementType() == XFA_Element::ExclGroup)
+ while (CXFA_Node* next_node = it.MoveToNext()) {
+ bChanged |= ResetSingleNodeData(next_node);
+ if (next_node->GetElementType() == XFA_Element::ExclGroup)
it.SkipTree();
}
}
diff --git a/xfa/fxfa/parser/cxfa_document_parser.cpp b/xfa/fxfa/parser/cxfa_document_parser.cpp
index d0f137da7c..7fd4ff1570 100644
--- a/xfa/fxfa/parser/cxfa_document_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_document_parser.cpp
@@ -447,8 +447,7 @@ CXFA_Node* CXFA_DocumentParser::ParseAsXDPPacket_XDP(
m_pRootNode = pXFARootNode;
pXFARootNode->JSObject()->SetCData(XFA_Attribute::Name, L"xfa", false, false);
- CFX_XMLElement* pElement = ToXMLElement(pXMLDocumentNode);
- for (auto it : pElement->GetAttributes()) {
+ for (auto it : ToXMLElement(pXMLDocumentNode)->GetAttributes()) {
if (it.first == L"uuid")
pXFARootNode->JSObject()->SetCData(XFA_Attribute::Uuid, it.second, false,
false);
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index c41a1ac97a..7e582c0518 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -3985,10 +3985,10 @@ void CXFA_Node::SetItemState(int32_t nIndex,
int32_t iSel = -1;
std::vector<WideString> wsValueArray = GetSelectedItemsValue();
- auto it = std::find(wsValueArray.begin(), wsValueArray.end(),
- wsSaveTextArray[nIndex]);
- if (it != wsValueArray.end())
- iSel = it - wsValueArray.begin();
+ auto value_iter = std::find(wsValueArray.begin(), wsValueArray.end(),
+ wsSaveTextArray[nIndex]);
+ if (value_iter != wsValueArray.end())
+ iSel = value_iter - wsValueArray.begin();
if (IsChoiceListMultiSelect()) {
if (bSelected) {
@@ -4003,9 +4003,10 @@ void CXFA_Node::SetItemState(int32_t nIndex,
}
} else if (iSel >= 0) {
std::vector<int32_t> iSelArray = GetSelectedItems();
- auto it = std::find(iSelArray.begin(), iSelArray.end(), nIndex);
- if (it != iSelArray.end())
- iSelArray.erase(it);
+ auto selected_iter =
+ std::find(iSelArray.begin(), iSelArray.end(), nIndex);
+ if (selected_iter != iSelArray.end())
+ iSelArray.erase(selected_iter);
SetSelectedItems(iSelArray, bNotify, bScriptModify, bSyncData);
}
} else {