summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-07 20:30:40 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-07 20:30:40 +0000
commit73c4b0fe5dd1e1924b2cd7b19910ef9d86dcc9ab (patch)
treeefeab8632b17781ed26817d4bad23362854b8c52 /xfa/fxfa/parser
parent4d48bbfd5378ffe70a17ad613b9c167ad3ef03b2 (diff)
downloadpdfium-73c4b0fe5dd1e1924b2cd7b19910ef9d86dcc9ab.tar.xz
Rename CXFA_Image to CXFA_ImageData
This CL renames CXFA_Image to CXFA_ImageData to make it clear it's part of the data hierarchy. Change-Id: Ia593ef3c9deb872db11f8246b13ef3c39a90d4c7 Reviewed-on: https://pdfium-review.googlesource.com/17984 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_imagedata.cpp (renamed from xfa/fxfa/parser/cxfa_image.cpp)20
-rw-r--r--xfa/fxfa/parser/cxfa_imagedata.h (renamed from xfa/fxfa/parser/cxfa_image.h)10
-rw-r--r--xfa/fxfa/parser/cxfa_value.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_value.h4
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp18
5 files changed, 28 insertions, 28 deletions
diff --git a/xfa/fxfa/parser/cxfa_image.cpp b/xfa/fxfa/parser/cxfa_imagedata.cpp
index cd25b5a39e..4beb78c35b 100644
--- a/xfa/fxfa/parser/cxfa_image.cpp
+++ b/xfa/fxfa/parser/cxfa_imagedata.cpp
@@ -4,44 +4,44 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "xfa/fxfa/parser/cxfa_image.h"
+#include "xfa/fxfa/parser/cxfa_imagedata.h"
#include "xfa/fxfa/parser/cxfa_node.h"
-CXFA_Image::CXFA_Image(CXFA_Node* pNode, bool bDefValue)
+CXFA_ImageData::CXFA_ImageData(CXFA_Node* pNode, bool bDefValue)
: CXFA_Data(pNode), m_bDefValue(bDefValue) {}
-int32_t CXFA_Image::GetAspect() {
+int32_t CXFA_ImageData::GetAspect() {
return m_pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_Aspect);
}
-bool CXFA_Image::GetContentType(WideString& wsContentType) {
+bool CXFA_ImageData::GetContentType(WideString& wsContentType) {
return m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_ContentType, wsContentType,
true);
}
-bool CXFA_Image::GetHref(WideString& wsHref) {
+bool CXFA_ImageData::GetHref(WideString& wsHref) {
if (m_bDefValue)
return m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Href, wsHref, true);
return m_pNode->JSNode()->GetAttribute(L"href", wsHref, true);
}
-int32_t CXFA_Image::GetTransferEncoding() {
+int32_t CXFA_ImageData::GetTransferEncoding() {
if (m_bDefValue)
return m_pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_TransferEncoding);
return XFA_ATTRIBUTEENUM_Base64;
}
-bool CXFA_Image::GetContent(WideString& wsText) {
+bool CXFA_ImageData::GetContent(WideString& wsText) {
return m_pNode->JSNode()->TryContent(wsText, false, true);
}
-bool CXFA_Image::SetContentType(const WideString& wsContentType) {
+bool CXFA_ImageData::SetContentType(const WideString& wsContentType) {
return m_pNode->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType,
false, false);
}
-bool CXFA_Image::SetHref(const WideString& wsHref) {
+bool CXFA_ImageData::SetHref(const WideString& wsHref) {
if (m_bDefValue)
return m_pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Href, wsHref, false,
false);
@@ -49,7 +49,7 @@ bool CXFA_Image::SetHref(const WideString& wsHref) {
wsHref.AsStringView(), false);
}
-bool CXFA_Image::SetTransferEncoding(int32_t iTransferEncoding) {
+bool CXFA_ImageData::SetTransferEncoding(int32_t iTransferEncoding) {
if (m_bDefValue) {
return m_pNode->JSNode()->SetEnum(XFA_ATTRIBUTE_TransferEncoding,
(XFA_ATTRIBUTEENUM)iTransferEncoding,
diff --git a/xfa/fxfa/parser/cxfa_image.h b/xfa/fxfa/parser/cxfa_imagedata.h
index cc08bc3380..e94615ae1d 100644
--- a/xfa/fxfa/parser/cxfa_image.h
+++ b/xfa/fxfa/parser/cxfa_imagedata.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef XFA_FXFA_PARSER_CXFA_IMAGE_H_
-#define XFA_FXFA_PARSER_CXFA_IMAGE_H_
+#ifndef XFA_FXFA_PARSER_CXFA_IMAGEDATA_H_
+#define XFA_FXFA_PARSER_CXFA_IMAGEDATA_H_
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
@@ -13,9 +13,9 @@
class CXFA_Node;
-class CXFA_Image : public CXFA_Data {
+class CXFA_ImageData : public CXFA_Data {
public:
- CXFA_Image(CXFA_Node* pNode, bool bDefValue);
+ CXFA_ImageData(CXFA_Node* pNode, bool bDefValue);
int32_t GetAspect();
bool GetContentType(WideString& wsContentType);
@@ -30,4 +30,4 @@ class CXFA_Image : public CXFA_Data {
bool m_bDefValue;
};
-#endif // XFA_FXFA_PARSER_CXFA_IMAGE_H_
+#endif // XFA_FXFA_PARSER_CXFA_IMAGEDATA_H_
diff --git a/xfa/fxfa/parser/cxfa_value.cpp b/xfa/fxfa/parser/cxfa_value.cpp
index 9b7040c33b..5b812a9f7f 100644
--- a/xfa/fxfa/parser/cxfa_value.cpp
+++ b/xfa/fxfa/parser/cxfa_value.cpp
@@ -49,8 +49,8 @@ CXFA_ExData CXFA_Value::GetExData() {
: nullptr);
}
-CXFA_Image CXFA_Value::GetImage() {
- return CXFA_Image(
+CXFA_ImageData CXFA_Value::GetImageData() {
+ return CXFA_ImageData(
m_pNode ? (m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild)) : nullptr,
true);
}
diff --git a/xfa/fxfa/parser/cxfa_value.h b/xfa/fxfa/parser/cxfa_value.h
index 513f37509b..65a9c36b00 100644
--- a/xfa/fxfa/parser/cxfa_value.h
+++ b/xfa/fxfa/parser/cxfa_value.h
@@ -11,7 +11,7 @@
#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_image.h"
+#include "xfa/fxfa/parser/cxfa_imagedata.h"
#include "xfa/fxfa/parser/cxfa_line.h"
#include "xfa/fxfa/parser/cxfa_rectangle.h"
#include "xfa/fxfa/parser/cxfa_text.h"
@@ -29,7 +29,7 @@ class CXFA_Value : public CXFA_Data {
CXFA_Rectangle GetRectangle();
CXFA_Text GetText();
CXFA_ExData GetExData();
- CXFA_Image GetImage();
+ CXFA_ImageData GetImageData();
};
#endif // XFA_FXFA_PARSER_CXFA_VALUE_H_
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index 37d8084399..a6441a68db 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -138,13 +138,13 @@ void CreateDataBinding(CXFA_Node* pFormNode,
WideString wsFormattedValue;
switch (eUIType) {
case XFA_Element::ImageEdit: {
- CXFA_Image image = defValue.GetImage();
+ CXFA_ImageData imageData = defValue.GetImageData();
WideString wsContentType;
WideString wsHref;
- if (image) {
- image.GetContent(wsValue);
- image.GetContentType(wsContentType);
- image.GetHref(wsHref);
+ if (imageData) {
+ imageData.GetContent(wsValue);
+ imageData.GetContentType(wsContentType);
+ imageData.GetHref(wsHref);
}
CFX_XMLElement* pXMLDataElement =
static_cast<CFX_XMLElement*>(pDataNode->GetXMLMappingNode());
@@ -297,8 +297,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
case XFA_Element::ImageEdit: {
FormValueNode_SetChildContent(defValue.GetNode(), wsNormalizeValue,
XFA_Element::Image);
- CXFA_Image image = defValue.GetImage();
- if (image) {
+ CXFA_ImageData imageData = defValue.GetImageData();
+ if (imageData) {
CFX_XMLElement* pXMLDataElement =
static_cast<CFX_XMLElement*>(pDataNode->GetXMLMappingNode());
ASSERT(pXMLDataElement);
@@ -308,12 +308,12 @@ void CreateDataBinding(CXFA_Node* pFormNode,
if (!wsContentType.IsEmpty()) {
pDataNode->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType,
wsContentType, false, false);
- image.SetContentType(wsContentType);
+ imageData.SetContentType(wsContentType);
}
WideString wsHref = pXMLDataElement->GetString(L"href");
if (!wsHref.IsEmpty())
- image.SetHref(wsHref);
+ imageData.SetHref(wsHref);
}
break;
}