OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "xfa/fxfa/parser/xfa_document_datamerger_imp.h" | 7 #include "xfa/fxfa/parser/xfa_document_datamerger_imp.h" |
8 | 8 |
9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
10 #include "xfa/fde/xml/fde_xml_imp.h" | 10 #include "xfa/fde/xml/fde_xml_imp.h" |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 image.SetHref(wsHref); | 283 image.SetHref(wsHref); |
284 } | 284 } |
285 } | 285 } |
286 } break; | 286 } break; |
287 case XFA_ELEMENT_ChoiceList: | 287 case XFA_ELEMENT_ChoiceList: |
288 if (pWidgetData->GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) { | 288 if (pWidgetData->GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) { |
289 CXFA_NodeArray items; | 289 CXFA_NodeArray items; |
290 pDataNode->GetNodeList(items); | 290 pDataNode->GetNodeList(items); |
291 int32_t iCounts = items.GetSize(); | 291 int32_t iCounts = items.GetSize(); |
292 if (iCounts > 0) { | 292 if (iCounts > 0) { |
293 wsNormailizeValue.Empty(); | 293 wsNormailizeValue.clear(); |
294 CFX_WideString wsItem; | 294 CFX_WideString wsItem; |
295 for (int32_t i = 0; i < iCounts; i++) { | 295 for (int32_t i = 0; i < iCounts; i++) { |
296 items[i]->TryContent(wsItem); | 296 items[i]->TryContent(wsItem); |
297 wsItem = (iCounts == 1) ? wsItem : wsItem + FX_WSTRC(L"\n"); | 297 wsItem = (iCounts == 1) ? wsItem : wsItem + FX_WSTRC(L"\n"); |
298 wsNormailizeValue += wsItem; | 298 wsNormailizeValue += wsItem; |
299 } | 299 } |
300 CXFA_ExData exData = defValue.GetExData(); | 300 CXFA_ExData exData = defValue.GetExData(); |
301 FXSYS_assert(exData); | 301 FXSYS_assert(exData); |
302 exData.SetContentType((iCounts == 1) ? FX_WSTRC(L"text/plain") | 302 exData.SetContentType((iCounts == 1) ? FX_WSTRC(L"text/plain") |
303 : FX_WSTRC(L"text/xml")); | 303 : FX_WSTRC(L"text/xml")); |
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1425 } | 1425 } |
1426 pFormRoot->SetObject(XFA_ATTRIBUTE_BindingNode, NULL); | 1426 pFormRoot->SetObject(XFA_ATTRIBUTE_BindingNode, NULL); |
1427 } | 1427 } |
1428 XFA_DataMerge_ClearGlobalBinding(this); | 1428 XFA_DataMerge_ClearGlobalBinding(this); |
1429 if (bDoDataMerge) { | 1429 if (bDoDataMerge) { |
1430 DoDataMerge(); | 1430 DoDataMerge(); |
1431 } | 1431 } |
1432 CXFA_LayoutProcessor* pLayoutProcessor = GetLayoutProcessor(); | 1432 CXFA_LayoutProcessor* pLayoutProcessor = GetLayoutProcessor(); |
1433 pLayoutProcessor->SetForceReLayout(TRUE); | 1433 pLayoutProcessor->SetForceReLayout(TRUE); |
1434 } | 1434 } |
OLD | NEW |