summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-14 15:46:27 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-14 15:46:27 -0700
commit6f167c3ea2f8093170cae12a3de4ded76ac521ce (patch)
tree76ad1435272c22f677b4af2ec6b246d604aef3ce /xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
parent70c5520270ab41b71e8ae8d2e888b9ba25383190 (diff)
downloadpdfium-6f167c3ea2f8093170cae12a3de4ded76ac521ce.tar.xz
Change string argument type to GetFormatDataValue.
Avoid string duplication, since the first thing these routines do is allocate a new string from the static string argument. Review URL: https://codereview.chromium.org/1889983002
Diffstat (limited to 'xfa/fxfa/parser/xfa_document_datamerger_imp.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index a271b10286..f0c2d7645a 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -132,7 +132,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
CFDE_XMLElement* pXMLDataElement =
static_cast<CFDE_XMLElement*>(pDataNode->GetXMLMappingNode());
FXSYS_assert(pXMLDataElement);
- pWidgetData->GetFormatDataValue(wsValue.AsStringC(), wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue);
pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
pDataNode->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
if (!wsHref.IsEmpty()) {
@@ -161,7 +161,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
->SetString(FX_WSTRC(L"xfa:dataNode"), FX_WSTRC(L"dataGroup"));
}
} else if (!wsValue.IsEmpty()) {
- pWidgetData->GetFormatDataValue(wsValue.AsStringC(), wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue);
pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
}
break;
@@ -170,7 +170,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
if (wsValue.IsEmpty()) {
break;
}
- pWidgetData->GetFormatDataValue(wsValue.AsStringC(), wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue);
pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
break;
case XFA_ELEMENT_ExclGroup: {
@@ -240,7 +240,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
CFX_WideString wsOutput;
pWidgetData->NormalizeNumStr(wsValue, wsOutput);
wsValue = wsOutput;
- pWidgetData->GetFormatDataValue(wsValue.AsStringC(), wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue);
pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
CXFA_Node* pValue = pFormNode->GetProperty(0, XFA_ELEMENT_Value);
XFA_DataMerge_FormValueNode_SetChildContent(pValue, wsValue,
@@ -251,7 +251,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
if (wsValue.IsEmpty()) {
break;
}
- pWidgetData->GetFormatDataValue(wsValue.AsStringC(), wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue);
pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
break;
}
@@ -259,8 +259,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
CFX_WideString wsXMLValue;
pDataNode->TryContent(wsXMLValue);
CFX_WideString wsNormailizeValue;
- pWidgetData->GetNormalizeDataValue(wsXMLValue.AsStringC(),
- wsNormailizeValue);
+ pWidgetData->GetNormalizeDataValue(wsXMLValue, wsNormailizeValue);
pDataNode->SetAttributeValue(wsNormailizeValue, wsXMLValue);
switch (eUIType) {
case XFA_ELEMENT_ImageEdit: {