From c8619c8d1cebb6b64db248ec89db98ab4513ad3c Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 14 Nov 2017 18:48:23 +0000 Subject: Rename a few more data classes. The CXFA_Data nd CXFA_ExData files are part of the data hierarchy. They need to be renamed to not clash with XFA node names. Change-Id: I1ad11dd92edf26912f845aec21c57a9d23e51fcf Reviewed-on: https://pdfium-review.googlesource.com/18270 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- xfa/fxfa/parser/cxfa_binddata.cpp | 2 +- xfa/fxfa/parser/cxfa_binddata.h | 4 +- xfa/fxfa/parser/cxfa_binditemsdata.cpp | 3 +- xfa/fxfa/parser/cxfa_binditemsdata.h | 4 +- xfa/fxfa/parser/cxfa_boxdata.h | 6 +- xfa/fxfa/parser/cxfa_calculatedata.cpp | 3 +- xfa/fxfa/parser/cxfa_calculatedata.h | 4 +- xfa/fxfa/parser/cxfa_captiondata.cpp | 2 +- xfa/fxfa/parser/cxfa_captiondata.h | 4 +- xfa/fxfa/parser/cxfa_data.cpp | 82 ------------------------- xfa/fxfa/parser/cxfa_data.h | 35 ----------- xfa/fxfa/parser/cxfa_datadata.cpp | 82 +++++++++++++++++++++++++ xfa/fxfa/parser/cxfa_datadata.h | 35 +++++++++++ xfa/fxfa/parser/cxfa_eventdata.cpp | 2 +- xfa/fxfa/parser/cxfa_eventdata.h | 4 +- xfa/fxfa/parser/cxfa_exdata.cpp | 16 ----- xfa/fxfa/parser/cxfa_exdata.h | 22 ------- xfa/fxfa/parser/cxfa_exdatadata.cpp | 16 +++++ xfa/fxfa/parser/cxfa_exdatadata.h | 22 +++++++ xfa/fxfa/parser/cxfa_filldata.cpp | 12 ++-- xfa/fxfa/parser/cxfa_filldata.h | 4 +- xfa/fxfa/parser/cxfa_fontdata.cpp | 2 +- xfa/fxfa/parser/cxfa_fontdata.h | 4 +- xfa/fxfa/parser/cxfa_imagedata.cpp | 2 +- xfa/fxfa/parser/cxfa_imagedata.h | 4 +- xfa/fxfa/parser/cxfa_linedata.h | 6 +- xfa/fxfa/parser/cxfa_margindata.cpp | 2 +- xfa/fxfa/parser/cxfa_margindata.h | 4 +- xfa/fxfa/parser/cxfa_occurdata.cpp | 2 +- xfa/fxfa/parser/cxfa_occurdata.h | 4 +- xfa/fxfa/parser/cxfa_paradata.cpp | 2 +- xfa/fxfa/parser/cxfa_paradata.h | 4 +- xfa/fxfa/parser/cxfa_scriptdata.cpp | 2 +- xfa/fxfa/parser/cxfa_scriptdata.h | 4 +- xfa/fxfa/parser/cxfa_strokedata.cpp | 2 +- xfa/fxfa/parser/cxfa_strokedata.h | 6 +- xfa/fxfa/parser/cxfa_submitdata.cpp | 2 +- xfa/fxfa/parser/cxfa_submitdata.h | 4 +- xfa/fxfa/parser/cxfa_textdata.cpp | 2 +- xfa/fxfa/parser/cxfa_textdata.h | 4 +- xfa/fxfa/parser/cxfa_validatedata.cpp | 2 +- xfa/fxfa/parser/cxfa_validatedata.h | 4 +- xfa/fxfa/parser/cxfa_valuedata.cpp | 6 +- xfa/fxfa/parser/cxfa_valuedata.h | 10 +-- xfa/fxfa/parser/cxfa_widgetdata.cpp | 2 +- xfa/fxfa/parser/cxfa_widgetdata.h | 4 +- xfa/fxfa/parser/xfa_document_datamerger_imp.cpp | 2 +- 47 files changed, 229 insertions(+), 227 deletions(-) delete mode 100644 xfa/fxfa/parser/cxfa_data.cpp delete mode 100644 xfa/fxfa/parser/cxfa_data.h create mode 100644 xfa/fxfa/parser/cxfa_datadata.cpp create mode 100644 xfa/fxfa/parser/cxfa_datadata.h delete mode 100644 xfa/fxfa/parser/cxfa_exdata.cpp delete mode 100644 xfa/fxfa/parser/cxfa_exdata.h create mode 100644 xfa/fxfa/parser/cxfa_exdatadata.cpp create mode 100644 xfa/fxfa/parser/cxfa_exdatadata.h (limited to 'xfa/fxfa') diff --git a/xfa/fxfa/parser/cxfa_binddata.cpp b/xfa/fxfa/parser/cxfa_binddata.cpp index 074a3fc797..c47e6534d9 100644 --- a/xfa/fxfa/parser/cxfa_binddata.cpp +++ b/xfa/fxfa/parser/cxfa_binddata.cpp @@ -8,7 +8,7 @@ #include "xfa/fxfa/parser/cxfa_node.h" -CXFA_BindData::CXFA_BindData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_BindData::CXFA_BindData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} void CXFA_BindData::GetPicture(WideString& wsPicture) { if (CXFA_Node* pPicture = m_pNode->GetChild(0, XFA_Element::Picture, false)) diff --git a/xfa/fxfa/parser/cxfa_binddata.h b/xfa/fxfa/parser/cxfa_binddata.h index 93e9439428..100f1c3c3b 100644 --- a/xfa/fxfa/parser/cxfa_binddata.h +++ b/xfa/fxfa/parser/cxfa_binddata.h @@ -8,11 +8,11 @@ #define XFA_FXFA_PARSER_CXFA_BINDDATA_H_ #include "core/fxcrt/fx_string.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" class CXFA_Node; -class CXFA_BindData : public CXFA_Data { +class CXFA_BindData : public CXFA_DataData { public: explicit CXFA_BindData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/cxfa_binditemsdata.cpp b/xfa/fxfa/parser/cxfa_binditemsdata.cpp index 616a52675d..644b532839 100644 --- a/xfa/fxfa/parser/cxfa_binditemsdata.cpp +++ b/xfa/fxfa/parser/cxfa_binditemsdata.cpp @@ -8,7 +8,8 @@ #include "xfa/fxfa/parser/cxfa_node.h" -CXFA_BindItemsData::CXFA_BindItemsData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_BindItemsData::CXFA_BindItemsData(CXFA_Node* pNode) + : CXFA_DataData(pNode) {} void CXFA_BindItemsData::GetLabelRef(WideStringView& wsLabelRef) { m_pNode->JSNode()->TryCData(XFA_Attribute::LabelRef, wsLabelRef, true); diff --git a/xfa/fxfa/parser/cxfa_binditemsdata.h b/xfa/fxfa/parser/cxfa_binditemsdata.h index 664239a8ae..7c7eefa233 100644 --- a/xfa/fxfa/parser/cxfa_binditemsdata.h +++ b/xfa/fxfa/parser/cxfa_binditemsdata.h @@ -8,11 +8,11 @@ #define XFA_FXFA_PARSER_CXFA_BINDITEMSDATA_H_ #include "core/fxcrt/fx_string.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" class CXFA_Node; -class CXFA_BindItemsData : public CXFA_Data { +class CXFA_BindItemsData : public CXFA_DataData { public: explicit CXFA_BindItemsData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/cxfa_boxdata.h b/xfa/fxfa/parser/cxfa_boxdata.h index ae946c4666..14f8b35235 100644 --- a/xfa/fxfa/parser/cxfa_boxdata.h +++ b/xfa/fxfa/parser/cxfa_boxdata.h @@ -10,16 +10,16 @@ #include #include "core/fxcrt/fx_system.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" #include "xfa/fxfa/parser/cxfa_edgedata.h" #include "xfa/fxfa/parser/cxfa_filldata.h" #include "xfa/fxfa/parser/cxfa_margindata.h" class CXFA_Node; -class CXFA_BoxData : public CXFA_Data { +class CXFA_BoxData : public CXFA_DataData { public: - explicit CXFA_BoxData(CXFA_Node* pNode) : CXFA_Data(pNode) {} + explicit CXFA_BoxData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} bool IsArc() const { return GetElementType() == XFA_Element::Arc; } bool IsBorder() const { return GetElementType() == XFA_Element::Border; } diff --git a/xfa/fxfa/parser/cxfa_calculatedata.cpp b/xfa/fxfa/parser/cxfa_calculatedata.cpp index 7b9330811e..ef152f48d7 100644 --- a/xfa/fxfa/parser/cxfa_calculatedata.cpp +++ b/xfa/fxfa/parser/cxfa_calculatedata.cpp @@ -9,7 +9,8 @@ #include "xfa/fxfa/parser/cxfa_node.h" #include "xfa/fxfa/parser/cxfa_textdata.h" -CXFA_CalculateData::CXFA_CalculateData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_CalculateData::CXFA_CalculateData(CXFA_Node* pNode) + : CXFA_DataData(pNode) {} int32_t CXFA_CalculateData::GetOverride() { XFA_ATTRIBUTEENUM eAtt = XFA_ATTRIBUTEENUM_Error; diff --git a/xfa/fxfa/parser/cxfa_calculatedata.h b/xfa/fxfa/parser/cxfa_calculatedata.h index d610e1bbce..e2784aa970 100644 --- a/xfa/fxfa/parser/cxfa_calculatedata.h +++ b/xfa/fxfa/parser/cxfa_calculatedata.h @@ -8,12 +8,12 @@ #define XFA_FXFA_PARSER_CXFA_CALCULATEDATA_H_ #include "core/fxcrt/fx_string.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" #include "xfa/fxfa/parser/cxfa_scriptdata.h" class CXFA_Node; -class CXFA_CalculateData : public CXFA_Data { +class CXFA_CalculateData : public CXFA_DataData { public: explicit CXFA_CalculateData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/cxfa_captiondata.cpp b/xfa/fxfa/parser/cxfa_captiondata.cpp index a91b45f436..c898a763ac 100644 --- a/xfa/fxfa/parser/cxfa_captiondata.cpp +++ b/xfa/fxfa/parser/cxfa_captiondata.cpp @@ -9,7 +9,7 @@ #include "xfa/fxfa/parser/cxfa_measurement.h" #include "xfa/fxfa/parser/cxfa_node.h" -CXFA_CaptionData::CXFA_CaptionData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_CaptionData::CXFA_CaptionData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} int32_t CXFA_CaptionData::GetPresence() { XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_Visible; diff --git a/xfa/fxfa/parser/cxfa_captiondata.h b/xfa/fxfa/parser/cxfa_captiondata.h index d7fe0ba53b..a28989b346 100644 --- a/xfa/fxfa/parser/cxfa_captiondata.h +++ b/xfa/fxfa/parser/cxfa_captiondata.h @@ -7,14 +7,14 @@ #ifndef XFA_FXFA_PARSER_CXFA_CAPTIONDATA_H_ #define XFA_FXFA_PARSER_CXFA_CAPTIONDATA_H_ -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" #include "xfa/fxfa/parser/cxfa_fontdata.h" #include "xfa/fxfa/parser/cxfa_margindata.h" #include "xfa/fxfa/parser/cxfa_valuedata.h" class CXFA_Node; -class CXFA_CaptionData : public CXFA_Data { +class CXFA_CaptionData : public CXFA_DataData { public: explicit CXFA_CaptionData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/cxfa_data.cpp b/xfa/fxfa/parser/cxfa_data.cpp deleted file mode 100644 index d6b6700854..0000000000 --- a/xfa/fxfa/parser/cxfa_data.cpp +++ /dev/null @@ -1,82 +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_data.h" - -#include "core/fxcrt/fx_extension.h" -#include "xfa/fxfa/parser/cxfa_measurement.h" -#include "xfa/fxfa/parser/cxfa_node.h" - -// Static. -FX_ARGB CXFA_Data::ToColor(const WideStringView& wsValue) { - uint8_t r = 0, g = 0, b = 0; - if (wsValue.GetLength() == 0) - return 0xff000000; - - int cc = 0; - const wchar_t* str = wsValue.unterminated_c_str(); - int len = wsValue.GetLength(); - while (FXSYS_iswspace(str[cc]) && cc < len) - cc++; - - if (cc >= len) - return 0xff000000; - - while (cc < len) { - if (str[cc] == ',' || !FXSYS_isDecimalDigit(str[cc])) - break; - - r = r * 10 + str[cc] - '0'; - cc++; - } - if (cc < len && str[cc] == ',') { - cc++; - while (FXSYS_iswspace(str[cc]) && cc < len) - cc++; - - while (cc < len) { - if (str[cc] == ',' || !FXSYS_isDecimalDigit(str[cc])) - break; - - g = g * 10 + str[cc] - '0'; - cc++; - } - if (cc < len && str[cc] == ',') { - cc++; - while (FXSYS_iswspace(str[cc]) && cc < len) - cc++; - - while (cc < len) { - if (str[cc] == ',' || !FXSYS_isDecimalDigit(str[cc])) - break; - - b = b * 10 + str[cc] - '0'; - cc++; - } - } - } - return (0xff << 24) | (r << 16) | (g << 8) | b; -} - -XFA_Element CXFA_Data::GetElementType() const { - return m_pNode ? m_pNode->GetElementType() : XFA_Element::Unknown; -} - -bool CXFA_Data::TryMeasure(XFA_Attribute eAttr, - float& fValue, - bool bUseDefault) const { - CXFA_Measurement ms; - if (m_pNode->JSNode()->TryMeasure(eAttr, ms, bUseDefault)) { - fValue = ms.ToUnit(XFA_Unit::Pt); - return true; - } - return false; -} - -bool CXFA_Data::SetMeasure(XFA_Attribute eAttr, float fValue) { - CXFA_Measurement ms(fValue, XFA_Unit::Pt); - return m_pNode->JSNode()->SetMeasure(eAttr, ms, false); -} diff --git a/xfa/fxfa/parser/cxfa_data.h b/xfa/fxfa/parser/cxfa_data.h deleted file mode 100644 index 858c5b3f0d..0000000000 --- a/xfa/fxfa/parser/cxfa_data.h +++ /dev/null @@ -1,35 +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_DATA_H_ -#define XFA_FXFA_PARSER_CXFA_DATA_H_ - -#include "core/fxcrt/fx_system.h" -#include "core/fxge/fx_dib.h" -#include "xfa/fxfa/fxfa_basic.h" - -class CXFA_Node; - -class CXFA_Data { - public: - static FX_ARGB ToColor(const WideStringView& wsValue); - - explicit CXFA_Data(CXFA_Node* pNode) : m_pNode(pNode) {} - - explicit operator bool() const { return !!m_pNode; } - CXFA_Node* GetNode() const { return m_pNode; } - XFA_Element GetElementType() const; - - protected: - bool TryMeasure(XFA_Attribute eAttr, - float& fValue, - bool bUseDefault = false) const; - bool SetMeasure(XFA_Attribute eAttr, float fValue); - - CXFA_Node* m_pNode; -}; - -#endif // XFA_FXFA_PARSER_CXFA_DATA_H_ diff --git a/xfa/fxfa/parser/cxfa_datadata.cpp b/xfa/fxfa/parser/cxfa_datadata.cpp new file mode 100644 index 0000000000..8f41c2f3dd --- /dev/null +++ b/xfa/fxfa/parser/cxfa_datadata.cpp @@ -0,0 +1,82 @@ +// 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_datadata.h" + +#include "core/fxcrt/fx_extension.h" +#include "xfa/fxfa/parser/cxfa_measurement.h" +#include "xfa/fxfa/parser/cxfa_node.h" + +// Static. +FX_ARGB CXFA_DataData::ToColor(const WideStringView& wsValue) { + uint8_t r = 0, g = 0, b = 0; + if (wsValue.GetLength() == 0) + return 0xff000000; + + int cc = 0; + const wchar_t* str = wsValue.unterminated_c_str(); + int len = wsValue.GetLength(); + while (FXSYS_iswspace(str[cc]) && cc < len) + cc++; + + if (cc >= len) + return 0xff000000; + + while (cc < len) { + if (str[cc] == ',' || !FXSYS_isDecimalDigit(str[cc])) + break; + + r = r * 10 + str[cc] - '0'; + cc++; + } + if (cc < len && str[cc] == ',') { + cc++; + while (FXSYS_iswspace(str[cc]) && cc < len) + cc++; + + while (cc < len) { + if (str[cc] == ',' || !FXSYS_isDecimalDigit(str[cc])) + break; + + g = g * 10 + str[cc] - '0'; + cc++; + } + if (cc < len && str[cc] == ',') { + cc++; + while (FXSYS_iswspace(str[cc]) && cc < len) + cc++; + + while (cc < len) { + if (str[cc] == ',' || !FXSYS_isDecimalDigit(str[cc])) + break; + + b = b * 10 + str[cc] - '0'; + cc++; + } + } + } + return (0xff << 24) | (r << 16) | (g << 8) | b; +} + +XFA_Element CXFA_DataData::GetElementType() const { + return m_pNode ? m_pNode->GetElementType() : XFA_Element::Unknown; +} + +bool CXFA_DataData::TryMeasure(XFA_Attribute eAttr, + float& fValue, + bool bUseDefault) const { + CXFA_Measurement ms; + if (m_pNode->JSNode()->TryMeasure(eAttr, ms, bUseDefault)) { + fValue = ms.ToUnit(XFA_Unit::Pt); + return true; + } + return false; +} + +bool CXFA_DataData::SetMeasure(XFA_Attribute eAttr, float fValue) { + CXFA_Measurement ms(fValue, XFA_Unit::Pt); + return m_pNode->JSNode()->SetMeasure(eAttr, ms, false); +} diff --git a/xfa/fxfa/parser/cxfa_datadata.h b/xfa/fxfa/parser/cxfa_datadata.h new file mode 100644 index 0000000000..5be86c28ab --- /dev/null +++ b/xfa/fxfa/parser/cxfa_datadata.h @@ -0,0 +1,35 @@ +// 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_DATADATA_H_ +#define XFA_FXFA_PARSER_CXFA_DATADATA_H_ + +#include "core/fxcrt/fx_system.h" +#include "core/fxge/fx_dib.h" +#include "xfa/fxfa/fxfa_basic.h" + +class CXFA_Node; + +class CXFA_DataData { + public: + static FX_ARGB ToColor(const WideStringView& wsValue); + + explicit CXFA_DataData(CXFA_Node* pNode) : m_pNode(pNode) {} + + explicit operator bool() const { return !!m_pNode; } + CXFA_Node* GetNode() const { return m_pNode; } + XFA_Element GetElementType() const; + + protected: + bool TryMeasure(XFA_Attribute eAttr, + float& fValue, + bool bUseDefault = false) const; + bool SetMeasure(XFA_Attribute eAttr, float fValue); + + CXFA_Node* m_pNode; +}; + +#endif // XFA_FXFA_PARSER_CXFA_DATADATA_H_ diff --git a/xfa/fxfa/parser/cxfa_eventdata.cpp b/xfa/fxfa/parser/cxfa_eventdata.cpp index f4e62c0d35..0210fdc5f4 100644 --- a/xfa/fxfa/parser/cxfa_eventdata.cpp +++ b/xfa/fxfa/parser/cxfa_eventdata.cpp @@ -8,7 +8,7 @@ #include "xfa/fxfa/parser/cxfa_node.h" -CXFA_EventData::CXFA_EventData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_EventData::CXFA_EventData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} int32_t CXFA_EventData::GetActivity() { return m_pNode->JSNode()->GetEnum(XFA_Attribute::Activity); diff --git a/xfa/fxfa/parser/cxfa_eventdata.h b/xfa/fxfa/parser/cxfa_eventdata.h index 5c96b07148..90b1b87ff5 100644 --- a/xfa/fxfa/parser/cxfa_eventdata.h +++ b/xfa/fxfa/parser/cxfa_eventdata.h @@ -10,13 +10,13 @@ #include #include "core/fxcrt/fx_string.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" #include "xfa/fxfa/parser/cxfa_scriptdata.h" #include "xfa/fxfa/parser/cxfa_submitdata.h" class CXFA_Node; -class CXFA_EventData : public CXFA_Data { +class CXFA_EventData : public CXFA_DataData { public: explicit CXFA_EventData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/cxfa_exdata.cpp b/xfa/fxfa/parser/cxfa_exdata.cpp deleted file mode 100644 index 6a9965f69e..0000000000 --- a/xfa/fxfa/parser/cxfa_exdata.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_exdata.h" - -#include "xfa/fxfa/parser/cxfa_node.h" - -CXFA_ExData::CXFA_ExData(CXFA_Node* pNode) : CXFA_Data(pNode) {} - -bool CXFA_ExData::SetContentType(const WideString& wsContentType) { - return m_pNode->JSNode()->SetCData(XFA_Attribute::ContentType, wsContentType, - false, false); -} diff --git a/xfa/fxfa/parser/cxfa_exdata.h b/xfa/fxfa/parser/cxfa_exdata.h deleted file mode 100644 index 03913a2165..0000000000 --- a/xfa/fxfa/parser/cxfa_exdata.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_EXDATA_H_ -#define XFA_FXFA_PARSER_CXFA_EXDATA_H_ - -#include "core/fxcrt/fx_string.h" -#include "xfa/fxfa/parser/cxfa_data.h" - -class CXFA_Node; - -class CXFA_ExData : public CXFA_Data { - public: - explicit CXFA_ExData(CXFA_Node* pNode); - - bool SetContentType(const WideString& wsContentType); -}; - -#endif // XFA_FXFA_PARSER_CXFA_EXDATA_H_ diff --git a/xfa/fxfa/parser/cxfa_exdatadata.cpp b/xfa/fxfa/parser/cxfa_exdatadata.cpp new file mode 100644 index 0000000000..4b62867b16 --- /dev/null +++ b/xfa/fxfa/parser/cxfa_exdatadata.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_exdatadata.h" + +#include "xfa/fxfa/parser/cxfa_node.h" + +CXFA_ExDataData::CXFA_ExDataData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} + +bool CXFA_ExDataData::SetContentType(const WideString& wsContentType) { + return m_pNode->JSNode()->SetCData(XFA_Attribute::ContentType, wsContentType, + false, false); +} diff --git a/xfa/fxfa/parser/cxfa_exdatadata.h b/xfa/fxfa/parser/cxfa_exdatadata.h new file mode 100644 index 0000000000..3f9468a809 --- /dev/null +++ b/xfa/fxfa/parser/cxfa_exdatadata.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_EXDATADATA_H_ +#define XFA_FXFA_PARSER_CXFA_EXDATADATA_H_ + +#include "core/fxcrt/fx_string.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" + +class CXFA_Node; + +class CXFA_ExDataData : public CXFA_DataData { + public: + explicit CXFA_ExDataData(CXFA_Node* pNode); + + bool SetContentType(const WideString& wsContentType); +}; + +#endif // XFA_FXFA_PARSER_CXFA_EXDATADATA_H_ diff --git a/xfa/fxfa/parser/cxfa_filldata.cpp b/xfa/fxfa/parser/cxfa_filldata.cpp index bdce5d604e..65ad3961c2 100644 --- a/xfa/fxfa/parser/cxfa_filldata.cpp +++ b/xfa/fxfa/parser/cxfa_filldata.cpp @@ -8,7 +8,7 @@ #include "xfa/fxfa/parser/cxfa_node.h" -CXFA_FillData::CXFA_FillData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_FillData::CXFA_FillData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} CXFA_FillData::~CXFA_FillData() {} @@ -33,7 +33,7 @@ FX_ARGB CXFA_FillData::GetColor(bool bText) { if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Color, false)) { WideStringView wsColor; if (pNode->JSNode()->TryCData(XFA_Attribute::Value, wsColor, false)) - return CXFA_Data::ToColor(wsColor); + return CXFA_DataData::ToColor(wsColor); } if (bText) return 0xFF000000; @@ -58,7 +58,7 @@ int32_t CXFA_FillData::GetPattern(FX_ARGB& foreColor) { if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color, false)) { WideStringView wsColor; pColor->JSNode()->TryCData(XFA_Attribute::Value, wsColor, false); - foreColor = CXFA_Data::ToColor(wsColor); + foreColor = CXFA_DataData::ToColor(wsColor); } else { foreColor = 0xFF000000; } @@ -73,7 +73,7 @@ int32_t CXFA_FillData::GetStipple(FX_ARGB& stippleColor) { if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color, false)) { WideStringView wsColor; pColor->JSNode()->TryCData(XFA_Attribute::Value, wsColor, false); - stippleColor = CXFA_Data::ToColor(wsColor); + stippleColor = CXFA_DataData::ToColor(wsColor); } else { stippleColor = 0xFF000000; } @@ -88,7 +88,7 @@ int32_t CXFA_FillData::GetLinear(FX_ARGB& endColor) { if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color, false)) { WideStringView wsColor; pColor->JSNode()->TryCData(XFA_Attribute::Value, wsColor, false); - endColor = CXFA_Data::ToColor(wsColor); + endColor = CXFA_DataData::ToColor(wsColor); } else { endColor = 0xFF000000; } @@ -103,7 +103,7 @@ int32_t CXFA_FillData::GetRadial(FX_ARGB& endColor) { if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color, false)) { WideStringView wsColor; pColor->JSNode()->TryCData(XFA_Attribute::Value, wsColor, false); - endColor = CXFA_Data::ToColor(wsColor); + endColor = CXFA_DataData::ToColor(wsColor); } else { endColor = 0xFF000000; } diff --git a/xfa/fxfa/parser/cxfa_filldata.h b/xfa/fxfa/parser/cxfa_filldata.h index d47fb5d86a..290e0b72e1 100644 --- a/xfa/fxfa/parser/cxfa_filldata.h +++ b/xfa/fxfa/parser/cxfa_filldata.h @@ -9,11 +9,11 @@ #include "core/fxcrt/fx_system.h" #include "core/fxge/fx_dib.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" class CXFA_Node; -class CXFA_FillData : public CXFA_Data { +class CXFA_FillData : public CXFA_DataData { public: explicit CXFA_FillData(CXFA_Node* pNode); ~CXFA_FillData(); diff --git a/xfa/fxfa/parser/cxfa_fontdata.cpp b/xfa/fxfa/parser/cxfa_fontdata.cpp index f207fdeda5..f5fe270f18 100644 --- a/xfa/fxfa/parser/cxfa_fontdata.cpp +++ b/xfa/fxfa/parser/cxfa_fontdata.cpp @@ -11,7 +11,7 @@ #include "xfa/fxfa/parser/cxfa_measurement.h" #include "xfa/fxfa/parser/cxfa_node.h" -CXFA_FontData::CXFA_FontData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_FontData::CXFA_FontData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} float CXFA_FontData::GetBaselineShift() { return m_pNode->JSNode() diff --git a/xfa/fxfa/parser/cxfa_fontdata.h b/xfa/fxfa/parser/cxfa_fontdata.h index cb2dd6068f..d926fd3e46 100644 --- a/xfa/fxfa/parser/cxfa_fontdata.h +++ b/xfa/fxfa/parser/cxfa_fontdata.h @@ -8,11 +8,11 @@ #define XFA_FXFA_PARSER_CXFA_FONTDATA_H_ #include "core/fxge/fx_dib.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" class CXFA_Node; -class CXFA_FontData : public CXFA_Data { +class CXFA_FontData : public CXFA_DataData { public: explicit CXFA_FontData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/cxfa_imagedata.cpp b/xfa/fxfa/parser/cxfa_imagedata.cpp index fbe707a9d4..7c5a06541a 100644 --- a/xfa/fxfa/parser/cxfa_imagedata.cpp +++ b/xfa/fxfa/parser/cxfa_imagedata.cpp @@ -9,7 +9,7 @@ #include "xfa/fxfa/parser/cxfa_node.h" CXFA_ImageData::CXFA_ImageData(CXFA_Node* pNode, bool bDefValue) - : CXFA_Data(pNode), m_bDefValue(bDefValue) {} + : CXFA_DataData(pNode), m_bDefValue(bDefValue) {} int32_t CXFA_ImageData::GetAspect() { return m_pNode->JSNode()->GetEnum(XFA_Attribute::Aspect); diff --git a/xfa/fxfa/parser/cxfa_imagedata.h b/xfa/fxfa/parser/cxfa_imagedata.h index 8b3ae43b98..45474260ab 100644 --- a/xfa/fxfa/parser/cxfa_imagedata.h +++ b/xfa/fxfa/parser/cxfa_imagedata.h @@ -9,11 +9,11 @@ #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" class CXFA_Node; -class CXFA_ImageData : public CXFA_Data { +class CXFA_ImageData : public CXFA_DataData { public: CXFA_ImageData(CXFA_Node* pNode, bool bDefValue); diff --git a/xfa/fxfa/parser/cxfa_linedata.h b/xfa/fxfa/parser/cxfa_linedata.h index 596bef76f0..2e70450616 100644 --- a/xfa/fxfa/parser/cxfa_linedata.h +++ b/xfa/fxfa/parser/cxfa_linedata.h @@ -8,14 +8,14 @@ #define XFA_FXFA_PARSER_CXFA_LINEDATA_H_ #include "core/fxcrt/fx_system.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" #include "xfa/fxfa/parser/cxfa_edgedata.h" class CXFA_Node; -class CXFA_LineData : public CXFA_Data { +class CXFA_LineData : public CXFA_DataData { public: - explicit CXFA_LineData(CXFA_Node* pNode) : CXFA_Data(pNode) {} + explicit CXFA_LineData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} int32_t GetHand(); bool GetSlope(); diff --git a/xfa/fxfa/parser/cxfa_margindata.cpp b/xfa/fxfa/parser/cxfa_margindata.cpp index 15cb523825..08cc9fd844 100644 --- a/xfa/fxfa/parser/cxfa_margindata.cpp +++ b/xfa/fxfa/parser/cxfa_margindata.cpp @@ -6,7 +6,7 @@ #include "xfa/fxfa/parser/cxfa_margindata.h" -CXFA_MarginData::CXFA_MarginData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_MarginData::CXFA_MarginData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} bool CXFA_MarginData::GetLeftInset(float& fInset, float fDefInset) const { fInset = fDefInset; diff --git a/xfa/fxfa/parser/cxfa_margindata.h b/xfa/fxfa/parser/cxfa_margindata.h index fda823945c..5695fcc5f5 100644 --- a/xfa/fxfa/parser/cxfa_margindata.h +++ b/xfa/fxfa/parser/cxfa_margindata.h @@ -8,11 +8,11 @@ #define XFA_FXFA_PARSER_CXFA_MARGINDATA_H_ #include "core/fxcrt/fx_system.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" class CXFA_Node; -class CXFA_MarginData : public CXFA_Data { +class CXFA_MarginData : public CXFA_DataData { public: explicit CXFA_MarginData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/cxfa_occurdata.cpp b/xfa/fxfa/parser/cxfa_occurdata.cpp index 1ef5a296fc..1f20e3c0e9 100644 --- a/xfa/fxfa/parser/cxfa_occurdata.cpp +++ b/xfa/fxfa/parser/cxfa_occurdata.cpp @@ -8,7 +8,7 @@ #include "xfa/fxfa/parser/cxfa_node.h" -CXFA_OccurData::CXFA_OccurData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_OccurData::CXFA_OccurData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} int32_t CXFA_OccurData::GetMax() { int32_t iMax = 1; diff --git a/xfa/fxfa/parser/cxfa_occurdata.h b/xfa/fxfa/parser/cxfa_occurdata.h index 90554bd0eb..4ce7bda319 100644 --- a/xfa/fxfa/parser/cxfa_occurdata.h +++ b/xfa/fxfa/parser/cxfa_occurdata.h @@ -8,11 +8,11 @@ #define XFA_FXFA_PARSER_CXFA_OCCURDATA_H_ #include "core/fxcrt/fx_system.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" class CXFA_Node; -class CXFA_OccurData : public CXFA_Data { +class CXFA_OccurData : public CXFA_DataData { public: explicit CXFA_OccurData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/cxfa_paradata.cpp b/xfa/fxfa/parser/cxfa_paradata.cpp index b0e8c69e36..55db1313f2 100644 --- a/xfa/fxfa/parser/cxfa_paradata.cpp +++ b/xfa/fxfa/parser/cxfa_paradata.cpp @@ -9,7 +9,7 @@ #include "xfa/fxfa/parser/cxfa_measurement.h" #include "xfa/fxfa/parser/cxfa_node.h" -CXFA_ParaData::CXFA_ParaData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_ParaData::CXFA_ParaData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} int32_t CXFA_ParaData::GetHorizontalAlign() { XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_Left; diff --git a/xfa/fxfa/parser/cxfa_paradata.h b/xfa/fxfa/parser/cxfa_paradata.h index 3e0afb36e5..20c371ed51 100644 --- a/xfa/fxfa/parser/cxfa_paradata.h +++ b/xfa/fxfa/parser/cxfa_paradata.h @@ -8,11 +8,11 @@ #define XFA_FXFA_PARSER_CXFA_PARADATA_H_ #include "core/fxcrt/fx_system.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" class CXFA_Node; -class CXFA_ParaData : public CXFA_Data { +class CXFA_ParaData : public CXFA_DataData { public: explicit CXFA_ParaData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/cxfa_scriptdata.cpp b/xfa/fxfa/parser/cxfa_scriptdata.cpp index 619dcc14b6..ea957f94c5 100644 --- a/xfa/fxfa/parser/cxfa_scriptdata.cpp +++ b/xfa/fxfa/parser/cxfa_scriptdata.cpp @@ -8,7 +8,7 @@ #include "xfa/fxfa/parser/cxfa_node.h" -CXFA_ScriptData::CXFA_ScriptData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_ScriptData::CXFA_ScriptData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} XFA_ScriptDataType CXFA_ScriptData::GetContentType() { WideStringView cData; diff --git a/xfa/fxfa/parser/cxfa_scriptdata.h b/xfa/fxfa/parser/cxfa_scriptdata.h index 36c9a31e7e..6e85d79ed2 100644 --- a/xfa/fxfa/parser/cxfa_scriptdata.h +++ b/xfa/fxfa/parser/cxfa_scriptdata.h @@ -10,7 +10,7 @@ #include #include "core/fxcrt/fx_string.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" enum class XFA_ScriptDataType { Formcalc = 0, @@ -20,7 +20,7 @@ enum class XFA_ScriptDataType { class CXFA_Node; -class CXFA_ScriptData : public CXFA_Data { +class CXFA_ScriptData : public CXFA_DataData { public: explicit CXFA_ScriptData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/cxfa_strokedata.cpp b/xfa/fxfa/parser/cxfa_strokedata.cpp index aa31d0a801..93247e3537 100644 --- a/xfa/fxfa/parser/cxfa_strokedata.cpp +++ b/xfa/fxfa/parser/cxfa_strokedata.cpp @@ -54,7 +54,7 @@ FX_ARGB CXFA_StrokeData::GetColor() const { WideStringView wsColor; pNode->JSNode()->TryCData(XFA_Attribute::Value, wsColor, true); - return CXFA_Data::ToColor(wsColor); + return CXFA_DataData::ToColor(wsColor); } void CXFA_StrokeData::SetColor(FX_ARGB argb) { diff --git a/xfa/fxfa/parser/cxfa_strokedata.h b/xfa/fxfa/parser/cxfa_strokedata.h index 050b76671a..2921f885ff 100644 --- a/xfa/fxfa/parser/cxfa_strokedata.h +++ b/xfa/fxfa/parser/cxfa_strokedata.h @@ -10,7 +10,7 @@ #include "core/fxcrt/fx_system.h" #include "core/fxge/fx_dib.h" #include "xfa/fxfa/fxfa_basic.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" enum StrokeSameStyle { XFA_STROKE_SAMESTYLE_NoPresence = 1, @@ -19,10 +19,10 @@ enum StrokeSameStyle { class CXFA_Node; -class CXFA_StrokeData : public CXFA_Data { +class CXFA_StrokeData : public CXFA_DataData { public: CXFA_StrokeData() : CXFA_StrokeData(nullptr) {} - explicit CXFA_StrokeData(CXFA_Node* pNode) : CXFA_Data(pNode) {} + explicit CXFA_StrokeData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} bool IsCorner() const { return GetElementType() == XFA_Element::Corner; } bool IsEdge() const { return GetElementType() == XFA_Element::Edge; } diff --git a/xfa/fxfa/parser/cxfa_submitdata.cpp b/xfa/fxfa/parser/cxfa_submitdata.cpp index 96b28e1dfe..629cb9ea61 100644 --- a/xfa/fxfa/parser/cxfa_submitdata.cpp +++ b/xfa/fxfa/parser/cxfa_submitdata.cpp @@ -8,7 +8,7 @@ #include "xfa/fxfa/parser/cxfa_node.h" -CXFA_SubmitData::CXFA_SubmitData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_SubmitData::CXFA_SubmitData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} bool CXFA_SubmitData::IsSubmitEmbedPDF() { return m_pNode->JSNode()->GetBoolean(XFA_Attribute::EmbedPDF); diff --git a/xfa/fxfa/parser/cxfa_submitdata.h b/xfa/fxfa/parser/cxfa_submitdata.h index b5005f34a8..28cb3c29f2 100644 --- a/xfa/fxfa/parser/cxfa_submitdata.h +++ b/xfa/fxfa/parser/cxfa_submitdata.h @@ -9,11 +9,11 @@ #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" class CXFA_Node; -class CXFA_SubmitData : public CXFA_Data { +class CXFA_SubmitData : public CXFA_DataData { public: explicit CXFA_SubmitData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/cxfa_textdata.cpp b/xfa/fxfa/parser/cxfa_textdata.cpp index 95e2c980dd..ef804ab081 100644 --- a/xfa/fxfa/parser/cxfa_textdata.cpp +++ b/xfa/fxfa/parser/cxfa_textdata.cpp @@ -8,7 +8,7 @@ #include "xfa/fxfa/parser/cxfa_node.h" -CXFA_TextData::CXFA_TextData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_TextData::CXFA_TextData(CXFA_Node* pNode) : CXFA_DataData(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 index 9ebf1e08e4..b504e567b5 100644 --- a/xfa/fxfa/parser/cxfa_textdata.h +++ b/xfa/fxfa/parser/cxfa_textdata.h @@ -8,11 +8,11 @@ #define XFA_FXFA_PARSER_CXFA_TEXTDATA_H_ #include "core/fxcrt/fx_string.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" class CXFA_Node; -class CXFA_TextData : public CXFA_Data { +class CXFA_TextData : public CXFA_DataData { public: explicit CXFA_TextData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/cxfa_validatedata.cpp b/xfa/fxfa/parser/cxfa_validatedata.cpp index 9e811df572..c332b12c7b 100644 --- a/xfa/fxfa/parser/cxfa_validatedata.cpp +++ b/xfa/fxfa/parser/cxfa_validatedata.cpp @@ -9,7 +9,7 @@ #include "xfa/fxfa/parser/cxfa_node.h" #include "xfa/fxfa/parser/xfa_utils.h" -CXFA_ValidateData::CXFA_ValidateData(CXFA_Node* pNode) : CXFA_Data(pNode) {} +CXFA_ValidateData::CXFA_ValidateData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} int32_t CXFA_ValidateData::GetFormatTest() { return m_pNode->JSNode()->GetEnum(XFA_Attribute::FormatTest); diff --git a/xfa/fxfa/parser/cxfa_validatedata.h b/xfa/fxfa/parser/cxfa_validatedata.h index 53df39429d..a431cbdf20 100644 --- a/xfa/fxfa/parser/cxfa_validatedata.h +++ b/xfa/fxfa/parser/cxfa_validatedata.h @@ -9,12 +9,12 @@ #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" #include "xfa/fxfa/parser/cxfa_scriptdata.h" class CXFA_Node; -class CXFA_ValidateData : public CXFA_Data { +class CXFA_ValidateData : public CXFA_DataData { public: explicit CXFA_ValidateData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/cxfa_valuedata.cpp b/xfa/fxfa/parser/cxfa_valuedata.cpp index f99689728c..a967b3b217 100644 --- a/xfa/fxfa/parser/cxfa_valuedata.cpp +++ b/xfa/fxfa/parser/cxfa_valuedata.cpp @@ -44,9 +44,9 @@ CXFA_TextData CXFA_ValueData::GetTextData() { : nullptr); } -CXFA_ExData CXFA_ValueData::GetExData() { - return CXFA_ExData(m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild) - : nullptr); +CXFA_ExDataData CXFA_ValueData::GetExData() { + return CXFA_ExDataData(m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild) + : nullptr); } CXFA_ImageData CXFA_ValueData::GetImageData() { diff --git a/xfa/fxfa/parser/cxfa_valuedata.h b/xfa/fxfa/parser/cxfa_valuedata.h index a1f1e410c0..7e647d8d2a 100644 --- a/xfa/fxfa/parser/cxfa_valuedata.h +++ b/xfa/fxfa/parser/cxfa_valuedata.h @@ -9,8 +9,8 @@ #include "core/fxcrt/fx_string.h" #include "xfa/fxfa/parser/cxfa_arcdata.h" -#include "xfa/fxfa/parser/cxfa_data.h" -#include "xfa/fxfa/parser/cxfa_exdata.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" +#include "xfa/fxfa/parser/cxfa_exdatadata.h" #include "xfa/fxfa/parser/cxfa_imagedata.h" #include "xfa/fxfa/parser/cxfa_linedata.h" #include "xfa/fxfa/parser/cxfa_rectangledata.h" @@ -18,9 +18,9 @@ class CXFA_Node; -class CXFA_ValueData : public CXFA_Data { +class CXFA_ValueData : public CXFA_DataData { public: - explicit CXFA_ValueData(CXFA_Node* pNode) : CXFA_Data(pNode) {} + explicit CXFA_ValueData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} XFA_Element GetChildValueClassID(); bool GetChildValueContent(WideString& wsContent); @@ -28,7 +28,7 @@ class CXFA_ValueData : public CXFA_Data { CXFA_LineData GetLineData(); CXFA_RectangleData GetRectangleData(); CXFA_TextData GetTextData(); - CXFA_ExData GetExData(); + CXFA_ExDataData GetExData(); CXFA_ImageData GetImageData(); }; diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp index 679ef05212..48832eb5e9 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.cpp +++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp @@ -234,7 +234,7 @@ bool GetAttributeDefaultValue_Boolean(XFA_Element eElement, } // namespace CXFA_WidgetData::CXFA_WidgetData(CXFA_Node* pNode) - : CXFA_Data(pNode), + : CXFA_DataData(pNode), m_bIsNull(true), m_bPreNull(true), m_pUiChildNode(nullptr), diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h index dd9e1d9a66..3f1b4dc399 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.h +++ b/xfa/fxfa/parser/cxfa_widgetdata.h @@ -16,7 +16,7 @@ #include "xfa/fxfa/parser/cxfa_borderdata.h" #include "xfa/fxfa/parser/cxfa_calculatedata.h" #include "xfa/fxfa/parser/cxfa_captiondata.h" -#include "xfa/fxfa/parser/cxfa_data.h" +#include "xfa/fxfa/parser/cxfa_datadata.h" #include "xfa/fxfa/parser/cxfa_fontdata.h" #include "xfa/fxfa/parser/cxfa_margindata.h" #include "xfa/fxfa/parser/cxfa_paradata.h" @@ -38,7 +38,7 @@ enum XFA_VALUEPICTURE { class CXFA_Node; class IFX_Locale; -class CXFA_WidgetData : public CXFA_Data { +class CXFA_WidgetData : public CXFA_DataData { public: explicit CXFA_WidgetData(CXFA_Node* pNode); diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp index 7348e445e3..67256f2385 100644 --- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp @@ -328,7 +328,7 @@ void CreateDataBinding(CXFA_Node* pFormNode, wsItem = single ? wsItem : wsItem + L"\n"; wsNormalizeValue += wsItem; } - CXFA_ExData exData = defValueData.GetExData(); + CXFA_ExDataData exData = defValueData.GetExData(); ASSERT(exData); exData.SetContentType(single ? L"text/plain" : L"text/xml"); } -- cgit v1.2.3