From b8656256af8855c652415095438d5c932790a2b2 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 7 Nov 2017 21:34:30 +0000 Subject: Rename CXFA_Submit to CXFA_SubmitData This CL renames CXFA_Submit to CXFA_SubmitData to show it's part of the data hierarchy. Change-Id: I6f580a28e41e54ffa1f1c7b799d97f079303463f Reviewed-on: https://pdfium-review.googlesource.com/18014 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- xfa/fxfa/cxfa_widgetacc.cpp | 4 ++-- xfa/fxfa/fxfa.h | 2 +- xfa/fxfa/parser/cxfa_eventdata.cpp | 4 ++-- xfa/fxfa/parser/cxfa_eventdata.h | 4 ++-- xfa/fxfa/parser/cxfa_submit.cpp | 27 --------------------------- xfa/fxfa/parser/cxfa_submit.h | 26 -------------------------- xfa/fxfa/parser/cxfa_submitdata.cpp | 27 +++++++++++++++++++++++++++ xfa/fxfa/parser/cxfa_submitdata.h | 26 ++++++++++++++++++++++++++ 8 files changed, 60 insertions(+), 60 deletions(-) delete mode 100644 xfa/fxfa/parser/cxfa_submit.cpp delete mode 100644 xfa/fxfa/parser/cxfa_submit.h create mode 100644 xfa/fxfa/parser/cxfa_submitdata.cpp create mode 100644 xfa/fxfa/parser/cxfa_submitdata.h (limited to 'xfa') diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp index 59df6c9f4d..04733934a8 100644 --- a/xfa/fxfa/cxfa_widgetacc.cpp +++ b/xfa/fxfa/cxfa_widgetacc.cpp @@ -310,8 +310,8 @@ int32_t CXFA_WidgetAcc::ProcessEvent(const CXFA_EventData& eventData, case XFA_Element::SignData: break; case XFA_Element::Submit: - return GetDoc()->GetDocEnvironment()->SubmitData(GetDoc(), - eventData.GetSubmit()); + return GetDoc()->GetDocEnvironment()->SubmitData( + GetDoc(), eventData.GetSubmitData()); default: break; } diff --git a/xfa/fxfa/fxfa.h b/xfa/fxfa/fxfa.h index bb6864a6a4..b0f70f1fd7 100644 --- a/xfa/fxfa/fxfa.h +++ b/xfa/fxfa/fxfa.h @@ -257,7 +257,7 @@ class IXFA_DocEnvironment { uint32_t dwOptions) = 0; virtual FX_ARGB GetHighlightColor(CXFA_FFDoc* hDoc) = 0; - virtual bool SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) = 0; + virtual bool SubmitData(CXFA_FFDoc* hDoc, CXFA_SubmitData submitData) = 0; virtual bool GetGlobalProperty(CXFA_FFDoc* hDoc, const ByteStringView& szPropName, CFXJSE_Value* pValue) = 0; diff --git a/xfa/fxfa/parser/cxfa_eventdata.cpp b/xfa/fxfa/parser/cxfa_eventdata.cpp index 22943216c4..5d20e35718 100644 --- a/xfa/fxfa/parser/cxfa_eventdata.cpp +++ b/xfa/fxfa/parser/cxfa_eventdata.cpp @@ -34,8 +34,8 @@ CXFA_ScriptData CXFA_EventData::GetScriptData() const { return CXFA_ScriptData(m_pNode->GetChild(0, XFA_Element::Script, false)); } -CXFA_Submit CXFA_EventData::GetSubmit() const { - return CXFA_Submit(m_pNode->GetChild(0, XFA_Element::Submit, false)); +CXFA_SubmitData CXFA_EventData::GetSubmitData() const { + return CXFA_SubmitData(m_pNode->GetChild(0, XFA_Element::Submit, false)); } void CXFA_EventData::GetSignDataTarget(WideString& wsTarget) { diff --git a/xfa/fxfa/parser/cxfa_eventdata.h b/xfa/fxfa/parser/cxfa_eventdata.h index e9a79f008f..5c96b07148 100644 --- a/xfa/fxfa/parser/cxfa_eventdata.h +++ b/xfa/fxfa/parser/cxfa_eventdata.h @@ -12,7 +12,7 @@ #include "core/fxcrt/fx_string.h" #include "xfa/fxfa/parser/cxfa_data.h" #include "xfa/fxfa/parser/cxfa_scriptdata.h" -#include "xfa/fxfa/parser/cxfa_submit.h" +#include "xfa/fxfa/parser/cxfa_submitdata.h" class CXFA_Node; @@ -23,7 +23,7 @@ class CXFA_EventData : public CXFA_Data { int32_t GetActivity(); XFA_Element GetEventType() const; CXFA_ScriptData GetScriptData() const; - CXFA_Submit GetSubmit() const; + CXFA_SubmitData GetSubmitData() const; void GetRef(WideStringView& wsRef); void GetSignDataTarget(WideString& wsTarget); }; diff --git a/xfa/fxfa/parser/cxfa_submit.cpp b/xfa/fxfa/parser/cxfa_submit.cpp deleted file mode 100644 index b7802c0248..0000000000 --- a/xfa/fxfa/parser/cxfa_submit.cpp +++ /dev/null @@ -1,27 +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_submit.h" - -#include "xfa/fxfa/parser/cxfa_node.h" - -CXFA_Submit::CXFA_Submit(CXFA_Node* pNode) : CXFA_Data(pNode) {} - -bool CXFA_Submit::IsSubmitEmbedPDF() { - return m_pNode->JSNode()->GetBoolean(XFA_ATTRIBUTE_EmbedPDF); -} - -int32_t CXFA_Submit::GetSubmitFormat() { - return m_pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_Format); -} - -void CXFA_Submit::GetSubmitTarget(WideStringView& wsTarget) { - m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Target, wsTarget, true); -} - -void CXFA_Submit::GetSubmitXDPContent(WideStringView& wsContent) { - m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_XdpContent, wsContent, true); -} diff --git a/xfa/fxfa/parser/cxfa_submit.h b/xfa/fxfa/parser/cxfa_submit.h deleted file mode 100644 index 9d4d7fe281..0000000000 --- a/xfa/fxfa/parser/cxfa_submit.h +++ /dev/null @@ -1,26 +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_SUBMIT_H_ -#define XFA_FXFA_PARSER_CXFA_SUBMIT_H_ - -#include "core/fxcrt/fx_string.h" -#include "core/fxcrt/fx_system.h" -#include "xfa/fxfa/parser/cxfa_data.h" - -class CXFA_Node; - -class CXFA_Submit : public CXFA_Data { - public: - explicit CXFA_Submit(CXFA_Node* pNode); - - bool IsSubmitEmbedPDF(); - int32_t GetSubmitFormat(); - void GetSubmitTarget(WideStringView& wsTarget); - void GetSubmitXDPContent(WideStringView& wsContent); -}; - -#endif // XFA_FXFA_PARSER_CXFA_SUBMIT_H_ diff --git a/xfa/fxfa/parser/cxfa_submitdata.cpp b/xfa/fxfa/parser/cxfa_submitdata.cpp new file mode 100644 index 0000000000..d0f7d8f8ad --- /dev/null +++ b/xfa/fxfa/parser/cxfa_submitdata.cpp @@ -0,0 +1,27 @@ +// 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_submitdata.h" + +#include "xfa/fxfa/parser/cxfa_node.h" + +CXFA_SubmitData::CXFA_SubmitData(CXFA_Node* pNode) : CXFA_Data(pNode) {} + +bool CXFA_SubmitData::IsSubmitEmbedPDF() { + return m_pNode->JSNode()->GetBoolean(XFA_ATTRIBUTE_EmbedPDF); +} + +int32_t CXFA_SubmitData::GetSubmitFormat() { + return m_pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_Format); +} + +void CXFA_SubmitData::GetSubmitTarget(WideStringView& wsTarget) { + m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Target, wsTarget, true); +} + +void CXFA_SubmitData::GetSubmitXDPContent(WideStringView& wsContent) { + m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_XdpContent, wsContent, true); +} diff --git a/xfa/fxfa/parser/cxfa_submitdata.h b/xfa/fxfa/parser/cxfa_submitdata.h new file mode 100644 index 0000000000..b5005f34a8 --- /dev/null +++ b/xfa/fxfa/parser/cxfa_submitdata.h @@ -0,0 +1,26 @@ +// 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_SUBMITDATA_H_ +#define XFA_FXFA_PARSER_CXFA_SUBMITDATA_H_ + +#include "core/fxcrt/fx_string.h" +#include "core/fxcrt/fx_system.h" +#include "xfa/fxfa/parser/cxfa_data.h" + +class CXFA_Node; + +class CXFA_SubmitData : public CXFA_Data { + public: + explicit CXFA_SubmitData(CXFA_Node* pNode); + + bool IsSubmitEmbedPDF(); + int32_t GetSubmitFormat(); + void GetSubmitTarget(WideStringView& wsTarget); + void GetSubmitXDPContent(WideStringView& wsContent); +}; + +#endif // XFA_FXFA_PARSER_CXFA_SUBMITDATA_H_ -- cgit v1.2.3