summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-20 21:17:43 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-20 21:17:43 +0000
commit89453e92d5d0b7aaf9e0c3890a90a21adc94a0ce (patch)
tree6a140e4f2b67474127dd9c9b7d2a008c9832306d /xfa/fxfa
parent1699413c207c228ae7eae3d47e89adacc1146d65 (diff)
downloadpdfium-89453e92d5d0b7aaf9e0c3890a90a21adc94a0ce.tar.xz
Convert CXFA_CalculateData::GetMessageText to return WideString
Change-Id: I2ae79c6e77fe2717519156af15cd6cbdd19b58f1 Reviewed-on: https://pdfium-review.googlesource.com/18813 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_fffield.cpp3
-rw-r--r--xfa/fxfa/cxfa_widgetacc.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_calculatedata.cpp9
-rw-r--r--xfa/fxfa/parser/cxfa_calculatedata.h2
-rw-r--r--xfa/fxfa/parser/cxfa_textdata.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_textdata.h2
6 files changed, 11 insertions, 11 deletions
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp
index 9758eb76dc..e2f7b6a2f2 100644
--- a/xfa/fxfa/cxfa_fffield.cpp
+++ b/xfa/fxfa/cxfa_fffield.cpp
@@ -701,8 +701,7 @@ int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) {
if (!pAppProvider)
return 0;
- WideString wsMessage;
- calcData.GetMessageText(wsMessage);
+ WideString wsMessage = calcData.GetMessageText();
if (!wsMessage.IsEmpty())
wsMessage += L"\r\n";
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp
index 6f852f3321..192948d41e 100644
--- a/xfa/fxfa/cxfa_widgetacc.cpp
+++ b/xfa/fxfa/cxfa_widgetacc.cpp
@@ -500,7 +500,7 @@ WideString CXFA_WidgetAcc::GetValidateCaptionName(bool bVersionFlag) {
if (CXFA_CaptionData captionData = GetCaptionData()) {
if (CXFA_ValueData capValue = captionData.GetValueData()) {
if (CXFA_TextData captionTextData = capValue.GetTextData())
- captionTextData.GetContent(wsCaptionName);
+ wsCaptionName = captionTextData.GetContent();
}
}
}
diff --git a/xfa/fxfa/parser/cxfa_calculatedata.cpp b/xfa/fxfa/parser/cxfa_calculatedata.cpp
index b468be77db..fb101d9244 100644
--- a/xfa/fxfa/parser/cxfa_calculatedata.cpp
+++ b/xfa/fxfa/parser/cxfa_calculatedata.cpp
@@ -22,12 +22,13 @@ CXFA_ScriptData CXFA_CalculateData::GetScriptData() {
return CXFA_ScriptData(m_pNode->GetChild(0, XFA_Element::Script, false));
}
-void CXFA_CalculateData::GetMessageText(WideString& wsMessage) {
+WideString CXFA_CalculateData::GetMessageText() {
CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Message, false);
if (!pNode)
- return;
+ return L"";
CXFA_TextData textData(pNode->GetChild(0, XFA_Element::Text, false));
- if (textData)
- textData.GetContent(wsMessage);
+ if (!textData)
+ return L"";
+ return textData.GetContent();
}
diff --git a/xfa/fxfa/parser/cxfa_calculatedata.h b/xfa/fxfa/parser/cxfa_calculatedata.h
index e2784aa970..9b6786a42c 100644
--- a/xfa/fxfa/parser/cxfa_calculatedata.h
+++ b/xfa/fxfa/parser/cxfa_calculatedata.h
@@ -19,7 +19,7 @@ class CXFA_CalculateData : public CXFA_DataData {
int32_t GetOverride();
CXFA_ScriptData GetScriptData();
- void GetMessageText(WideString& wsMessage);
+ WideString GetMessageText();
};
#endif // XFA_FXFA_PARSER_CXFA_CALCULATEDATA_H_
diff --git a/xfa/fxfa/parser/cxfa_textdata.cpp b/xfa/fxfa/parser/cxfa_textdata.cpp
index 9fdc3006a8..adecd9c831 100644
--- a/xfa/fxfa/parser/cxfa_textdata.cpp
+++ b/xfa/fxfa/parser/cxfa_textdata.cpp
@@ -10,6 +10,6 @@
CXFA_TextData::CXFA_TextData(CXFA_Node* pNode) : CXFA_DataData(pNode) {}
-void CXFA_TextData::GetContent(WideString& wsText) {
- wsText = m_pNode->JSNode()->GetContent(false);
+WideString CXFA_TextData::GetContent() {
+ return m_pNode->JSNode()->GetContent(false);
}
diff --git a/xfa/fxfa/parser/cxfa_textdata.h b/xfa/fxfa/parser/cxfa_textdata.h
index b504e567b5..79ab48e41f 100644
--- a/xfa/fxfa/parser/cxfa_textdata.h
+++ b/xfa/fxfa/parser/cxfa_textdata.h
@@ -16,7 +16,7 @@ class CXFA_TextData : public CXFA_DataData {
public:
explicit CXFA_TextData(CXFA_Node* pNode);
- void GetContent(WideString& wsText);
+ WideString GetContent();
};
#endif // XFA_FXFA_PARSER_CXFA_TEXTDATA_H_