From 5bd9a0bf3a6bf81c3706df595387f9fc497bbd72 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 7 Nov 2017 21:36:10 +0000 Subject: Rename CXFA_ToolTip to CXFA_ToolTipData This CL renames CXFA_ToolTip to CXFA_ToolTipData to signify it is part of the data hierarchy. Change-Id: I841ce0ee5841b652e03041f21bc220d9edc7564a Reviewed-on: https://pdfium-review.googlesource.com/18016 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- BUILD.gn | 4 ++-- xfa/fxfa/cxfa_ffwidget.cpp | 6 +++--- xfa/fxfa/parser/cxfa_assistdata.cpp | 4 ++-- xfa/fxfa/parser/cxfa_assistdata.h | 4 ++-- xfa/fxfa/parser/cxfa_tooltip.cpp | 15 --------------- xfa/fxfa/parser/cxfa_tooltip.h | 22 ---------------------- xfa/fxfa/parser/cxfa_tooltipdata.cpp | 15 +++++++++++++++ xfa/fxfa/parser/cxfa_tooltipdata.h | 22 ++++++++++++++++++++++ 8 files changed, 46 insertions(+), 46 deletions(-) delete mode 100644 xfa/fxfa/parser/cxfa_tooltip.cpp delete mode 100644 xfa/fxfa/parser/cxfa_tooltip.h create mode 100644 xfa/fxfa/parser/cxfa_tooltipdata.cpp create mode 100644 xfa/fxfa/parser/cxfa_tooltipdata.h diff --git a/BUILD.gn b/BUILD.gn index 06abf6e716..6df5f9c4a7 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1877,8 +1877,8 @@ if (pdf_enable_xfa) { "xfa/fxfa/parser/cxfa_thisproxy.h", "xfa/fxfa/parser/cxfa_timezoneprovider.cpp", "xfa/fxfa/parser/cxfa_timezoneprovider.h", - "xfa/fxfa/parser/cxfa_tooltip.cpp", - "xfa/fxfa/parser/cxfa_tooltip.h", + "xfa/fxfa/parser/cxfa_tooltipdata.cpp", + "xfa/fxfa/parser/cxfa_tooltipdata.h", "xfa/fxfa/parser/cxfa_traversestrategy_contentareacontainerlayoutitem.h", "xfa/fxfa/parser/cxfa_traversestrategy_contentlayoutitem.h", "xfa/fxfa/parser/cxfa_traversestrategy_layoutitem.h", diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp index baa9aaf592..708c666c3d 100644 --- a/xfa/fxfa/cxfa_ffwidget.cpp +++ b/xfa/fxfa/cxfa_ffwidget.cpp @@ -974,9 +974,9 @@ CXFA_WidgetAcc* CXFA_FFWidget::GetDataAcc() { bool CXFA_FFWidget::GetToolTip(WideString& wsToolTip) { CXFA_AssistData assist = m_pDataAcc->GetAssistData(); if (assist) { - CXFA_ToolTip toolTip = assist.GetToolTip(); - if (toolTip) - return toolTip.GetTip(wsToolTip); + CXFA_ToolTipData toolTipData = assist.GetToolTipData(); + if (toolTipData) + return toolTipData.GetTip(wsToolTip); } return GetCaptionText(wsToolTip); } diff --git a/xfa/fxfa/parser/cxfa_assistdata.cpp b/xfa/fxfa/parser/cxfa_assistdata.cpp index e480d0ba68..051661f0c7 100644 --- a/xfa/fxfa/parser/cxfa_assistdata.cpp +++ b/xfa/fxfa/parser/cxfa_assistdata.cpp @@ -10,6 +10,6 @@ CXFA_AssistData::CXFA_AssistData(CXFA_Node* pNode) : CXFA_Data(pNode) {} -CXFA_ToolTip CXFA_AssistData::GetToolTip() { - return CXFA_ToolTip(m_pNode->GetChild(0, XFA_Element::ToolTip, false)); +CXFA_ToolTipData CXFA_AssistData::GetToolTipData() { + return CXFA_ToolTipData(m_pNode->GetChild(0, XFA_Element::ToolTip, false)); } diff --git a/xfa/fxfa/parser/cxfa_assistdata.h b/xfa/fxfa/parser/cxfa_assistdata.h index f77ffc4245..8b37473483 100644 --- a/xfa/fxfa/parser/cxfa_assistdata.h +++ b/xfa/fxfa/parser/cxfa_assistdata.h @@ -8,7 +8,7 @@ #define XFA_FXFA_PARSER_CXFA_ASSISTDATA_H_ #include "xfa/fxfa/parser/cxfa_data.h" -#include "xfa/fxfa/parser/cxfa_tooltip.h" +#include "xfa/fxfa/parser/cxfa_tooltipdata.h" class CXFA_Node; @@ -16,7 +16,7 @@ class CXFA_AssistData : public CXFA_Data { public: explicit CXFA_AssistData(CXFA_Node* pNode); - CXFA_ToolTip GetToolTip(); + CXFA_ToolTipData GetToolTipData(); }; #endif // XFA_FXFA_PARSER_CXFA_ASSISTDATA_H_ diff --git a/xfa/fxfa/parser/cxfa_tooltip.cpp b/xfa/fxfa/parser/cxfa_tooltip.cpp deleted file mode 100644 index 7e56c669d5..0000000000 --- a/xfa/fxfa/parser/cxfa_tooltip.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_tooltip.h" - -#include "xfa/fxfa/parser/cxfa_node.h" - -CXFA_ToolTip::CXFA_ToolTip(CXFA_Node* pNode) : CXFA_Data(pNode) {} - -bool CXFA_ToolTip::GetTip(WideString& wsTip) { - return m_pNode->JSNode()->TryContent(wsTip, false, true); -} diff --git a/xfa/fxfa/parser/cxfa_tooltip.h b/xfa/fxfa/parser/cxfa_tooltip.h deleted file mode 100644 index cc4bc31841..0000000000 --- a/xfa/fxfa/parser/cxfa_tooltip.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_TOOLTIP_H_ -#define XFA_FXFA_PARSER_CXFA_TOOLTIP_H_ - -#include "core/fxcrt/fx_string.h" -#include "xfa/fxfa/parser/cxfa_data.h" - -class CXFA_Node; - -class CXFA_ToolTip : public CXFA_Data { - public: - explicit CXFA_ToolTip(CXFA_Node* pNode); - - bool GetTip(WideString& wsTip); -}; - -#endif // XFA_FXFA_PARSER_CXFA_TOOLTIP_H_ diff --git a/xfa/fxfa/parser/cxfa_tooltipdata.cpp b/xfa/fxfa/parser/cxfa_tooltipdata.cpp new file mode 100644 index 0000000000..6e2ceb5abc --- /dev/null +++ b/xfa/fxfa/parser/cxfa_tooltipdata.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_tooltipdata.h" + +#include "xfa/fxfa/parser/cxfa_node.h" + +CXFA_ToolTipData::CXFA_ToolTipData(CXFA_Node* pNode) : CXFA_Data(pNode) {} + +bool CXFA_ToolTipData::GetTip(WideString& wsTip) { + return m_pNode->JSNode()->TryContent(wsTip, false, true); +} diff --git a/xfa/fxfa/parser/cxfa_tooltipdata.h b/xfa/fxfa/parser/cxfa_tooltipdata.h new file mode 100644 index 0000000000..447bf8154f --- /dev/null +++ b/xfa/fxfa/parser/cxfa_tooltipdata.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_TOOLTIPDATA_H_ +#define XFA_FXFA_PARSER_CXFA_TOOLTIPDATA_H_ + +#include "core/fxcrt/fx_string.h" +#include "xfa/fxfa/parser/cxfa_data.h" + +class CXFA_Node; + +class CXFA_ToolTipData : public CXFA_Data { + public: + explicit CXFA_ToolTipData(CXFA_Node* pNode); + + bool GetTip(WideString& wsTip); +}; + +#endif // XFA_FXFA_PARSER_CXFA_TOOLTIPDATA_H_ -- cgit v1.2.3