diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-04-04 15:10:00 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-04 19:54:55 +0000 |
commit | 93bfc262074abf003ba4ab0ff1d9767d8dfa9a3d (patch) | |
tree | fd2c2c9d0a99923d397501f85e780498928a7e35 /xfa/fxfa/parser/xfa_utils.cpp | |
parent | b2fb20e0f8e7ea368c541d35ccb61506041f7ddd (diff) | |
download | pdfium-93bfc262074abf003ba4ab0ff1d9767d8dfa9a3d.tar.xz |
Cleanup CFDE_XMLCharData and CFDE_XMLText
This Cl switchs CFDE_XMLCharData to subclass CFDE_XMLText and cleans up
the code which was the same except for the accessor names.
Change-Id: I85ebf4f3f19f0d15be4dd77a71b89ca8083f4b1e
Reviewed-on: https://pdfium-review.googlesource.com/3672
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/xfa_utils.cpp')
-rw-r--r-- | xfa/fxfa/parser/xfa_utils.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp index df180f2183..57d97519a1 100644 --- a/xfa/fxfa/parser/xfa_utils.cpp +++ b/xfa/fxfa/parser/xfa_utils.cpp @@ -192,17 +192,15 @@ void XFA_GetPlainTextFromRichText(CFDE_XMLNode* pXMLNode, wsPlainText += L"\n"; } } - } break; - case FDE_XMLNODE_Text: { - CFX_WideString wsContent; - static_cast<CFDE_XMLText*>(pXMLNode)->GetText(wsContent); - wsPlainText += wsContent; - } break; + break; + } + case FDE_XMLNODE_Text: case FDE_XMLNODE_CharData: { - CFX_WideString wsCharData; - static_cast<CFDE_XMLCharData*>(pXMLNode)->GetCharData(wsCharData); - wsPlainText += wsCharData; - } break; + CFX_WideString wsContent = + static_cast<CFDE_XMLText*>(pXMLNode)->GetText(); + wsPlainText += wsContent; + break; + } default: break; } |