From d4a4b038d694681b2eaadef9ad6c5e316c67f2e1 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 7 Nov 2017 21:35:30 +0000 Subject: Rename CXFA_Text to CXFA_TextData This CL renames CXFA_Text to CXFA_TextData to show it is part of the data hierarchy. Change-Id: If60e480d0590a72b71e06c46aaef831a07f085da Reviewed-on: https://pdfium-review.googlesource.com/18015 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- BUILD.gn | 4 ++-- xfa/fxfa/cxfa_widgetacc.cpp | 4 ++-- xfa/fxfa/parser/cxfa_calculatedata.cpp | 8 ++++---- xfa/fxfa/parser/cxfa_text.cpp | 15 --------------- xfa/fxfa/parser/cxfa_text.h | 22 ---------------------- xfa/fxfa/parser/cxfa_textdata.cpp | 15 +++++++++++++++ xfa/fxfa/parser/cxfa_textdata.h | 22 ++++++++++++++++++++++ xfa/fxfa/parser/cxfa_value.cpp | 6 +++--- xfa/fxfa/parser/cxfa_value.h | 4 ++-- 9 files changed, 50 insertions(+), 50 deletions(-) delete mode 100644 xfa/fxfa/parser/cxfa_text.cpp delete mode 100644 xfa/fxfa/parser/cxfa_text.h create mode 100644 xfa/fxfa/parser/cxfa_textdata.cpp create mode 100644 xfa/fxfa/parser/cxfa_textdata.h diff --git a/BUILD.gn b/BUILD.gn index 29d83a5fed..06abf6e716 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1871,8 +1871,8 @@ if (pdf_enable_xfa) { "xfa/fxfa/parser/cxfa_strokedata.h", "xfa/fxfa/parser/cxfa_submitdata.cpp", "xfa/fxfa/parser/cxfa_submitdata.h", - "xfa/fxfa/parser/cxfa_text.cpp", - "xfa/fxfa/parser/cxfa_text.h", + "xfa/fxfa/parser/cxfa_textdata.cpp", + "xfa/fxfa/parser/cxfa_textdata.h", "xfa/fxfa/parser/cxfa_thisproxy.cpp", "xfa/fxfa/parser/cxfa_thisproxy.h", "xfa/fxfa/parser/cxfa_timezoneprovider.cpp", diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp index 04733934a8..e9ccaaa218 100644 --- a/xfa/fxfa/cxfa_widgetacc.cpp +++ b/xfa/fxfa/cxfa_widgetacc.cpp @@ -505,8 +505,8 @@ WideString CXFA_WidgetAcc::GetValidateCaptionName(bool bVersionFlag) { if (!bVersionFlag) { if (CXFA_CaptionData captionData = GetCaptionData()) { if (CXFA_Value capValue = captionData.GetValue()) { - if (CXFA_Text capText = capValue.GetText()) - capText.GetContent(wsCaptionName); + if (CXFA_TextData captionTextData = capValue.GetTextData()) + captionTextData.GetContent(wsCaptionName); } } } diff --git a/xfa/fxfa/parser/cxfa_calculatedata.cpp b/xfa/fxfa/parser/cxfa_calculatedata.cpp index 599ffe3c8f..c839a34cef 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_text.h" +#include "xfa/fxfa/parser/cxfa_textdata.h" CXFA_CalculateData::CXFA_CalculateData(CXFA_Node* pNode) : CXFA_Data(pNode) {} @@ -26,7 +26,7 @@ void CXFA_CalculateData::GetMessageText(WideString& wsMessage) { if (!pNode) return; - CXFA_Text text(pNode->GetChild(0, XFA_Element::Text, false)); - if (text) - text.GetContent(wsMessage); + CXFA_TextData textData(pNode->GetChild(0, XFA_Element::Text, false)); + if (textData) + textData.GetContent(wsMessage); } diff --git a/xfa/fxfa/parser/cxfa_text.cpp b/xfa/fxfa/parser/cxfa_text.cpp deleted file mode 100644 index 7abca0a92f..0000000000 --- a/xfa/fxfa/parser/cxfa_text.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2016 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#include "xfa/fxfa/parser/cxfa_text.h" - -#include "xfa/fxfa/parser/cxfa_node.h" - -CXFA_Text::CXFA_Text(CXFA_Node* pNode) : CXFA_Data(pNode) {} - -void CXFA_Text::GetContent(WideString& wsText) { - m_pNode->JSNode()->TryContent(wsText, false, true); -} diff --git a/xfa/fxfa/parser/cxfa_text.h b/xfa/fxfa/parser/cxfa_text.h deleted file mode 100644 index 18b5628482..0000000000 --- a/xfa/fxfa/parser/cxfa_text.h +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2016 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_FXFA_PARSER_CXFA_TEXT_H_ -#define XFA_FXFA_PARSER_CXFA_TEXT_H_ - -#include "core/fxcrt/fx_string.h" -#include "xfa/fxfa/parser/cxfa_data.h" - -class CXFA_Node; - -class CXFA_Text : public CXFA_Data { - public: - explicit CXFA_Text(CXFA_Node* pNode); - - void GetContent(WideString& wsText); -}; - -#endif // XFA_FXFA_PARSER_CXFA_TEXT_H_ diff --git a/xfa/fxfa/parser/cxfa_textdata.cpp b/xfa/fxfa/parser/cxfa_textdata.cpp new file mode 100644 index 0000000000..95e2c980dd --- /dev/null +++ b/xfa/fxfa/parser/cxfa_textdata.cpp @@ -0,0 +1,15 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#include "xfa/fxfa/parser/cxfa_textdata.h" + +#include "xfa/fxfa/parser/cxfa_node.h" + +CXFA_TextData::CXFA_TextData(CXFA_Node* pNode) : CXFA_Data(pNode) {} + +void CXFA_TextData::GetContent(WideString& wsText) { + m_pNode->JSNode()->TryContent(wsText, false, true); +} diff --git a/xfa/fxfa/parser/cxfa_textdata.h b/xfa/fxfa/parser/cxfa_textdata.h new file mode 100644 index 0000000000..9ebf1e08e4 --- /dev/null +++ b/xfa/fxfa/parser/cxfa_textdata.h @@ -0,0 +1,22 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef XFA_FXFA_PARSER_CXFA_TEXTDATA_H_ +#define XFA_FXFA_PARSER_CXFA_TEXTDATA_H_ + +#include "core/fxcrt/fx_string.h" +#include "xfa/fxfa/parser/cxfa_data.h" + +class CXFA_Node; + +class CXFA_TextData : public CXFA_Data { + public: + explicit CXFA_TextData(CXFA_Node* pNode); + + void GetContent(WideString& wsText); +}; + +#endif // XFA_FXFA_PARSER_CXFA_TEXTDATA_H_ diff --git a/xfa/fxfa/parser/cxfa_value.cpp b/xfa/fxfa/parser/cxfa_value.cpp index fcfaf6b9ce..ca3f4fd680 100644 --- a/xfa/fxfa/parser/cxfa_value.cpp +++ b/xfa/fxfa/parser/cxfa_value.cpp @@ -39,9 +39,9 @@ CXFA_RectangleData CXFA_Value::GetRectangleData() { m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild) : nullptr); } -CXFA_Text CXFA_Value::GetText() { - return CXFA_Text(m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild) - : nullptr); +CXFA_TextData CXFA_Value::GetTextData() { + return CXFA_TextData(m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild) + : nullptr); } CXFA_ExData CXFA_Value::GetExData() { diff --git a/xfa/fxfa/parser/cxfa_value.h b/xfa/fxfa/parser/cxfa_value.h index c6683238f5..193cc09cb7 100644 --- a/xfa/fxfa/parser/cxfa_value.h +++ b/xfa/fxfa/parser/cxfa_value.h @@ -14,7 +14,7 @@ #include "xfa/fxfa/parser/cxfa_imagedata.h" #include "xfa/fxfa/parser/cxfa_linedata.h" #include "xfa/fxfa/parser/cxfa_rectangledata.h" -#include "xfa/fxfa/parser/cxfa_text.h" +#include "xfa/fxfa/parser/cxfa_textdata.h" class CXFA_Node; @@ -27,7 +27,7 @@ class CXFA_Value : public CXFA_Data { CXFA_ArcData GetArcData(); CXFA_LineData GetLineData(); CXFA_RectangleData GetRectangleData(); - CXFA_Text GetText(); + CXFA_TextData GetTextData(); CXFA_ExData GetExData(); CXFA_ImageData GetImageData(); }; -- cgit v1.2.3