diff options
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r-- | xfa/fxfa/parser/cxfa_calculatedata.cpp | 9 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_calculatedata.h | 2 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_textdata.cpp | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_textdata.h | 2 |
4 files changed, 9 insertions, 8 deletions
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_ |