From e0d68541163e34cc61fcb7e7cb9f5a9887f45245 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 7 Nov 2017 18:33:30 +0000 Subject: Rename CXFA_Bind to CXFA_BindData This CL renames CXFA_Bind to CXFA_BindData to make it clear it's part of the Data hierarchy. Change-Id: I9e2ac65d5412f2ffd7abf77ff35deff53f8bb970 Reviewed-on: https://pdfium-review.googlesource.com/17973 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- BUILD.gn | 4 ++-- xfa/fxfa/parser/cxfa_bind.cpp | 16 ---------------- xfa/fxfa/parser/cxfa_bind.h | 22 ---------------------- xfa/fxfa/parser/cxfa_binddata.cpp | 16 ++++++++++++++++ xfa/fxfa/parser/cxfa_binddata.h | 22 ++++++++++++++++++++++ xfa/fxfa/parser/cxfa_widgetdata.cpp | 10 ++++++---- xfa/fxfa/parser/cxfa_widgetdata.h | 4 ++-- 7 files changed, 48 insertions(+), 46 deletions(-) delete mode 100644 xfa/fxfa/parser/cxfa_bind.cpp delete mode 100644 xfa/fxfa/parser/cxfa_bind.h create mode 100644 xfa/fxfa/parser/cxfa_binddata.cpp create mode 100644 xfa/fxfa/parser/cxfa_binddata.h diff --git a/BUILD.gn b/BUILD.gn index fc0fde5e69..2e5456663b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1792,8 +1792,8 @@ if (pdf_enable_xfa) { "xfa/fxfa/parser/cxfa_assistdata.h", "xfa/fxfa/parser/cxfa_attachnodelist.cpp", "xfa/fxfa/parser/cxfa_attachnodelist.h", - "xfa/fxfa/parser/cxfa_bind.cpp", - "xfa/fxfa/parser/cxfa_bind.h", + "xfa/fxfa/parser/cxfa_binddata.cpp", + "xfa/fxfa/parser/cxfa_binddata.h", "xfa/fxfa/parser/cxfa_binditemsdata.cpp", "xfa/fxfa/parser/cxfa_binditemsdata.h", "xfa/fxfa/parser/cxfa_border.h", diff --git a/xfa/fxfa/parser/cxfa_bind.cpp b/xfa/fxfa/parser/cxfa_bind.cpp deleted file mode 100644 index 1cdeba9a6d..0000000000 --- a/xfa/fxfa/parser/cxfa_bind.cpp +++ /dev/null @@ -1,16 +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_bind.h" - -#include "xfa/fxfa/parser/cxfa_node.h" - -CXFA_Bind::CXFA_Bind(CXFA_Node* pNode) : CXFA_Data(pNode) {} - -void CXFA_Bind::GetPicture(WideString& wsPicture) { - if (CXFA_Node* pPicture = m_pNode->GetChild(0, XFA_Element::Picture, false)) - pPicture->JSNode()->TryContent(wsPicture, false, true); -} diff --git a/xfa/fxfa/parser/cxfa_bind.h b/xfa/fxfa/parser/cxfa_bind.h deleted file mode 100644 index b24e6f8769..0000000000 --- a/xfa/fxfa/parser/cxfa_bind.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_BIND_H_ -#define XFA_FXFA_PARSER_CXFA_BIND_H_ - -#include "core/fxcrt/fx_string.h" -#include "xfa/fxfa/parser/cxfa_data.h" - -class CXFA_Node; - -class CXFA_Bind : public CXFA_Data { - public: - explicit CXFA_Bind(CXFA_Node* pNode); - - void GetPicture(WideString& wsPicture); -}; - -#endif // XFA_FXFA_PARSER_CXFA_BIND_H_ diff --git a/xfa/fxfa/parser/cxfa_binddata.cpp b/xfa/fxfa/parser/cxfa_binddata.cpp new file mode 100644 index 0000000000..074a3fc797 --- /dev/null +++ b/xfa/fxfa/parser/cxfa_binddata.cpp @@ -0,0 +1,16 @@ +// 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_binddata.h" + +#include "xfa/fxfa/parser/cxfa_node.h" + +CXFA_BindData::CXFA_BindData(CXFA_Node* pNode) : CXFA_Data(pNode) {} + +void CXFA_BindData::GetPicture(WideString& wsPicture) { + if (CXFA_Node* pPicture = m_pNode->GetChild(0, XFA_Element::Picture, false)) + pPicture->JSNode()->TryContent(wsPicture, false, true); +} diff --git a/xfa/fxfa/parser/cxfa_binddata.h b/xfa/fxfa/parser/cxfa_binddata.h new file mode 100644 index 0000000000..93e9439428 --- /dev/null +++ b/xfa/fxfa/parser/cxfa_binddata.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_BINDDATA_H_ +#define XFA_FXFA_PARSER_CXFA_BINDDATA_H_ + +#include "core/fxcrt/fx_string.h" +#include "xfa/fxfa/parser/cxfa_data.h" + +class CXFA_Node; + +class CXFA_BindData : public CXFA_Data { + public: + explicit CXFA_BindData(CXFA_Node* pNode); + + void GetPicture(WideString& wsPicture); +}; + +#endif // XFA_FXFA_PARSER_CXFA_BINDDATA_H_ diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp index e5734ef156..75de937944 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.cpp +++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp @@ -353,8 +353,9 @@ CXFA_Validate CXFA_WidgetData::GetValidate(bool bModified) { m_pNode->JSNode()->GetProperty(0, XFA_Element::Validate, bModified)); } -CXFA_Bind CXFA_WidgetData::GetBind() { - return CXFA_Bind(m_pNode->JSNode()->GetProperty(0, XFA_Element::Bind, false)); +CXFA_BindData CXFA_WidgetData::GetBindData() { + return CXFA_BindData( + m_pNode->JSNode()->GetProperty(0, XFA_Element::Bind, false)); } CXFA_AssistData CXFA_WidgetData::GetAssistData() { @@ -1577,8 +1578,9 @@ bool CXFA_WidgetData::GetPictureContent(WideString& wsPicture, return true; } case XFA_VALUEPICTURE_DataBind: { - if (CXFA_Bind bind = GetBind()) { - bind.GetPicture(wsPicture); + CXFA_BindData bindData = GetBindData(); + if (bindData) { + bindData.GetPicture(wsPicture); return true; } break; diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h index 8f01e03c76..deeb51d9ce 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.h +++ b/xfa/fxfa/parser/cxfa_widgetdata.h @@ -13,7 +13,7 @@ #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_assistdata.h" -#include "xfa/fxfa/parser/cxfa_bind.h" +#include "xfa/fxfa/parser/cxfa_binddata.h" #include "xfa/fxfa/parser/cxfa_border.h" #include "xfa/fxfa/parser/cxfa_calculate.h" #include "xfa/fxfa/parser/cxfa_caption.h" @@ -160,7 +160,7 @@ class CXFA_WidgetData : public CXFA_Data { bool m_bPreNull; private: - CXFA_Bind GetBind(); + CXFA_BindData GetBindData(); void SyncValue(const WideString& wsValue, bool bNotify); void InsertListTextItem(CXFA_Node* pItems, const WideString& wsText, -- cgit v1.2.3