summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn4
-rw-r--r--fxjs/cjx_node.cpp16
-rw-r--r--xfa/fxfa/cxfa_ffwidget.cpp28
-rw-r--r--xfa/fxfa/parser/cxfa_boxdata.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_boxdata.h4
-rw-r--r--xfa/fxfa/parser/cxfa_filldata.cpp (renamed from xfa/fxfa/parser/cxfa_fill.cpp)22
-rw-r--r--xfa/fxfa/parser/cxfa_filldata.h (renamed from xfa/fxfa/parser/cxfa_fill.h)12
-rw-r--r--xfa/fxfa/parser/cxfa_font.cpp10
8 files changed, 51 insertions, 51 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 70eb37edc1..6f3c0140fe 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1823,8 +1823,8 @@ if (pdf_enable_xfa) {
"xfa/fxfa/parser/cxfa_eventdata.h",
"xfa/fxfa/parser/cxfa_exdata.cpp",
"xfa/fxfa/parser/cxfa_exdata.h",
- "xfa/fxfa/parser/cxfa_fill.cpp",
- "xfa/fxfa/parser/cxfa_fill.h",
+ "xfa/fxfa/parser/cxfa_filldata.cpp",
+ "xfa/fxfa/parser/cxfa_filldata.h",
"xfa/fxfa/parser/cxfa_font.cpp",
"xfa/fxfa/parser/cxfa_font.h",
"xfa/fxfa/parser/cxfa_image.cpp",
diff --git a/fxjs/cjx_node.cpp b/fxjs/cjx_node.cpp
index c82a9f4912..490e3a1094 100644
--- a/fxjs/cjx_node.cpp
+++ b/fxjs/cjx_node.cpp
@@ -1580,24 +1580,24 @@ void CJX_Node::Script_Som_FillColor(CFXJSE_Value* pValue,
bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetXFANode()->GetWidgetData();
- if (!pWidgetData) {
+ if (!pWidgetData)
return;
- }
+
CXFA_BorderData borderData = pWidgetData->GetBorderData(true);
- CXFA_Fill borderfill = borderData.GetFill(true);
- CXFA_Node* pNode = borderfill.GetNode();
- if (!pNode) {
+ CXFA_FillData borderfillData = borderData.GetFillData(true);
+ CXFA_Node* pNode = borderfillData.GetNode();
+ if (!pNode)
return;
- }
+
if (bSetting) {
int32_t r;
int32_t g;
int32_t b;
StrToRGB(pValue->ToWideString(), r, g, b);
FX_ARGB color = ArgbEncode(0xff, r, g, b);
- borderfill.SetColor(color);
+ borderfillData.SetColor(color);
} else {
- FX_ARGB color = borderfill.GetColor();
+ FX_ARGB color = borderfillData.GetColor();
int32_t a;
int32_t r;
int32_t g;
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index dcacf5054d..97dc26846e 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -388,10 +388,10 @@ void XFA_BOX_Fill_Radial(CXFA_BoxData boxData,
CXFA_Path& fillPath,
CFX_RectF rtFill,
const CFX_Matrix& matrix) {
- CXFA_Fill fill = boxData.GetFill();
+ CXFA_FillData fillData = boxData.GetFillData();
FX_ARGB crStart, crEnd;
- crStart = fill.GetColor();
- int32_t iType = fill.GetRadial(crEnd);
+ crStart = fillData.GetColor();
+ int32_t iType = fillData.GetRadial(crEnd);
if (iType != XFA_ATTRIBUTEENUM_ToEdge) {
FX_ARGB temp = crEnd;
crEnd = crStart;
@@ -411,10 +411,10 @@ void XFA_BOX_Fill_Pattern(CXFA_BoxData boxData,
CXFA_Path& fillPath,
CFX_RectF rtFill,
const CFX_Matrix& matrix) {
- CXFA_Fill fill = boxData.GetFill();
+ CXFA_FillData fillData = boxData.GetFillData();
FX_ARGB crStart, crEnd;
- crStart = fill.GetColor();
- int32_t iType = fill.GetPattern(crEnd);
+ crStart = fillData.GetColor();
+ int32_t iType = fillData.GetPattern(crEnd);
FX_HatchStyle iHatch = FX_HatchStyle::Cross;
switch (iType) {
case XFA_ATTRIBUTEENUM_CrossDiagonal:
@@ -446,10 +446,10 @@ void XFA_BOX_Fill_Linear(CXFA_BoxData boxData,
CXFA_Path& fillPath,
CFX_RectF rtFill,
const CFX_Matrix& matrix) {
- CXFA_Fill fill = boxData.GetFill();
- FX_ARGB crStart = fill.GetColor();
+ CXFA_FillData fillData = boxData.GetFillData();
+ FX_ARGB crStart = fillData.GetColor();
FX_ARGB crEnd;
- int32_t iType = fill.GetLinear(crEnd);
+ int32_t iType = fillData.GetLinear(crEnd);
CFX_PointF ptStart;
CFX_PointF ptEnd;
switch (iType) {
@@ -483,8 +483,8 @@ void XFA_BOX_Fill(CXFA_BoxData boxData,
const CFX_RectF& rtWidget,
const CFX_Matrix& matrix,
uint32_t dwFlags) {
- CXFA_Fill fill = boxData.GetFill();
- if (!fill || fill.GetPresence() != XFA_ATTRIBUTEENUM_Visible)
+ CXFA_FillData fillData = boxData.GetFillData();
+ if (!fillData || fillData.GetPresence() != XFA_ATTRIBUTEENUM_Visible)
return;
pGS->SaveGraphState();
@@ -492,7 +492,7 @@ void XFA_BOX_Fill(CXFA_BoxData boxData,
XFA_BOX_GetFillPath(boxData, strokes, rtWidget, fillPath,
(dwFlags & XFA_DRAWBOX_ForceRound) != 0);
fillPath.Close();
- XFA_Element eType = fill.GetFillType();
+ XFA_Element eType = fillData.GetFillType();
switch (eType) {
case XFA_Element::Radial:
XFA_BOX_Fill_Radial(boxData, pGS, fillPath, rtWidget, matrix);
@@ -506,7 +506,7 @@ void XFA_BOX_Fill(CXFA_BoxData boxData,
default: {
FX_ARGB cr;
if (eType == XFA_Element::Stipple) {
- int32_t iRate = fill.GetStipple(cr);
+ int32_t iRate = fillData.GetStipple(cr);
if (iRate == 0)
iRate = 100;
int32_t a;
@@ -514,7 +514,7 @@ void XFA_BOX_Fill(CXFA_BoxData boxData,
std::tie(a, rgb) = ArgbToColorRef(cr);
cr = ArgbEncode(iRate * a / 100, rgb);
} else {
- cr = fill.GetColor();
+ cr = fillData.GetColor();
}
pGS->SetFillColor(CXFA_Color(cr));
pGS->FillPath(&fillPath, FXFILL_WINDING, &matrix);
diff --git a/xfa/fxfa/parser/cxfa_boxdata.cpp b/xfa/fxfa/parser/cxfa_boxdata.cpp
index 607a1571dc..d0c264e3b2 100644
--- a/xfa/fxfa/parser/cxfa_boxdata.cpp
+++ b/xfa/fxfa/parser/cxfa_boxdata.cpp
@@ -137,13 +137,13 @@ bool CXFA_BoxData::GetSweepAngle(float& fSweepAngle) const {
return bRet;
}
-CXFA_Fill CXFA_BoxData::GetFill(bool bModified) const {
+CXFA_FillData CXFA_BoxData::GetFillData(bool bModified) const {
if (!m_pNode)
- return CXFA_Fill(nullptr);
+ return CXFA_FillData(nullptr);
CXFA_Node* pFillNode =
m_pNode->JSNode()->GetProperty(0, XFA_Element::Fill, bModified);
- return CXFA_Fill(pFillNode);
+ return CXFA_FillData(pFillNode);
}
CXFA_Margin CXFA_BoxData::GetMargin() const {
diff --git a/xfa/fxfa/parser/cxfa_boxdata.h b/xfa/fxfa/parser/cxfa_boxdata.h
index 384d4c1e00..80a39222e2 100644
--- a/xfa/fxfa/parser/cxfa_boxdata.h
+++ b/xfa/fxfa/parser/cxfa_boxdata.h
@@ -12,7 +12,7 @@
#include "core/fxcrt/fx_system.h"
#include "xfa/fxfa/parser/cxfa_data.h"
#include "xfa/fxfa/parser/cxfa_edgedata.h"
-#include "xfa/fxfa/parser/cxfa_fill.h"
+#include "xfa/fxfa/parser/cxfa_filldata.h"
#include "xfa/fxfa/parser/cxfa_margin.h"
class CXFA_Node;
@@ -46,7 +46,7 @@ class CXFA_BoxData : public CXFA_Data {
return fSweepAngle;
}
- CXFA_Fill GetFill(bool bModified = false) const;
+ CXFA_FillData GetFillData(bool bModified = false) const;
CXFA_Margin GetMargin() const;
int32_t Get3DStyle(bool& bVisible, float& fThickness) const;
};
diff --git a/xfa/fxfa/parser/cxfa_fill.cpp b/xfa/fxfa/parser/cxfa_filldata.cpp
index 8430b254a8..772b1151c3 100644
--- a/xfa/fxfa/parser/cxfa_fill.cpp
+++ b/xfa/fxfa/parser/cxfa_filldata.cpp
@@ -4,19 +4,19 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "xfa/fxfa/parser/cxfa_fill.h"
+#include "xfa/fxfa/parser/cxfa_filldata.h"
#include "xfa/fxfa/parser/cxfa_node.h"
-CXFA_Fill::CXFA_Fill(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+CXFA_FillData::CXFA_FillData(CXFA_Node* pNode) : CXFA_Data(pNode) {}
-CXFA_Fill::~CXFA_Fill() {}
+CXFA_FillData::~CXFA_FillData() {}
-int32_t CXFA_Fill::GetPresence() {
+int32_t CXFA_FillData::GetPresence() {
return m_pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_Presence);
}
-void CXFA_Fill::SetColor(FX_ARGB color) {
+void CXFA_FillData::SetColor(FX_ARGB color) {
CXFA_Node* pNode =
m_pNode->JSNode()->GetProperty(0, XFA_Element::Color, true);
WideString wsColor;
@@ -29,7 +29,7 @@ void CXFA_Fill::SetColor(FX_ARGB color) {
pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsColor, false, false);
}
-FX_ARGB CXFA_Fill::GetColor(bool bText) {
+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))
@@ -40,7 +40,7 @@ FX_ARGB CXFA_Fill::GetColor(bool bText) {
return 0xFFFFFFFF;
}
-XFA_Element CXFA_Fill::GetFillType() {
+XFA_Element CXFA_FillData::GetFillType() {
CXFA_Node* pChild = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pChild) {
XFA_Element eType = pChild->GetElementType();
@@ -52,7 +52,7 @@ XFA_Element CXFA_Fill::GetFillType() {
return XFA_Element::Solid;
}
-int32_t CXFA_Fill::GetPattern(FX_ARGB& foreColor) {
+int32_t CXFA_FillData::GetPattern(FX_ARGB& foreColor) {
CXFA_Node* pNode =
m_pNode->JSNode()->GetProperty(0, XFA_Element::Pattern, true);
if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color, false)) {
@@ -65,7 +65,7 @@ int32_t CXFA_Fill::GetPattern(FX_ARGB& foreColor) {
return pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_Type);
}
-int32_t CXFA_Fill::GetStipple(FX_ARGB& stippleColor) {
+int32_t CXFA_FillData::GetStipple(FX_ARGB& stippleColor) {
CXFA_Node* pNode =
m_pNode->JSNode()->GetProperty(0, XFA_Element::Stipple, true);
int32_t eAttr = 50;
@@ -80,7 +80,7 @@ int32_t CXFA_Fill::GetStipple(FX_ARGB& stippleColor) {
return eAttr;
}
-int32_t CXFA_Fill::GetLinear(FX_ARGB& endColor) {
+int32_t CXFA_FillData::GetLinear(FX_ARGB& endColor) {
CXFA_Node* pNode =
m_pNode->JSNode()->GetProperty(0, XFA_Element::Linear, true);
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_ToRight;
@@ -95,7 +95,7 @@ int32_t CXFA_Fill::GetLinear(FX_ARGB& endColor) {
return eAttr;
}
-int32_t CXFA_Fill::GetRadial(FX_ARGB& endColor) {
+int32_t CXFA_FillData::GetRadial(FX_ARGB& endColor) {
CXFA_Node* pNode =
m_pNode->JSNode()->GetProperty(0, XFA_Element::Radial, true);
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_ToEdge;
diff --git a/xfa/fxfa/parser/cxfa_fill.h b/xfa/fxfa/parser/cxfa_filldata.h
index 4b13565765..d47fb5d86a 100644
--- a/xfa/fxfa/parser/cxfa_fill.h
+++ b/xfa/fxfa/parser/cxfa_filldata.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef XFA_FXFA_PARSER_CXFA_FILL_H_
-#define XFA_FXFA_PARSER_CXFA_FILL_H_
+#ifndef XFA_FXFA_PARSER_CXFA_FILLDATA_H_
+#define XFA_FXFA_PARSER_CXFA_FILLDATA_H_
#include "core/fxcrt/fx_system.h"
#include "core/fxge/fx_dib.h"
@@ -13,10 +13,10 @@
class CXFA_Node;
-class CXFA_Fill : public CXFA_Data {
+class CXFA_FillData : public CXFA_Data {
public:
- explicit CXFA_Fill(CXFA_Node* pNode);
- ~CXFA_Fill();
+ explicit CXFA_FillData(CXFA_Node* pNode);
+ ~CXFA_FillData();
int32_t GetPresence();
FX_ARGB GetColor(bool bText = false);
@@ -28,4 +28,4 @@ class CXFA_Fill : public CXFA_Data {
void SetColor(FX_ARGB color);
};
-#endif // XFA_FXFA_PARSER_CXFA_FILL_H_
+#endif // XFA_FXFA_PARSER_CXFA_FILLDATA_H_
diff --git a/xfa/fxfa/parser/cxfa_font.cpp b/xfa/fxfa/parser/cxfa_font.cpp
index ab0825fbe6..9de43535b5 100644
--- a/xfa/fxfa/parser/cxfa_font.cpp
+++ b/xfa/fxfa/parser/cxfa_font.cpp
@@ -7,7 +7,7 @@
#include "xfa/fxfa/parser/cxfa_font.h"
#include "core/fxge/fx_dib.h"
-#include "xfa/fxfa/parser/cxfa_fill.h"
+#include "xfa/fxfa/parser/cxfa_filldata.h"
#include "xfa/fxfa/parser/cxfa_measurement.h"
#include "xfa/fxfa/parser/cxfa_node.h"
@@ -85,11 +85,11 @@ bool CXFA_Font::IsItalic() {
}
void CXFA_Font::SetColor(FX_ARGB color) {
- CXFA_Fill fill(m_pNode->JSNode()->GetProperty(0, XFA_Element::Fill, true));
- fill.SetColor(color);
+ CXFA_FillData(m_pNode->JSNode()->GetProperty(0, XFA_Element::Fill, true))
+ .SetColor(color);
}
FX_ARGB CXFA_Font::GetColor() {
- CXFA_Fill fill(m_pNode->GetChild(0, XFA_Element::Fill, false));
- return fill ? fill.GetColor(true) : 0xFF000000;
+ CXFA_FillData fillData(m_pNode->GetChild(0, XFA_Element::Fill, false));
+ return fillData ? fillData.GetColor(true) : 0xFF000000;
}