summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_ffcheckbutton.cpp2
-rw-r--r--xfa/fxfa/cxfa_ffcheckbutton.h2
-rw-r--r--xfa/fxfa/cxfa_fffield.cpp24
-rw-r--r--xfa/fxfa/cxfa_fffield.h4
-rw-r--r--xfa/fxfa/cxfa_ffwidget.cpp31
-rw-r--r--xfa/fxfa/cxfa_ffwidget.h4
-rw-r--r--xfa/fxfa/cxfa_widgetacc.cpp9
-rw-r--r--xfa/fxfa/cxfa_widgetacc.h2
-rw-r--r--xfa/fxfa/parser/cxfa_boxdata.h4
-rw-r--r--xfa/fxfa/parser/cxfa_imagedata.cpp13
-rw-r--r--xfa/fxfa/parser/cxfa_imagedata.h13
-rw-r--r--xfa/fxfa/parser/cxfa_scriptdata.cpp17
-rw-r--r--xfa/fxfa/parser/cxfa_scriptdata.h10
-rw-r--r--xfa/fxfa/parser/xfa_resolvenode_rs.h6
14 files changed, 70 insertions, 71 deletions
diff --git a/xfa/fxfa/cxfa_ffcheckbutton.cpp b/xfa/fxfa/cxfa_ffcheckbutton.cpp
index ae73ba43fe..a9d47d17bb 100644
--- a/xfa/fxfa/cxfa_ffcheckbutton.cpp
+++ b/xfa/fxfa/cxfa_ffcheckbutton.cpp
@@ -189,7 +189,7 @@ bool CXFA_FFCheckButton::PerformLayout() {
}
void CXFA_FFCheckButton::CapLeftRightPlacement(
- CXFA_MarginData captionMarginData) {
+ const CXFA_MarginData& captionMarginData) {
XFA_RectWidthoutMargin(m_rtCaption, captionMarginData);
if (m_rtCaption.height < 0)
m_rtCaption.top += m_rtCaption.height;
diff --git a/xfa/fxfa/cxfa_ffcheckbutton.h b/xfa/fxfa/cxfa_ffcheckbutton.h
index 4154852788..566e803ad3 100644
--- a/xfa/fxfa/cxfa_ffcheckbutton.h
+++ b/xfa/fxfa/cxfa_ffcheckbutton.h
@@ -35,7 +35,7 @@ class CXFA_FFCheckButton : public CXFA_FFField {
private:
bool CommitData() override;
bool IsDataChanged() override;
- void CapLeftRightPlacement(CXFA_MarginData captionMarginData);
+ void CapLeftRightPlacement(const CXFA_MarginData& captionMarginData);
void AddUIMargin(int32_t iCapPlacement);
XFA_CHECKSTATE FWLState2XFAState();
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp
index a58fd00cce..0ef6722d7f 100644
--- a/xfa/fxfa/cxfa_fffield.cpp
+++ b/xfa/fxfa/cxfa_fffield.cpp
@@ -233,14 +233,16 @@ void CXFA_FFField::CapPlacement() {
switch (iCapPlacement) {
case XFA_ATTRIBUTEENUM_Left: {
m_rtCaption.width = fCapReserve;
- CapLeftRightPlacement(captionData, rtWidget, iCapPlacement);
+ CapLeftRightPlacement(captionData.GetMarginData(), rtWidget,
+ iCapPlacement);
m_rtUI.width -= fCapReserve;
m_rtUI.left += fCapReserve;
break;
}
case XFA_ATTRIBUTEENUM_Top: {
m_rtCaption.height = fCapReserve;
- CapTopBottomPlacement(captionData, rtWidget, iCapPlacement);
+ CapTopBottomPlacement(captionData.GetMarginData(), rtWidget,
+ iCapPlacement);
m_rtUI.top += fCapReserve;
m_rtUI.height -= fCapReserve;
break;
@@ -248,14 +250,16 @@ void CXFA_FFField::CapPlacement() {
case XFA_ATTRIBUTEENUM_Right: {
m_rtCaption.left = m_rtCaption.right() - fCapReserve;
m_rtCaption.width = fCapReserve;
- CapLeftRightPlacement(captionData, rtWidget, iCapPlacement);
+ CapLeftRightPlacement(captionData.GetMarginData(), rtWidget,
+ iCapPlacement);
m_rtUI.width -= fCapReserve;
break;
}
case XFA_ATTRIBUTEENUM_Bottom: {
m_rtCaption.top = m_rtCaption.bottom() - fCapReserve;
m_rtCaption.height = fCapReserve;
- CapTopBottomPlacement(captionData, rtWidget, iCapPlacement);
+ CapTopBottomPlacement(captionData.GetMarginData(), rtWidget,
+ iCapPlacement);
m_rtUI.height -= fCapReserve;
break;
}
@@ -274,13 +278,13 @@ void CXFA_FFField::CapPlacement() {
m_rtUI.Normalize();
}
-void CXFA_FFField::CapTopBottomPlacement(CXFA_CaptionData captionData,
+void CXFA_FFField::CapTopBottomPlacement(const CXFA_MarginData& marginData,
const CFX_RectF& rtWidget,
int32_t iCapPlacement) {
CFX_RectF rtUIMargin = m_pDataAcc->GetUIMargin();
m_rtCaption.left += rtUIMargin.left;
- if (CXFA_MarginData captionMarginData = captionData.GetMarginData()) {
- XFA_RectWidthoutMargin(m_rtCaption, captionMarginData);
+ if (marginData) {
+ XFA_RectWidthoutMargin(m_rtCaption, marginData);
if (m_rtCaption.height < 0)
m_rtCaption.top += m_rtCaption.height;
}
@@ -300,14 +304,14 @@ void CXFA_FFField::CapTopBottomPlacement(CXFA_CaptionData captionData,
}
}
-void CXFA_FFField::CapLeftRightPlacement(CXFA_CaptionData captionData,
+void CXFA_FFField::CapLeftRightPlacement(const CXFA_MarginData& marginData,
const CFX_RectF& rtWidget,
int32_t iCapPlacement) {
CFX_RectF rtUIMargin = m_pDataAcc->GetUIMargin();
m_rtCaption.top += rtUIMargin.top;
m_rtCaption.height -= rtUIMargin.top;
- if (CXFA_MarginData captionMarginData = captionData.GetMarginData()) {
- XFA_RectWidthoutMargin(m_rtCaption, captionMarginData);
+ if (marginData) {
+ XFA_RectWidthoutMargin(m_rtCaption, marginData);
if (m_rtCaption.height < 0)
m_rtCaption.top += m_rtCaption.height;
}
diff --git a/xfa/fxfa/cxfa_fffield.h b/xfa/fxfa/cxfa_fffield.h
index 7d4320717f..dc6e916d18 100644
--- a/xfa/fxfa/cxfa_fffield.h
+++ b/xfa/fxfa/cxfa_fffield.h
@@ -83,10 +83,10 @@ class CXFA_FFField : public CXFA_FFWidget, public IFWL_WidgetDelegate {
void DrawFocus(CXFA_Graphics* pGS, CFX_Matrix* pMatrix);
void TranslateFWLMessage(CFWL_Message* pMessage);
void CapPlacement();
- void CapTopBottomPlacement(CXFA_CaptionData captionData,
+ void CapTopBottomPlacement(const CXFA_MarginData& marginData,
const CFX_RectF& rtWidget,
int32_t iCapPlacement);
- void CapLeftRightPlacement(CXFA_CaptionData captionData,
+ void CapLeftRightPlacement(const CXFA_MarginData& marginData,
const CFX_RectF& rtWidget,
int32_t iCapPlacement);
void SetEditScrollOffset();
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index 4f5c66ef7b..d3a6498c4e 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -39,7 +39,7 @@
namespace {
-void XFA_BOX_GetPath_Arc(CXFA_BoxData boxData,
+void XFA_BOX_GetPath_Arc(const CXFA_BoxData& boxData,
CFX_RectF rtDraw,
CXFA_Path& fillPath,
uint32_t dwFlags) {
@@ -234,7 +234,7 @@ void XFA_BOX_GetPath(const std::vector<CXFA_StrokeData>& strokes,
}
}
-void XFA_BOX_GetFillPath(CXFA_BoxData boxData,
+void XFA_BOX_GetFillPath(const CXFA_BoxData& boxData,
const std::vector<CXFA_StrokeData>& strokes,
CFX_RectF rtWidget,
CXFA_Path& fillPath,
@@ -384,12 +384,12 @@ void XFA_BOX_GetFillPath(CXFA_BoxData boxData,
}
}
-void XFA_BOX_Fill_Radial(CXFA_BoxData boxData,
+void XFA_BOX_Fill_Radial(const CXFA_BoxData& boxData,
CXFA_Graphics* pGS,
CXFA_Path& fillPath,
CFX_RectF rtFill,
const CFX_Matrix& matrix) {
- CXFA_FillData fillData = boxData.GetFillData();
+ CXFA_FillData fillData = boxData.GetFillData(false);
FX_ARGB crStart, crEnd;
crStart = fillData.GetColor();
int32_t iType = fillData.GetRadial(crEnd);
@@ -407,12 +407,12 @@ void XFA_BOX_Fill_Radial(CXFA_BoxData boxData,
pGS->FillPath(&fillPath, FXFILL_WINDING, &matrix);
}
-void XFA_BOX_Fill_Pattern(CXFA_BoxData boxData,
+void XFA_BOX_Fill_Pattern(const CXFA_BoxData& boxData,
CXFA_Graphics* pGS,
CXFA_Path& fillPath,
CFX_RectF rtFill,
const CFX_Matrix& matrix) {
- CXFA_FillData fillData = boxData.GetFillData();
+ CXFA_FillData fillData = boxData.GetFillData(false);
FX_ARGB crStart, crEnd;
crStart = fillData.GetColor();
int32_t iType = fillData.GetPattern(crEnd);
@@ -442,12 +442,12 @@ void XFA_BOX_Fill_Pattern(CXFA_BoxData boxData,
pGS->FillPath(&fillPath, FXFILL_WINDING, &matrix);
}
-void XFA_BOX_Fill_Linear(CXFA_BoxData boxData,
+void XFA_BOX_Fill_Linear(const CXFA_BoxData& boxData,
CXFA_Graphics* pGS,
CXFA_Path& fillPath,
CFX_RectF rtFill,
const CFX_Matrix& matrix) {
- CXFA_FillData fillData = boxData.GetFillData();
+ CXFA_FillData fillData = boxData.GetFillData(false);
FX_ARGB crStart = fillData.GetColor();
FX_ARGB crEnd;
int32_t iType = fillData.GetLinear(crEnd);
@@ -478,13 +478,13 @@ void XFA_BOX_Fill_Linear(CXFA_BoxData boxData,
pGS->FillPath(&fillPath, FXFILL_WINDING, &matrix);
}
-void XFA_BOX_Fill(CXFA_BoxData boxData,
+void XFA_BOX_Fill(const CXFA_BoxData& boxData,
const std::vector<CXFA_StrokeData>& strokes,
CXFA_Graphics* pGS,
const CFX_RectF& rtWidget,
const CFX_Matrix& matrix,
uint32_t dwFlags) {
- CXFA_FillData fillData = boxData.GetFillData();
+ CXFA_FillData fillData = boxData.GetFillData(false);
if (!fillData || fillData.GetPresence() != XFA_ATTRIBUTEENUM_Visible)
return;
@@ -524,7 +524,7 @@ void XFA_BOX_Fill(CXFA_BoxData boxData,
pGS->RestoreGraphState();
}
-void XFA_BOX_StrokePath(CXFA_StrokeData strokeData,
+void XFA_BOX_StrokePath(const CXFA_StrokeData& strokeData,
CXFA_Path* pPath,
CXFA_Graphics* pGS,
const CFX_Matrix& matrix) {
@@ -549,7 +549,7 @@ void XFA_BOX_StrokePath(CXFA_StrokeData strokeData,
pGS->RestoreGraphState();
}
-void XFA_BOX_StrokeArc(CXFA_BoxData boxData,
+void XFA_BOX_StrokeArc(const CXFA_BoxData& boxData,
CXFA_Graphics* pGS,
CFX_RectF rtWidget,
const CFX_Matrix& matrix,
@@ -1008,14 +1008,14 @@ bool CXFA_FFWidget::UpdateFWLData() {
void CXFA_FFWidget::UpdateWidgetProperty() {}
void CXFA_FFWidget::DrawBorder(CXFA_Graphics* pGS,
- CXFA_BoxData boxData,
+ const CXFA_BoxData& boxData,
const CFX_RectF& rtBorder,
const CFX_Matrix& matrix) {
XFA_DrawBox(boxData, pGS, rtBorder, matrix, 0);
}
void CXFA_FFWidget::DrawBorderWithFlags(CXFA_Graphics* pGS,
- CXFA_BoxData boxData,
+ const CXFA_BoxData& boxData,
const CFX_RectF& rtBorder,
const CFX_Matrix& matrix,
uint32_t dwFlags) {
@@ -1890,8 +1890,7 @@ RetainPtr<CFX_DIBitmap> XFA_LoadImageData(CXFA_FFDoc* pDoc,
uint8_t* pImageBuffer = nullptr;
RetainPtr<IFX_SeekableReadStream> pImageFileRead;
if (wsImage.GetLength() > 0) {
- XFA_ATTRIBUTEENUM iEncoding =
- (XFA_ATTRIBUTEENUM)pImageData->GetTransferEncoding();
+ XFA_ATTRIBUTEENUM iEncoding = pImageData->GetTransferEncoding();
if (iEncoding == XFA_ATTRIBUTEENUM_Base64) {
ByteString bsData = wsImage.UTF8Encode();
int32_t iLength = bsData.GetLength();
diff --git a/xfa/fxfa/cxfa_ffwidget.h b/xfa/fxfa/cxfa_ffwidget.h
index b750a2db2b..7bc3d6b682 100644
--- a/xfa/fxfa/cxfa_ffwidget.h
+++ b/xfa/fxfa/cxfa_ffwidget.h
@@ -165,11 +165,11 @@ class CXFA_FFWidget : public CXFA_ContentLayoutItem {
virtual bool PtInActiveRect(const CFX_PointF& point);
void DrawBorder(CXFA_Graphics* pGS,
- CXFA_BoxData boxData,
+ const CXFA_BoxData& boxData,
const CFX_RectF& rtBorder,
const CFX_Matrix& matrix);
void DrawBorderWithFlags(CXFA_Graphics* pGS,
- CXFA_BoxData boxData,
+ const CXFA_BoxData& boxData,
const CFX_RectF& rtBorder,
const CFX_Matrix& matrix,
uint32_t dwFlags);
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp
index cb43783bdc..7dab15926a 100644
--- a/xfa/fxfa/cxfa_widgetacc.cpp
+++ b/xfa/fxfa/cxfa_widgetacc.cpp
@@ -579,7 +579,7 @@ int32_t CXFA_WidgetAcc::ProcessValidate(int32_t iFlags) {
return iRet | iFormat;
}
-int32_t CXFA_WidgetAcc::ExecuteScript(CXFA_ScriptData scriptData,
+int32_t CXFA_WidgetAcc::ExecuteScript(const CXFA_ScriptData& scriptData,
CXFA_EventParam* pEventParam) {
bool bRet;
int32_t iRet;
@@ -605,8 +605,8 @@ std::pair<int32_t, bool> CXFA_WidgetAcc::ExecuteBoolScript(
if (wsExpression.IsEmpty())
return {XFA_EVENTERROR_NotExist, false};
- XFA_SCRIPTTYPE eScriptType = scriptData.GetContentType();
- if (eScriptType == XFA_SCRIPTTYPE_Unkown)
+ XFA_ScriptDataType eScriptType = scriptData.GetContentType();
+ if (eScriptType == XFA_ScriptDataType::Unknown)
return {XFA_EVENTERROR_Success, false};
CXFA_FFDoc* pDoc = GetDoc();
@@ -622,8 +622,7 @@ std::pair<int32_t, bool> CXFA_WidgetAcc::ExecuteBoolScript(
auto pTmpRetValue = pdfium::MakeUnique<CFXJSE_Value>(pContext->GetRuntime());
++m_nRecursionDepth;
- bool bRet = pContext->RunScript((XFA_SCRIPTLANGTYPE)eScriptType,
- wsExpression.AsStringView(),
+ bool bRet = pContext->RunScript(eScriptType, wsExpression.AsStringView(),
pTmpRetValue.get(), m_pNode);
--m_nRecursionDepth;
int32_t iRet = XFA_EVENTERROR_Error;
diff --git a/xfa/fxfa/cxfa_widgetacc.h b/xfa/fxfa/cxfa_widgetacc.h
index 7c54f3d1d5..600cc1afed 100644
--- a/xfa/fxfa/cxfa_widgetacc.h
+++ b/xfa/fxfa/cxfa_widgetacc.h
@@ -49,7 +49,7 @@ class CXFA_WidgetAcc : public CXFA_WidgetData {
CXFA_EventParam* pEventParam);
int32_t ProcessCalculate();
int32_t ProcessValidate(int32_t iFlags);
- int32_t ExecuteScript(CXFA_ScriptData scriptData,
+ int32_t ExecuteScript(const CXFA_ScriptData& scriptData,
CXFA_EventParam* pEventParam);
std::pair<int32_t, bool> ExecuteBoolScript(CXFA_ScriptData scriptData,
CXFA_EventParam* pEventParam);
diff --git a/xfa/fxfa/parser/cxfa_boxdata.h b/xfa/fxfa/parser/cxfa_boxdata.h
index b4c348311c..ae946c4666 100644
--- a/xfa/fxfa/parser/cxfa_boxdata.h
+++ b/xfa/fxfa/parser/cxfa_boxdata.h
@@ -29,7 +29,7 @@ class CXFA_BoxData : public CXFA_Data {
int32_t GetHand() const;
int32_t GetPresence() const;
int32_t CountEdges() const;
- CXFA_EdgeData GetEdgeData(int32_t nIndex = 0) const;
+ CXFA_EdgeData GetEdgeData(int32_t nIndex) const;
std::vector<CXFA_StrokeData> GetStrokes() const;
bool IsCircular() const;
bool GetStartAngle(float& fStartAngle) const;
@@ -46,7 +46,7 @@ class CXFA_BoxData : public CXFA_Data {
return fSweepAngle;
}
- CXFA_FillData GetFillData(bool bModified = false) const;
+ CXFA_FillData GetFillData(bool bModified) const;
CXFA_MarginData GetMarginData() const;
int32_t Get3DStyle(bool& bVisible, float& fThickness) const;
};
diff --git a/xfa/fxfa/parser/cxfa_imagedata.cpp b/xfa/fxfa/parser/cxfa_imagedata.cpp
index 3ae6e5df3e..fbe707a9d4 100644
--- a/xfa/fxfa/parser/cxfa_imagedata.cpp
+++ b/xfa/fxfa/parser/cxfa_imagedata.cpp
@@ -26,9 +26,11 @@ bool CXFA_ImageData::GetHref(WideString& wsHref) {
return m_pNode->JSNode()->GetAttribute(L"href", wsHref, true);
}
-int32_t CXFA_ImageData::GetTransferEncoding() {
- if (m_bDefValue)
- return m_pNode->JSNode()->GetEnum(XFA_Attribute::TransferEncoding);
+XFA_ATTRIBUTEENUM CXFA_ImageData::GetTransferEncoding() {
+ if (m_bDefValue) {
+ return static_cast<XFA_ATTRIBUTEENUM>(
+ m_pNode->JSNode()->GetEnum(XFA_Attribute::TransferEncoding));
+ }
return XFA_ATTRIBUTEENUM_Base64;
}
@@ -49,11 +51,10 @@ bool CXFA_ImageData::SetHref(const WideString& wsHref) {
wsHref.AsStringView(), false);
}
-bool CXFA_ImageData::SetTransferEncoding(int32_t iTransferEncoding) {
+bool CXFA_ImageData::SetTransferEncoding(XFA_ATTRIBUTEENUM iTransferEncoding) {
if (m_bDefValue) {
return m_pNode->JSNode()->SetEnum(XFA_Attribute::TransferEncoding,
- (XFA_ATTRIBUTEENUM)iTransferEncoding,
- false);
+ iTransferEncoding, false);
}
return true;
}
diff --git a/xfa/fxfa/parser/cxfa_imagedata.h b/xfa/fxfa/parser/cxfa_imagedata.h
index e94615ae1d..8b3ae43b98 100644
--- a/xfa/fxfa/parser/cxfa_imagedata.h
+++ b/xfa/fxfa/parser/cxfa_imagedata.h
@@ -18,13 +18,16 @@ class CXFA_ImageData : public CXFA_Data {
CXFA_ImageData(CXFA_Node* pNode, bool bDefValue);
int32_t GetAspect();
- bool GetContentType(WideString& wsContentType);
- bool GetHref(WideString& wsHref);
- int32_t GetTransferEncoding();
bool GetContent(WideString& wsText);
- bool SetContentType(const WideString& wsContentType);
+
+ bool GetHref(WideString& wsHref);
bool SetHref(const WideString& wsHref);
- bool SetTransferEncoding(int32_t iTransferEncoding);
+
+ XFA_ATTRIBUTEENUM GetTransferEncoding();
+ bool SetTransferEncoding(XFA_ATTRIBUTEENUM iTransferEncoding);
+
+ bool GetContentType(WideString& wsContentType);
+ bool SetContentType(const WideString& wsContentType);
private:
bool m_bDefValue;
diff --git a/xfa/fxfa/parser/cxfa_scriptdata.cpp b/xfa/fxfa/parser/cxfa_scriptdata.cpp
index 1831046352..619dcc14b6 100644
--- a/xfa/fxfa/parser/cxfa_scriptdata.cpp
+++ b/xfa/fxfa/parser/cxfa_scriptdata.cpp
@@ -10,16 +10,15 @@
CXFA_ScriptData::CXFA_ScriptData(CXFA_Node* pNode) : CXFA_Data(pNode) {}
-XFA_SCRIPTTYPE CXFA_ScriptData::GetContentType() {
+XFA_ScriptDataType CXFA_ScriptData::GetContentType() {
WideStringView cData;
- if (m_pNode->JSNode()->TryCData(XFA_Attribute::ContentType, cData, false)) {
- if (cData == L"application/x-javascript")
- return XFA_SCRIPTTYPE_Javascript;
- if (cData == L"application/x-formcalc")
- return XFA_SCRIPTTYPE_Formcalc;
- return XFA_SCRIPTTYPE_Unkown;
- }
- return XFA_SCRIPTTYPE_Formcalc;
+ if (!m_pNode->JSNode()->TryCData(XFA_Attribute::ContentType, cData, false))
+ return XFA_ScriptDataType::Formcalc;
+ if (cData == L"application/x-javascript")
+ return XFA_ScriptDataType::Javascript;
+ if (cData == L"application/x-formcalc")
+ return XFA_ScriptDataType::Formcalc;
+ return XFA_ScriptDataType::Unknown;
}
int32_t CXFA_ScriptData::GetRunAt() {
diff --git a/xfa/fxfa/parser/cxfa_scriptdata.h b/xfa/fxfa/parser/cxfa_scriptdata.h
index f7b8d741fc..36c9a31e7e 100644
--- a/xfa/fxfa/parser/cxfa_scriptdata.h
+++ b/xfa/fxfa/parser/cxfa_scriptdata.h
@@ -12,10 +12,10 @@
#include "core/fxcrt/fx_string.h"
#include "xfa/fxfa/parser/cxfa_data.h"
-enum XFA_SCRIPTTYPE {
- XFA_SCRIPTTYPE_Formcalc = 0,
- XFA_SCRIPTTYPE_Javascript,
- XFA_SCRIPTTYPE_Unkown,
+enum class XFA_ScriptDataType {
+ Formcalc = 0,
+ Javascript,
+ Unknown,
};
class CXFA_Node;
@@ -24,7 +24,7 @@ class CXFA_ScriptData : public CXFA_Data {
public:
explicit CXFA_ScriptData(CXFA_Node* pNode);
- XFA_SCRIPTTYPE GetContentType();
+ XFA_ScriptDataType GetContentType();
int32_t GetRunAt();
void GetExpression(WideString& wsExpression);
};
diff --git a/xfa/fxfa/parser/xfa_resolvenode_rs.h b/xfa/fxfa/parser/xfa_resolvenode_rs.h
index c1c8e6b4c7..c5cdeee06f 100644
--- a/xfa/fxfa/parser/xfa_resolvenode_rs.h
+++ b/xfa/fxfa/parser/xfa_resolvenode_rs.h
@@ -28,12 +28,6 @@
#define XFA_RESOLVENODE_Bind 0x0800
#define XFA_RESOLVENODE_BindNew 0x1000
-enum XFA_SCRIPTLANGTYPE {
- XFA_SCRIPTLANGTYPE_Formcalc = XFA_SCRIPTTYPE_Formcalc,
- XFA_SCRIPTLANGTYPE_Javascript = XFA_SCRIPTTYPE_Javascript,
- XFA_SCRIPTLANGTYPE_Unkown = XFA_SCRIPTTYPE_Unkown,
-};
-
enum XFA_RESOLVENODE_RSTYPE {
XFA_RESOLVENODE_RSTYPE_Nodes,
XFA_RESOLVENODE_RSTYPE_Attribute,