summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-02 19:09:58 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-02 19:09:58 +0000
commit3ac07ffafea1ee4d3cf985e32692849dd3fcfdfb (patch)
tree3edbd3db87541a57fa0ee172bd50b70d35d45a11 /xfa/fxfa/parser
parentbf29e5b532e4ef9a309906083b33b6d4c48ff757 (diff)
downloadpdfium-3ac07ffafea1ee4d3cf985e32692849dd3fcfdfb.tar.xz
Cleanup params to CJX_Node::TryCData
This CL removes the bProto param as it was never set and inlines the value where needed in the methods. The default value was removed from bUseDefault and inlined into callsites as needed. Change-Id: I773261d19aa3799bc607e7df482b5f5e5217bee6 Reviewed-on: https://pdfium-review.googlesource.com/17533 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_binditems.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_document.cpp15
-rw-r--r--xfa/fxfa/parser/cxfa_event.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_font.cpp8
-rw-r--r--xfa/fxfa/parser/cxfa_image.cpp5
-rw-r--r--xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_layoutpagemgr.cpp29
-rw-r--r--xfa/fxfa/parser/cxfa_stroke.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_submit.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_validate.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp23
11 files changed, 56 insertions, 46 deletions
diff --git a/xfa/fxfa/parser/cxfa_binditems.cpp b/xfa/fxfa/parser/cxfa_binditems.cpp
index bfa4c30de2..c9d224050f 100644
--- a/xfa/fxfa/parser/cxfa_binditems.cpp
+++ b/xfa/fxfa/parser/cxfa_binditems.cpp
@@ -11,15 +11,15 @@
CXFA_BindItems::CXFA_BindItems(CXFA_Node* pNode) : CXFA_Data(pNode) {}
void CXFA_BindItems::GetLabelRef(WideStringView& wsLabelRef) {
- m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_LabelRef, wsLabelRef);
+ m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_LabelRef, wsLabelRef, true);
}
void CXFA_BindItems::GetValueRef(WideStringView& wsValueRef) {
- m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_ValueRef, wsValueRef);
+ m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_ValueRef, wsValueRef, true);
}
void CXFA_BindItems::GetRef(WideStringView& wsRef) {
- m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Ref, wsRef);
+ m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Ref, wsRef, true);
}
bool CXFA_BindItems::SetConnection(const WideString& wsConnection) {
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp
index 7723d0b5a7..d2c2da814d 100644
--- a/xfa/fxfa/parser/cxfa_document.cpp
+++ b/xfa/fxfa/parser/cxfa_document.cpp
@@ -334,7 +334,7 @@ CXFA_Node* CXFA_Document::GetNodeByID(CXFA_Node* pRoot,
for (CXFA_Node* pNode = sIterator.GetCurrent(); pNode;
pNode = sIterator.MoveToNext()) {
WideStringView wsIDVal;
- if (pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Id, wsIDVal) &&
+ if (pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Id, wsIDVal, true) &&
!wsIDVal.IsEmpty()) {
if (wsIDVal == wsID)
return pNode;
@@ -354,15 +354,16 @@ void CXFA_Document::DoProtoMerge() {
for (CXFA_Node* pNode = sIterator.GetCurrent(); pNode;
pNode = sIterator.MoveToNext()) {
WideStringView wsIDVal;
- if (pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Id, wsIDVal) &&
+ if (pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Id, wsIDVal, true) &&
!wsIDVal.IsEmpty()) {
mIDMap[FX_HashCode_GetW(wsIDVal, false)] = pNode;
}
WideStringView wsUseVal;
- if (pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Use, wsUseVal) &&
+ if (pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Use, wsUseVal, true) &&
!wsUseVal.IsEmpty()) {
sUseNodes.insert(pNode);
- } else if (pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Usehref, wsUseVal) &&
+ } else if (pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Usehref, wsUseVal,
+ true) &&
!wsUseVal.IsEmpty()) {
sUseNodes.insert(pNode);
}
@@ -371,7 +372,8 @@ void CXFA_Document::DoProtoMerge() {
for (CXFA_Node* pUseHrefNode : sUseNodes) {
WideString wsUseVal;
WideStringView wsURI, wsID, wsSOM;
- if (pUseHrefNode->JSNode()->TryCData(XFA_ATTRIBUTE_Usehref, wsUseVal) &&
+ if (pUseHrefNode->JSNode()->TryCData(XFA_ATTRIBUTE_Usehref, wsUseVal,
+ true) &&
!wsUseVal.IsEmpty()) {
auto uSharpPos = wsUseVal.Find('#');
if (!uSharpPos.has_value()) {
@@ -390,7 +392,8 @@ void CXFA_Document::DoProtoMerge() {
uLen - uSharpPos.value() - 1);
}
}
- } else if (pUseHrefNode->JSNode()->TryCData(XFA_ATTRIBUTE_Use, wsUseVal) &&
+ } else if (pUseHrefNode->JSNode()->TryCData(XFA_ATTRIBUTE_Use, wsUseVal,
+ true) &&
!wsUseVal.IsEmpty()) {
if (wsUseVal[0] == '#')
wsID = WideStringView(wsUseVal.c_str() + 1, wsUseVal.GetLength() - 1);
diff --git a/xfa/fxfa/parser/cxfa_event.cpp b/xfa/fxfa/parser/cxfa_event.cpp
index 822baf8ce7..e9f1961f07 100644
--- a/xfa/fxfa/parser/cxfa_event.cpp
+++ b/xfa/fxfa/parser/cxfa_event.cpp
@@ -27,7 +27,7 @@ XFA_Element CXFA_Event::GetEventType() const {
}
void CXFA_Event::GetRef(WideStringView& wsRef) {
- m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Ref, wsRef);
+ m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Ref, wsRef, true);
}
CXFA_Script CXFA_Event::GetScript() const {
@@ -45,6 +45,6 @@ void CXFA_Event::GetSignDataTarget(WideString& wsTarget) {
return;
WideStringView wsCData;
- pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Target, wsCData);
+ pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Target, wsCData, true);
wsTarget = wsCData;
}
diff --git a/xfa/fxfa/parser/cxfa_font.cpp b/xfa/fxfa/parser/cxfa_font.cpp
index 4fc0a57092..d54ac0ba72 100644
--- a/xfa/fxfa/parser/cxfa_font.cpp
+++ b/xfa/fxfa/parser/cxfa_font.cpp
@@ -21,21 +21,21 @@ float CXFA_Font::GetBaselineShift() {
float CXFA_Font::GetHorizontalScale() {
WideString wsValue;
- m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_FontHorizontalScale, wsValue);
+ m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_FontHorizontalScale, wsValue, true);
int32_t iScale = FXSYS_wtoi(wsValue.c_str());
return iScale > 0 ? (float)iScale : 100.0f;
}
float CXFA_Font::GetVerticalScale() {
WideString wsValue;
- m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_FontVerticalScale, wsValue);
+ m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_FontVerticalScale, wsValue, true);
int32_t iScale = FXSYS_wtoi(wsValue.c_str());
return iScale > 0 ? (float)iScale : 100.0f;
}
float CXFA_Font::GetLetterSpacing() {
WideStringView wsValue;
- if (!m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_LetterSpacing, wsValue))
+ if (!m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_LetterSpacing, wsValue, true))
return 0;
CXFA_Measurement ms(wsValue);
@@ -69,7 +69,7 @@ float CXFA_Font::GetFontSize() {
}
void CXFA_Font::GetTypeface(WideStringView& wsTypeFace) {
- m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Typeface, wsTypeFace);
+ m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Typeface, wsTypeFace, true);
}
bool CXFA_Font::IsBold() {
diff --git a/xfa/fxfa/parser/cxfa_image.cpp b/xfa/fxfa/parser/cxfa_image.cpp
index 8a346e0f42..b0afca0d68 100644
--- a/xfa/fxfa/parser/cxfa_image.cpp
+++ b/xfa/fxfa/parser/cxfa_image.cpp
@@ -16,12 +16,13 @@ int32_t CXFA_Image::GetAspect() {
}
bool CXFA_Image::GetContentType(WideString& wsContentType) {
- return m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_ContentType, wsContentType);
+ return m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_ContentType, wsContentType,
+ true);
}
bool CXFA_Image::GetHref(WideString& wsHref) {
if (m_bDefValue)
- return m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Href, wsHref);
+ return m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Href, wsHref, true);
return m_pNode->JSNode()->GetAttribute(L"href", wsHref, true);
}
diff --git a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
index 688990b2fd..428746d3c2 100644
--- a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
@@ -1780,7 +1780,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
: containerSize.width - fLeftInset - fRightInset;
WideStringView wsColumnWidths;
if (pLayoutNode->JSNode()->TryCData(XFA_ATTRIBUTE_ColumnWidths,
- wsColumnWidths)) {
+ wsColumnWidths, true)) {
auto widths = SeparateStringW(wsColumnWidths.unterminated_c_str(),
wsColumnWidths.GetLength(), L' ');
for (auto& width : widths) {
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
index d3a33e7de9..2c1e6e4fd3 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
@@ -66,7 +66,7 @@ class PageSetContainerLayoutItem {
uint32_t GetRelevant(CXFA_Node* pFormItem, uint32_t dwParentRelvant) {
uint32_t dwRelevant = XFA_WidgetStatus_Viewable | XFA_WidgetStatus_Printable;
WideStringView wsRelevant;
- if (pFormItem->JSNode()->TryCData(XFA_ATTRIBUTE_Relevant, wsRelevant)) {
+ if (pFormItem->JSNode()->TryCData(XFA_ATTRIBUTE_Relevant, wsRelevant, true)) {
if (wsRelevant == L"+print" || wsRelevant == L"print")
dwRelevant &= ~XFA_WidgetStatus_Viewable;
else if (wsRelevant == L"-print")
@@ -950,11 +950,11 @@ CXFA_Node* CXFA_LayoutPageMgr::BreakOverflow(CXFA_Node* pOverflowNode,
WideStringView wsOverflowTarget;
WideStringView wsOverflowTrailer;
pOverflowNode->JSNode()->TryCData(XFA_ATTRIBUTE_OverflowLeader,
- wsOverflowLeader);
+ wsOverflowLeader, true);
pOverflowNode->JSNode()->TryCData(XFA_ATTRIBUTE_OverflowTrailer,
- wsOverflowTrailer);
+ wsOverflowTrailer, true);
pOverflowNode->JSNode()->TryCData(XFA_ATTRIBUTE_OverflowTarget,
- wsOverflowTarget);
+ wsOverflowTarget, true);
if (!wsOverflowLeader.IsEmpty() || !wsOverflowTrailer.IsEmpty() ||
!wsOverflowTarget.IsEmpty()) {
if (!wsOverflowTarget.IsEmpty() && bCreatePage &&
@@ -994,9 +994,12 @@ CXFA_Node* CXFA_LayoutPageMgr::BreakOverflow(CXFA_Node* pOverflowNode,
WideStringView wsOverflowLeader;
WideStringView wsOverflowTrailer;
WideStringView wsOverflowTarget;
- pOverflowNode->JSNode()->TryCData(XFA_ATTRIBUTE_Leader, wsOverflowLeader);
- pOverflowNode->JSNode()->TryCData(XFA_ATTRIBUTE_Trailer, wsOverflowTrailer);
- pOverflowNode->JSNode()->TryCData(XFA_ATTRIBUTE_Target, wsOverflowTarget);
+ pOverflowNode->JSNode()->TryCData(XFA_ATTRIBUTE_Leader, wsOverflowLeader,
+ true);
+ pOverflowNode->JSNode()->TryCData(XFA_ATTRIBUTE_Trailer, wsOverflowTrailer,
+ true);
+ pOverflowNode->JSNode()->TryCData(XFA_ATTRIBUTE_Target, wsOverflowTarget,
+ true);
if (!wsOverflowTarget.IsEmpty() && bCreatePage && !m_bCreateOverFlowPage) {
CXFA_Node* pTarget =
ResolveBreakTarget(m_pTemplatePageSetRoot, true, wsOverflowTarget);
@@ -1088,7 +1091,7 @@ bool CXFA_LayoutPageMgr::ResolveBookendLeaderOrTrailer(
if (pBookendNode->GetElementType() == XFA_Element::Break) {
pBookendNode->JSNode()->TryCData(
bLeader ? XFA_ATTRIBUTE_BookendLeader : XFA_ATTRIBUTE_BookendTrailer,
- wsBookendLeader);
+ wsBookendLeader, true);
if (!wsBookendLeader.IsEmpty()) {
pBookendAppendTemplate =
ResolveBreakTarget(pContainer, false, wsBookendLeader);
@@ -1097,8 +1100,8 @@ bool CXFA_LayoutPageMgr::ResolveBookendLeaderOrTrailer(
return false;
} else if (pBookendNode->GetElementType() == XFA_Element::Bookend) {
pBookendNode->JSNode()->TryCData(
- bLeader ? XFA_ATTRIBUTE_Leader : XFA_ATTRIBUTE_Trailer,
- wsBookendLeader);
+ bLeader ? XFA_ATTRIBUTE_Leader : XFA_ATTRIBUTE_Trailer, wsBookendLeader,
+ true);
pBookendAppendTemplate =
ResolveBreakTarget(pContainer, true, wsBookendLeader);
return true;
@@ -1664,11 +1667,11 @@ CXFA_Node* CXFA_LayoutPageMgr::QueryOverflow(CXFA_Node* pFormNode) {
WideStringView wsOverflowTarget;
WideStringView wsOverflowTrailer;
pCurNode->JSNode()->TryCData(XFA_ATTRIBUTE_OverflowLeader,
- wsOverflowLeader);
+ wsOverflowLeader, true);
pCurNode->JSNode()->TryCData(XFA_ATTRIBUTE_OverflowTrailer,
- wsOverflowTrailer);
+ wsOverflowTrailer, true);
pCurNode->JSNode()->TryCData(XFA_ATTRIBUTE_OverflowTarget,
- wsOverflowTarget);
+ wsOverflowTarget, true);
if (!wsOverflowLeader.IsEmpty() || !wsOverflowTrailer.IsEmpty() ||
!wsOverflowTarget.IsEmpty()) {
return pCurNode;
diff --git a/xfa/fxfa/parser/cxfa_stroke.cpp b/xfa/fxfa/parser/cxfa_stroke.cpp
index 15ff71313e..062e2e8da0 100644
--- a/xfa/fxfa/parser/cxfa_stroke.cpp
+++ b/xfa/fxfa/parser/cxfa_stroke.cpp
@@ -53,7 +53,7 @@ FX_ARGB CXFA_Stroke::GetColor() const {
return 0xFF000000;
WideStringView wsColor;
- pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Value, wsColor);
+ pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Value, wsColor, true);
return CXFA_Data::ToColor(wsColor);
}
diff --git a/xfa/fxfa/parser/cxfa_submit.cpp b/xfa/fxfa/parser/cxfa_submit.cpp
index c4fb22582c..b7802c0248 100644
--- a/xfa/fxfa/parser/cxfa_submit.cpp
+++ b/xfa/fxfa/parser/cxfa_submit.cpp
@@ -19,9 +19,9 @@ int32_t CXFA_Submit::GetSubmitFormat() {
}
void CXFA_Submit::GetSubmitTarget(WideStringView& wsTarget) {
- m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Target, wsTarget);
+ m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Target, wsTarget, true);
}
void CXFA_Submit::GetSubmitXDPContent(WideStringView& wsContent) {
- m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_XdpContent, wsContent);
+ m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_XdpContent, wsContent, true);
}
diff --git a/xfa/fxfa/parser/cxfa_validate.cpp b/xfa/fxfa/parser/cxfa_validate.cpp
index f2892e507f..0df92d310c 100644
--- a/xfa/fxfa/parser/cxfa_validate.cpp
+++ b/xfa/fxfa/parser/cxfa_validate.cpp
@@ -54,7 +54,7 @@ void CXFA_Validate::GetMessageText(WideString& wsMessage,
continue;
WideStringView wsName;
- pItemNode->JSNode()->TryCData(XFA_ATTRIBUTE_Name, wsName);
+ pItemNode->JSNode()->TryCData(XFA_ATTRIBUTE_Name, wsName, true);
if (wsName.IsEmpty() || wsName == wsMessageType) {
pItemNode->JSNode()->TryContent(wsMessage);
return;
@@ -92,7 +92,7 @@ void CXFA_Validate::SetMessageText(WideString& wsMessage,
continue;
WideStringView wsName;
- pItemNode->JSNode()->TryCData(XFA_ATTRIBUTE_Name, wsName);
+ pItemNode->JSNode()->TryCData(XFA_ATTRIBUTE_Name, wsName, true);
if (wsName.IsEmpty() || wsName == wsMessageType) {
pItemNode->JSNode()->SetContent(wsMessage, wsMessage, false, false, true);
return;
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index a0ac520981..1d6ea33859 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -445,7 +445,7 @@ bool CXFA_WidgetData::GetButtonRollover(WideString& wsRollover,
CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pText) {
WideStringView wsName;
- pText->JSNode()->TryCData(XFA_ATTRIBUTE_Name, wsName);
+ pText->JSNode()->TryCData(XFA_ATTRIBUTE_Name, wsName, true);
if (wsName == L"rollover") {
pText->JSNode()->TryContent(wsRollover);
bRichText = pText->GetElementType() == XFA_Element::ExData;
@@ -462,7 +462,7 @@ bool CXFA_WidgetData::GetButtonDown(WideString& wsDown, bool& bRichText) {
CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pText) {
WideStringView wsName;
- pText->JSNode()->TryCData(XFA_ATTRIBUTE_Name, wsName);
+ pText->JSNode()->TryCData(XFA_ATTRIBUTE_Name, wsName, true);
if (wsName == L"down") {
pText->JSNode()->TryContent(wsDown);
bRichText = pText->GetElementType() == XFA_Element::ExData;
@@ -1177,8 +1177,8 @@ WideString CXFA_WidgetData::GetBarcodeType() {
bool CXFA_WidgetData::GetBarcodeAttribute_CharEncoding(int32_t* val) {
CXFA_Node* pUIChild = GetUIChild();
WideString wsCharEncoding;
- if (pUIChild->JSNode()->TryCData(XFA_ATTRIBUTE_CharEncoding,
- wsCharEncoding)) {
+ if (pUIChild->JSNode()->TryCData(XFA_ATTRIBUTE_CharEncoding, wsCharEncoding,
+ true)) {
if (wsCharEncoding.CompareNoCase(L"UTF-16")) {
*val = CHAR_ENCODING_UNICODE;
return true;
@@ -1218,7 +1218,8 @@ bool CXFA_WidgetData::GetBarcodeAttribute_Checksum(bool* val) {
bool CXFA_WidgetData::GetBarcodeAttribute_DataLength(int32_t* val) {
CXFA_Node* pUIChild = GetUIChild();
WideString wsDataLength;
- if (pUIChild->JSNode()->TryCData(XFA_ATTRIBUTE_DataLength, wsDataLength)) {
+ if (pUIChild->JSNode()->TryCData(XFA_ATTRIBUTE_DataLength, wsDataLength,
+ true)) {
*val = FXSYS_wtoi(wsDataLength.c_str());
return true;
}
@@ -1228,7 +1229,8 @@ bool CXFA_WidgetData::GetBarcodeAttribute_DataLength(int32_t* val) {
bool CXFA_WidgetData::GetBarcodeAttribute_StartChar(char* val) {
CXFA_Node* pUIChild = GetUIChild();
WideStringView wsStartEndChar;
- if (pUIChild->JSNode()->TryCData(XFA_ATTRIBUTE_StartChar, wsStartEndChar)) {
+ if (pUIChild->JSNode()->TryCData(XFA_ATTRIBUTE_StartChar, wsStartEndChar,
+ true)) {
if (wsStartEndChar.GetLength()) {
*val = static_cast<char>(wsStartEndChar[0]);
return true;
@@ -1240,7 +1242,8 @@ bool CXFA_WidgetData::GetBarcodeAttribute_StartChar(char* val) {
bool CXFA_WidgetData::GetBarcodeAttribute_EndChar(char* val) {
CXFA_Node* pUIChild = GetUIChild();
WideStringView wsStartEndChar;
- if (pUIChild->JSNode()->TryCData(XFA_ATTRIBUTE_EndChar, wsStartEndChar)) {
+ if (pUIChild->JSNode()->TryCData(XFA_ATTRIBUTE_EndChar, wsStartEndChar,
+ true)) {
if (wsStartEndChar.GetLength()) {
*val = static_cast<char>(wsStartEndChar[0]);
return true;
@@ -1253,7 +1256,7 @@ bool CXFA_WidgetData::GetBarcodeAttribute_ECLevel(int32_t* val) {
CXFA_Node* pUIChild = GetUIChild();
WideString wsECLevel;
if (pUIChild->JSNode()->TryCData(XFA_ATTRIBUTE_ErrorCorrectionLevel,
- wsECLevel)) {
+ wsECLevel, true)) {
*val = FXSYS_wtoi(wsECLevel.c_str());
return true;
}
@@ -1334,7 +1337,7 @@ bool CXFA_WidgetData::GetBarcodeAttribute_WideNarrowRatio(float* val) {
CXFA_Node* pUIChild = GetUIChild();
WideString wsWideNarrowRatio;
if (pUIChild->JSNode()->TryCData(XFA_ATTRIBUTE_WideNarrowRatio,
- wsWideNarrowRatio)) {
+ wsWideNarrowRatio, true)) {
auto ptPos = wsWideNarrowRatio.Find(':');
float fRatio = 0;
if (!ptPos.has_value()) {
@@ -1358,7 +1361,7 @@ bool CXFA_WidgetData::GetBarcodeAttribute_WideNarrowRatio(float* val) {
void CXFA_WidgetData::GetPasswordChar(WideString& wsPassWord) {
CXFA_Node* pUIChild = GetUIChild();
if (pUIChild) {
- pUIChild->JSNode()->TryCData(XFA_ATTRIBUTE_PasswordChar, wsPassWord);
+ pUIChild->JSNode()->TryCData(XFA_ATTRIBUTE_PasswordChar, wsPassWord, true);
} else {
wsPassWord = GetAttributeDefaultValue_Cdata(XFA_Element::PasswordEdit,
XFA_ATTRIBUTE_PasswordChar,