Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(753)

Side by Side Diff: xfa/fxfa/parser/xfa_objectacc_imp.cpp

Issue 1857073002: Make down-conversion explicit from CFX_Widetring to CFX_WideStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: String argument type Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxfa/parser/xfa_object_imp.cpp ('k') | xfa/fxfa/parser/xfa_parser_imp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "core/fxcrt/include/fx_ext.h" 7 #include "core/fxcrt/include/fx_ext.h"
8 #include "xfa/fxbarcode/include/BC_Library.h" 8 #include "xfa/fxbarcode/include/BC_Library.h"
9 #include "xfa/fxfa/app/xfa_ffnotify.h" 9 #include "xfa/fxfa/app/xfa_ffnotify.h"
10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 FX_BOOL CXFA_Image::GetContent(CFX_WideString& wsText) { 470 FX_BOOL CXFA_Image::GetContent(CFX_WideString& wsText) {
471 return m_pNode->TryContent(wsText); 471 return m_pNode->TryContent(wsText);
472 } 472 }
473 FX_BOOL CXFA_Image::SetContentType(const CFX_WideString& wsContentType) { 473 FX_BOOL CXFA_Image::SetContentType(const CFX_WideString& wsContentType) {
474 return m_pNode->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType); 474 return m_pNode->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
475 } 475 }
476 FX_BOOL CXFA_Image::SetHref(const CFX_WideString& wsHref) { 476 FX_BOOL CXFA_Image::SetHref(const CFX_WideString& wsHref) {
477 if (m_bDefValue) { 477 if (m_bDefValue) {
478 return m_pNode->SetCData(XFA_ATTRIBUTE_Href, wsHref); 478 return m_pNode->SetCData(XFA_ATTRIBUTE_Href, wsHref);
479 } 479 }
480 return m_pNode->SetAttribute(XFA_ATTRIBUTE_Href, wsHref); 480 return m_pNode->SetAttribute(XFA_ATTRIBUTE_Href, wsHref.AsWideStringC());
481 } 481 }
482 FX_BOOL CXFA_Image::SetTransferEncoding(int32_t iTransferEncoding) { 482 FX_BOOL CXFA_Image::SetTransferEncoding(int32_t iTransferEncoding) {
483 if (m_bDefValue) { 483 if (m_bDefValue) {
484 return m_pNode->SetEnum(XFA_ATTRIBUTE_TransferEncoding, 484 return m_pNode->SetEnum(XFA_ATTRIBUTE_TransferEncoding,
485 (XFA_ATTRIBUTEENUM)iTransferEncoding); 485 (XFA_ATTRIBUTEENUM)iTransferEncoding);
486 } 486 }
487 return TRUE; 487 return TRUE;
488 } 488 }
489 CXFA_Calculate::CXFA_Calculate(CXFA_Node* pNode) : CXFA_Data(pNode) {} 489 CXFA_Calculate::CXFA_Calculate(CXFA_Node* pNode) : CXFA_Data(pNode) {}
490 int32_t CXFA_Calculate::GetOverride() { 490 int32_t CXFA_Calculate::GetOverride() {
(...skipping 12 matching lines...) Expand all
503 } 503 }
504 } 504 }
505 } 505 }
506 CXFA_Validate::CXFA_Validate(CXFA_Node* pNode) : CXFA_Data(pNode) {} 506 CXFA_Validate::CXFA_Validate(CXFA_Node* pNode) : CXFA_Data(pNode) {}
507 int32_t CXFA_Validate::GetFormatTest() { 507 int32_t CXFA_Validate::GetFormatTest() {
508 return m_pNode->GetEnum(XFA_ATTRIBUTE_FormatTest); 508 return m_pNode->GetEnum(XFA_ATTRIBUTE_FormatTest);
509 } 509 }
510 FX_BOOL CXFA_Validate::SetTestValue(int32_t iType, 510 FX_BOOL CXFA_Validate::SetTestValue(int32_t iType,
511 CFX_WideString& wsValue, 511 CFX_WideString& wsValue,
512 XFA_ATTRIBUTEENUM eName) { 512 XFA_ATTRIBUTEENUM eName) {
513 const XFA_ATTRIBUTEENUMINFO* pInfo = XFA_GetAttributeEnumByName(wsValue); 513 const XFA_ATTRIBUTEENUMINFO* pInfo =
514 XFA_GetAttributeEnumByName(wsValue.AsWideStringC());
514 if (pInfo) { 515 if (pInfo) {
515 eName = pInfo->eName; 516 eName = pInfo->eName;
516 } 517 }
517 m_pNode->SetEnum((XFA_ATTRIBUTE)iType, eName, FALSE); 518 m_pNode->SetEnum((XFA_ATTRIBUTE)iType, eName, FALSE);
518 return TRUE; 519 return TRUE;
519 } 520 }
520 FX_BOOL CXFA_Validate::SetNullTest(CFX_WideString wsValue) { 521 FX_BOOL CXFA_Validate::SetNullTest(CFX_WideString wsValue) {
521 return SetTestValue(XFA_ATTRIBUTE_NullTest, wsValue, 522 return SetTestValue(XFA_ATTRIBUTE_NullTest, wsValue,
522 XFA_ATTRIBUTEENUM_Disabled); 523 XFA_ATTRIBUTEENUM_Disabled);
523 } 524 }
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 break; 1584 break;
1584 } 1585 }
1585 } 1586 }
1586 SetSelectdItems(iSelArray, bNotify, bScriptModify, bSyncData); 1587 SetSelectdItems(iSelArray, bNotify, bScriptModify, bSyncData);
1587 } 1588 }
1588 } else { 1589 } else {
1589 if (bSelected) { 1590 if (bSelected) {
1590 if (iSel < 0) { 1591 if (iSel < 0) {
1591 CFX_WideString wsSaveText = wsSaveTextArray[nIndex]; 1592 CFX_WideString wsSaveText = wsSaveTextArray[nIndex];
1592 CFX_WideString wsFormatText(wsSaveText); 1593 CFX_WideString wsFormatText(wsSaveText);
1593 GetFormatDataValue(wsSaveText, wsFormatText); 1594 GetFormatDataValue(wsSaveText.AsWideStringC(), wsFormatText);
1594 m_pNode->SetContent(wsSaveText, wsFormatText, bNotify, bScriptModify, 1595 m_pNode->SetContent(wsSaveText, wsFormatText, bNotify, bScriptModify,
1595 bSyncData); 1596 bSyncData);
1596 } 1597 }
1597 } else if (iSel >= 0) { 1598 } else if (iSel >= 0) {
1598 m_pNode->SetContent(CFX_WideString(), CFX_WideString(), bNotify, 1599 m_pNode->SetContent(CFX_WideString(), CFX_WideString(), bNotify,
1599 bScriptModify, bSyncData); 1600 bScriptModify, bSyncData);
1600 } 1601 }
1601 } 1602 }
1602 } 1603 }
1603 void CXFA_WidgetData::SetSelectdItems(CFX_Int32Array& iSelArray, 1604 void CXFA_WidgetData::SetSelectdItems(CFX_Int32Array& iSelArray,
1604 FX_BOOL bNotify, 1605 FX_BOOL bNotify,
1605 FX_BOOL bScriptModify, 1606 FX_BOOL bScriptModify,
1606 FX_BOOL bSyncData) { 1607 FX_BOOL bSyncData) {
1607 CFX_WideString wsValue; 1608 CFX_WideString wsValue;
1608 int32_t iSize = iSelArray.GetSize(); 1609 int32_t iSize = iSelArray.GetSize();
1609 if (iSize >= 1) { 1610 if (iSize >= 1) {
1610 CFX_WideStringArray wsSaveTextArray; 1611 CFX_WideStringArray wsSaveTextArray;
1611 GetChoiceListItems(wsSaveTextArray, TRUE); 1612 GetChoiceListItems(wsSaveTextArray, TRUE);
1612 CFX_WideString wsItemValue; 1613 CFX_WideString wsItemValue;
1613 for (int32_t i = 0; i < iSize; i++) { 1614 for (int32_t i = 0; i < iSize; i++) {
1614 wsItemValue = (iSize == 1) 1615 wsItemValue = (iSize == 1)
1615 ? wsSaveTextArray[iSelArray[i]] 1616 ? wsSaveTextArray[iSelArray[i]]
1616 : wsSaveTextArray[iSelArray[i]] + FX_WSTRC(L"\n"); 1617 : wsSaveTextArray[iSelArray[i]] + FX_WSTRC(L"\n");
1617 wsValue += wsItemValue; 1618 wsValue += wsItemValue;
1618 } 1619 }
1619 } 1620 }
1620 CFX_WideString wsFormat(wsValue); 1621 CFX_WideString wsFormat(wsValue);
1621 if (GetChoiceListOpen() != XFA_ATTRIBUTEENUM_MultiSelect) { 1622 if (GetChoiceListOpen() != XFA_ATTRIBUTEENUM_MultiSelect) {
1622 GetFormatDataValue(wsValue, wsFormat); 1623 GetFormatDataValue(wsValue.AsWideStringC(), wsFormat);
1623 } 1624 }
1624 m_pNode->SetContent(wsValue, wsFormat, bNotify, bScriptModify, bSyncData); 1625 m_pNode->SetContent(wsValue, wsFormat, bNotify, bScriptModify, bSyncData);
1625 } 1626 }
1626 void CXFA_WidgetData::ClearAllSelections() { 1627 void CXFA_WidgetData::ClearAllSelections() {
1627 CXFA_Node* pBind = m_pNode->GetBindData(); 1628 CXFA_Node* pBind = m_pNode->GetBindData();
1628 if (pBind && GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) { 1629 if (pBind && GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) {
1629 while (CXFA_Node* pChildNode = 1630 while (CXFA_Node* pChildNode =
1630 pBind->GetNodeItem(XFA_NODEITEM_FirstChild)) { 1631 pBind->GetNodeItem(XFA_NODEITEM_FirstChild)) {
1631 pBind->RemoveChild(pChildNode); 1632 pBind->RemoveChild(pChildNode);
1632 } 1633 }
(...skipping 16 matching lines...) Expand all
1649 pItemNode = pItemNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { 1650 pItemNode = pItemNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
1650 if (pItemNode->GetClassID() != XFA_ELEMENT_Items) { 1651 if (pItemNode->GetClassID() != XFA_ELEMENT_Items) {
1651 continue; 1652 continue;
1652 } 1653 }
1653 listitems.Add(pItemNode); 1654 listitems.Add(pItemNode);
1654 iCount++; 1655 iCount++;
1655 } 1656 }
1656 if (iCount < 1) { 1657 if (iCount < 1) {
1657 CXFA_Node* pItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items); 1658 CXFA_Node* pItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items);
1658 m_pNode->InsertChild(-1, pItems); 1659 m_pNode->InsertChild(-1, pItems);
1659 InsertListTextItem(pItems, wsLabel, nIndex); 1660 InsertListTextItem(pItems, wsLabel.AsWideStringC(), nIndex);
1660 CXFA_Node* pSaveItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items); 1661 CXFA_Node* pSaveItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items);
1661 m_pNode->InsertChild(-1, pSaveItems); 1662 m_pNode->InsertChild(-1, pSaveItems);
1662 pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, TRUE); 1663 pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, TRUE);
1663 InsertListTextItem(pSaveItems, wsNewValue, nIndex); 1664 InsertListTextItem(pSaveItems, wsNewValue.AsWideStringC(), nIndex);
1664 } else if (iCount > 1) { 1665 } else if (iCount > 1) {
1665 for (int32_t i = 0; i < 2; i++) { 1666 for (int32_t i = 0; i < 2; i++) {
1666 CXFA_Node* pNode = listitems[i]; 1667 CXFA_Node* pNode = listitems[i];
1667 FX_BOOL bHasSave = pNode->GetBoolean(XFA_ATTRIBUTE_Save); 1668 FX_BOOL bHasSave = pNode->GetBoolean(XFA_ATTRIBUTE_Save);
1668 if (bHasSave) { 1669 if (bHasSave) {
1669 InsertListTextItem(pNode, wsNewValue, nIndex); 1670 InsertListTextItem(pNode, wsNewValue.AsWideStringC(), nIndex);
1670 } else { 1671 } else {
1671 InsertListTextItem(pNode, wsLabel, nIndex); 1672 InsertListTextItem(pNode, wsLabel.AsWideStringC(), nIndex);
1672 } 1673 }
1673 } 1674 }
1674 } else { 1675 } else {
1675 CXFA_Node* pNode = listitems[0]; 1676 CXFA_Node* pNode = listitems[0];
1676 pNode->SetBoolean(XFA_ATTRIBUTE_Save, FALSE); 1677 pNode->SetBoolean(XFA_ATTRIBUTE_Save, FALSE);
1677 pNode->SetEnum(XFA_ATTRIBUTE_Presence, XFA_ATTRIBUTEENUM_Visible); 1678 pNode->SetEnum(XFA_ATTRIBUTE_Presence, XFA_ATTRIBUTEENUM_Visible);
1678 CXFA_Node* pSaveItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items); 1679 CXFA_Node* pSaveItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items);
1679 m_pNode->InsertChild(-1, pSaveItems); 1680 m_pNode->InsertChild(-1, pSaveItems);
1680 pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, TRUE); 1681 pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, TRUE);
1681 pSaveItems->SetEnum(XFA_ATTRIBUTE_Presence, XFA_ATTRIBUTEENUM_Hidden); 1682 pSaveItems->SetEnum(XFA_ATTRIBUTE_Presence, XFA_ATTRIBUTEENUM_Hidden);
1682 listitems.RemoveAll(); 1683 listitems.RemoveAll();
1683 CXFA_Node* pListNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild); 1684 CXFA_Node* pListNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
1684 int32_t i = 0; 1685 int32_t i = 0;
1685 while (pListNode) { 1686 while (pListNode) {
1686 CFX_WideString wsOldValue; 1687 CFX_WideString wsOldValue;
1687 pListNode->TryContent(wsOldValue); 1688 pListNode->TryContent(wsOldValue);
1688 InsertListTextItem(pSaveItems, wsOldValue, i); 1689 InsertListTextItem(pSaveItems, wsOldValue.AsWideStringC(), i);
1689 i++; 1690 i++;
1690 pListNode = pListNode->GetNodeItem(XFA_NODEITEM_NextSibling); 1691 pListNode = pListNode->GetNodeItem(XFA_NODEITEM_NextSibling);
1691 } 1692 }
1692 InsertListTextItem(pNode, wsLabel, nIndex); 1693 InsertListTextItem(pNode, wsLabel.AsWideStringC(), nIndex);
1693 InsertListTextItem(pSaveItems, wsNewValue, nIndex); 1694 InsertListTextItem(pSaveItems, wsNewValue.AsWideStringC(), nIndex);
1694 } 1695 }
1695 if (!bNotify) { 1696 if (!bNotify) {
1696 return; 1697 return;
1697 } 1698 }
1698 m_pNode->GetDocument()->GetNotify()->OnWidgetDataEvent( 1699 m_pNode->GetDocument()->GetNotify()->OnWidgetDataEvent(
1699 this, XFA_WIDGETEVENT_ListItemAdded, (void*)(const FX_WCHAR*)wsLabel, 1700 this, XFA_WIDGETEVENT_ListItemAdded, (void*)(const FX_WCHAR*)wsLabel,
1700 (void*)(const FX_WCHAR*)wsValue, (void*)(uintptr_t)nIndex); 1701 (void*)(const FX_WCHAR*)wsValue, (void*)(uintptr_t)nIndex);
1701 } 1702 }
1702 void CXFA_WidgetData::GetItemLabel(const CFX_WideStringC& wsValue, 1703 void CXFA_WidgetData::GetItemLabel(const CFX_WideStringC& wsValue,
1703 CFX_WideString& wsLabel) { 1704 CFX_WideString& wsLabel) {
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 if (XFA_IsDigit(wc)) { 2095 if (XFA_IsDigit(wc)) {
2095 if (iLead >= 0) { 2096 if (iLead >= 0) {
2096 iLead_++; 2097 iLead_++;
2097 if (iLead_ > iLead) { 2098 if (iLead_ > iLead) {
2098 return L"0"; 2099 return L"0";
2099 } 2100 }
2100 } else if (iTread_ >= 0) { 2101 } else if (iTread_ >= 0) {
2101 iTread_++; 2102 iTread_++;
2102 if (iTread_ > iTread) { 2103 if (iTread_ > iTread) {
2103 if (iTread != -1) { 2104 if (iTread != -1) {
2104 CFX_Decimal wsDeci = CFX_Decimal(wsValue); 2105 CFX_Decimal wsDeci = CFX_Decimal(wsValue.AsWideStringC());
2105 wsDeci.SetScale(iTread); 2106 wsDeci.SetScale(iTread);
2106 wsRet = wsDeci; 2107 wsRet = wsDeci;
2107 } 2108 }
2108 return wsRet; 2109 return wsRet;
2109 } 2110 }
2110 } 2111 }
2111 } else if (wc == L'.') { 2112 } else if (wc == L'.') {
2112 iTread_ = 0; 2113 iTread_ = 0;
2113 iLead = -1; 2114 iLead = -1;
2114 } 2115 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
2269 if (!m_pNode) { 2270 if (!m_pNode) {
2270 return pLocale; 2271 return pLocale;
2271 } 2272 }
2272 FX_BOOL bLocale = FALSE; 2273 FX_BOOL bLocale = FALSE;
2273 CFX_WideString wsLocaleName; 2274 CFX_WideString wsLocaleName;
2274 bLocale = m_pNode->GetLocaleName(wsLocaleName); 2275 bLocale = m_pNode->GetLocaleName(wsLocaleName);
2275 if (bLocale) { 2276 if (bLocale) {
2276 if (wsLocaleName == FX_WSTRC(L"ambient")) { 2277 if (wsLocaleName == FX_WSTRC(L"ambient")) {
2277 pLocale = m_pNode->GetDocument()->GetLocalMgr()->GetDefLocale(); 2278 pLocale = m_pNode->GetDocument()->GetLocalMgr()->GetDefLocale();
2278 } else { 2279 } else {
2279 pLocale = 2280 pLocale = m_pNode->GetDocument()->GetLocalMgr()->GetLocaleByName(
2280 m_pNode->GetDocument()->GetLocalMgr()->GetLocaleByName(wsLocaleName); 2281 wsLocaleName.AsWideStringC());
2281 } 2282 }
2282 } 2283 }
2283 return pLocale; 2284 return pLocale;
2284 } 2285 }
2285 static FX_BOOL XFA_SplitDateTime(const CFX_WideString& wsDateTime, 2286 static FX_BOOL XFA_SplitDateTime(const CFX_WideString& wsDateTime,
2286 CFX_WideString& wsDate, 2287 CFX_WideString& wsDate,
2287 CFX_WideString& wsTime) { 2288 CFX_WideString& wsTime) {
2288 wsDate = L""; 2289 wsDate = L"";
2289 wsTime = L""; 2290 wsTime = L"";
2290 if (wsDateTime.IsEmpty()) { 2291 if (wsDateTime.IsEmpty()) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2325 } 2326 }
2326 } 2327 }
2327 return TRUE; 2328 return TRUE;
2328 } 2329 }
2329 2330
2330 FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString& wsValue, 2331 FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString& wsValue,
2331 XFA_VALUEPICTURE eValueType) { 2332 XFA_VALUEPICTURE eValueType) {
2332 wsValue = m_pNode->GetContent(); 2333 wsValue = m_pNode->GetContent();
2333 2334
2334 if (eValueType == XFA_VALUEPICTURE_Display) 2335 if (eValueType == XFA_VALUEPICTURE_Display)
2335 GetItemLabel(wsValue, wsValue); 2336 GetItemLabel(wsValue.AsWideStringC(), wsValue);
2336 2337
2337 CFX_WideString wsPicture; 2338 CFX_WideString wsPicture;
2338 GetPictureContent(wsPicture, eValueType); 2339 GetPictureContent(wsPicture, eValueType);
2339 CXFA_Node* pNode = GetUIChild(); 2340 CXFA_Node* pNode = GetUIChild();
2340 if (!pNode) 2341 if (!pNode)
2341 return TRUE; 2342 return TRUE;
2342 2343
2343 XFA_ELEMENT uiType = GetUIChild()->GetClassID(); 2344 XFA_ELEMENT uiType = GetUIChild()->GetClassID();
2344 switch (uiType) { 2345 switch (uiType) {
2345 case XFA_ELEMENT_ChoiceList: { 2346 case XFA_ELEMENT_ChoiceList: {
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
2568 } 2569 }
2569 } 2570 }
2570 void CXFA_WidgetData::SyncValue(const CFX_WideString& wsValue, 2571 void CXFA_WidgetData::SyncValue(const CFX_WideString& wsValue,
2571 FX_BOOL bNotify) { 2572 FX_BOOL bNotify) {
2572 if (!m_pNode) { 2573 if (!m_pNode) {
2573 return; 2574 return;
2574 } 2575 }
2575 CFX_WideString wsFormatValue(wsValue); 2576 CFX_WideString wsFormatValue(wsValue);
2576 CXFA_WidgetData* pContainerWidgetData = m_pNode->GetContainerWidgetData(); 2577 CXFA_WidgetData* pContainerWidgetData = m_pNode->GetContainerWidgetData();
2577 if (pContainerWidgetData) { 2578 if (pContainerWidgetData) {
2578 pContainerWidgetData->GetFormatDataValue(wsValue, wsFormatValue); 2579 pContainerWidgetData->GetFormatDataValue(wsValue.AsWideStringC(),
2580 wsFormatValue);
2579 } 2581 }
2580 m_pNode->SetContent(wsValue, wsFormatValue, bNotify); 2582 m_pNode->SetContent(wsValue, wsFormatValue, bNotify);
2581 } 2583 }
2582 void CXFA_WidgetData::InsertListTextItem(CXFA_Node* pItems, 2584 void CXFA_WidgetData::InsertListTextItem(CXFA_Node* pItems,
2583 const CFX_WideStringC& wsText, 2585 const CFX_WideStringC& wsText,
2584 int32_t nIndex) { 2586 int32_t nIndex) {
2585 CXFA_Node* pText = pItems->CreateSamePacketNode(XFA_ELEMENT_Text); 2587 CXFA_Node* pText = pItems->CreateSamePacketNode(XFA_ELEMENT_Text);
2586 pItems->InsertChild(nIndex, pText); 2588 pItems->InsertChild(nIndex, pText);
2587 pText->SetContent(wsText, wsText, FALSE, FALSE, FALSE); 2589 pText->SetContent(wsText, wsText, FALSE, FALSE, FALSE);
2588 } 2590 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
2648 XFA_ATTRIBUTE attributeValue = XFA_ATTRIBUTE_Type, 2650 XFA_ATTRIBUTE attributeValue = XFA_ATTRIBUTE_Type,
2649 XFA_ATTRIBUTEENUM eDefaultValue = XFA_ATTRIBUTEENUM_Optional) { 2651 XFA_ATTRIBUTEENUM eDefaultValue = XFA_ATTRIBUTEENUM_Optional) {
2650 XFA_ATTRIBUTEENUM eType = eDefaultValue; 2652 XFA_ATTRIBUTEENUM eType = eDefaultValue;
2651 if (pNode) { 2653 if (pNode) {
2652 if (!pNode->TryEnum(attributeValue, eType, TRUE)) { 2654 if (!pNode->TryEnum(attributeValue, eType, TRUE)) {
2653 eType = eDefaultValue; 2655 eType = eDefaultValue;
2654 } 2656 }
2655 } 2657 }
2656 return eType; 2658 return eType;
2657 } 2659 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_object_imp.cpp ('k') | xfa/fxfa/parser/xfa_parser_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698