summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_calculatedata.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-12-14 20:14:54 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-14 20:14:54 +0000
commit2eeb42b74b1d29b3cf7fb7344530137debb680dd (patch)
treeb7eefd640caca6ba4556208d210ed51a01d4d522 /xfa/fxfa/parser/cxfa_calculatedata.cpp
parent0821c95ee9f132f77f3670a7dbbf114a82a6b9a0 (diff)
downloadpdfium-2eeb42b74b1d29b3cf7fb7344530137debb680dd.tar.xz
Fold CXFA_TextData into CXFA_Text
This CL folds the CXFA_TextData back into CXFA_Text. CXFA_TextData is a thin wrapper around the CXFA_Text object. Change-Id: I4edc37f2ac66fc9b662942d3351fce6b697f27c7 Reviewed-on: https://pdfium-review.googlesource.com/21172 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_calculatedata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_calculatedata.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_calculatedata.cpp b/xfa/fxfa/parser/cxfa_calculatedata.cpp
index b0feb59fd4..32dc8ef5b7 100644
--- a/xfa/fxfa/parser/cxfa_calculatedata.cpp
+++ b/xfa/fxfa/parser/cxfa_calculatedata.cpp
@@ -7,7 +7,7 @@
#include "xfa/fxfa/parser/cxfa_calculatedata.h"
#include "xfa/fxfa/parser/cxfa_node.h"
-#include "xfa/fxfa/parser/cxfa_textdata.h"
+#include "xfa/fxfa/parser/cxfa_text.h"
CXFA_CalculateData::CXFA_CalculateData(CXFA_Node* pNode)
: CXFA_DataData(pNode) {}
@@ -27,8 +27,7 @@ WideString CXFA_CalculateData::GetMessageText() const {
if (!pNode)
return L"";
- CXFA_TextData textData(pNode->GetChild(0, XFA_Element::Text, false));
- if (!textData.HasValidNode())
- return L"";
- return textData.GetContent();
+ CXFA_Text* text =
+ static_cast<CXFA_Text*>(pNode->GetChild(0, XFA_Element::Text, false));
+ return text ? text->GetContent() : L"";
}