diff options
author | tsepez <tsepez@chromium.org> | 2016-04-14 15:46:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-14 15:46:27 -0700 |
commit | 6f167c3ea2f8093170cae12a3de4ded76ac521ce (patch) | |
tree | 76ad1435272c22f677b4af2ec6b246d604aef3ce /xfa/fxfa/parser/xfa_object_imp.cpp | |
parent | 70c5520270ab41b71e8ae8d2e888b9ba25383190 (diff) | |
download | pdfium-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_object_imp.cpp')
-rw-r--r-- | xfa/fxfa/parser/xfa_object_imp.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp index 2979e3700a..4428b67302 100644 --- a/xfa/fxfa/parser/xfa_object_imp.cpp +++ b/xfa/fxfa/parser/xfa_object_imp.cpp @@ -1688,8 +1688,7 @@ void CXFA_Node::Script_Som_DefaultValue(FXJSE_HVALUE hValue, pContainerWidgetData = GetContainerWidgetData(); } if (pContainerWidgetData) { - pContainerWidgetData->GetFormatDataValue(wsNewValue.AsStringC(), - wsFormatValue); + pContainerWidgetData->GetFormatDataValue(wsNewValue, wsFormatValue); } SetScriptContent(wsNewValue, wsFormatValue, TRUE, TRUE); } else { @@ -1738,8 +1737,7 @@ void CXFA_Node::Script_Boolean_Value(FXJSE_HVALUE hValue, CFX_WideString wsFormatValue(wsNewValue); CXFA_WidgetData* pContainerWidgetData = GetContainerWidgetData(); if (pContainerWidgetData) { - pContainerWidgetData->GetFormatDataValue(wsNewValue.AsStringC(), - wsFormatValue); + pContainerWidgetData->GetFormatDataValue(wsNewValue, wsFormatValue); } SetScriptContent(wsNewValue, wsFormatValue, TRUE, TRUE); } else { @@ -1999,8 +1997,7 @@ void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue, CXFA_WidgetData* pContainerWidgetData = GetContainerWidgetData(); CFX_WideString wsFormatText(wsNewText); if (pContainerWidgetData) { - pContainerWidgetData->GetFormatDataValue(wsNewText.AsStringC(), - wsFormatText); + pContainerWidgetData->GetFormatDataValue(wsNewText, wsFormatText); } SetScriptContent(wsNewText, wsFormatText, TRUE, TRUE); } else { @@ -5220,7 +5217,7 @@ void CXFA_Node::MoveBufferMapData(CXFA_Node* pDstModule, void* pKey) { CFX_WideString wsFormatValue(wsValue); CXFA_WidgetData* pWidgetData = pDstModule->GetContainerWidgetData(); if (pWidgetData) { - pWidgetData->GetFormatDataValue(wsValue.AsStringC(), wsFormatValue); + pWidgetData->GetFormatDataValue(wsValue, wsFormatValue); } pDstModule->SetScriptContent(wsValue, wsFormatValue, TRUE, TRUE); } |