summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cscript_layoutpseudomodel.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_box.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_box.h14
-rw-r--r--xfa/fxfa/parser/cxfa_caption.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_caption.h2
-rw-r--r--xfa/fxfa/parser/cxfa_data.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_data.h4
-rw-r--r--xfa/fxfa/parser/cxfa_font.cpp14
-rw-r--r--xfa/fxfa/parser/cxfa_font.h10
-rw-r--r--xfa/fxfa/parser/cxfa_layoutpagemgr.cpp16
-rw-r--r--xfa/fxfa/parser/cxfa_layoutpagemgr.h4
-rw-r--r--xfa/fxfa/parser/cxfa_layoutprocessor.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_margin.cpp8
-rw-r--r--xfa/fxfa/parser/cxfa_margin.h8
-rw-r--r--xfa/fxfa/parser/cxfa_measurement.cpp8
-rw-r--r--xfa/fxfa/parser/cxfa_measurement.h14
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_para.cpp12
-rw-r--r--xfa/fxfa/parser/cxfa_para.h12
-rw-r--r--xfa/fxfa/parser/cxfa_stroke.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_stroke.h4
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp34
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.h16
-rw-r--r--xfa/fxfa/parser/xfa_layout_itemlayout.cpp203
-rw-r--r--xfa/fxfa/parser/xfa_layout_itemlayout.h48
-rw-r--r--xfa/fxfa/parser/xfa_localevalue.cpp10
-rw-r--r--xfa/fxfa/parser/xfa_localevalue.h4
-rw-r--r--xfa/fxfa/parser/xfa_utils.cpp2
28 files changed, 238 insertions, 239 deletions
diff --git a/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp b/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp
index aa3117a734..9ffad911b2 100644
--- a/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp
+++ b/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp
@@ -122,7 +122,7 @@ void CScript_LayoutPseudoModel::HWXY(CFXJSE_Arguments* pArguments,
break;
}
XFA_UNIT unit = measure.GetUnit(wsUnit.AsStringC());
- FX_FLOAT fValue = measure.ToUnit(unit);
+ float fValue = measure.ToUnit(unit);
fValue = FXSYS_round(fValue * 1000) / 1000.0f;
if (pValue)
pValue->SetFloat(fValue);
diff --git a/xfa/fxfa/parser/cxfa_box.cpp b/xfa/fxfa/parser/cxfa_box.cpp
index 552c98031a..a6cced5426 100644
--- a/xfa/fxfa/parser/cxfa_box.cpp
+++ b/xfa/fxfa/parser/cxfa_box.cpp
@@ -109,7 +109,7 @@ bool CXFA_Box::IsCircular() const {
return m_pNode->GetBoolean(XFA_ATTRIBUTE_Circular);
}
-bool CXFA_Box::GetStartAngle(FX_FLOAT& fStartAngle) const {
+bool CXFA_Box::GetStartAngle(float& fStartAngle) const {
fStartAngle = 0;
if (!m_pNode)
return false;
@@ -122,7 +122,7 @@ bool CXFA_Box::GetStartAngle(FX_FLOAT& fStartAngle) const {
return bRet;
}
-bool CXFA_Box::GetSweepAngle(FX_FLOAT& fSweepAngle) const {
+bool CXFA_Box::GetSweepAngle(float& fSweepAngle) const {
fSweepAngle = 360;
if (!m_pNode)
return false;
@@ -148,7 +148,7 @@ CXFA_Margin CXFA_Box::GetMargin() const {
: nullptr);
}
-int32_t CXFA_Box::Get3DStyle(bool& bVisible, FX_FLOAT& fThickness) const {
+int32_t CXFA_Box::Get3DStyle(bool& bVisible, float& fThickness) const {
if (IsArc())
return 0;
diff --git a/xfa/fxfa/parser/cxfa_box.h b/xfa/fxfa/parser/cxfa_box.h
index a0af2f449b..d2b79fae56 100644
--- a/xfa/fxfa/parser/cxfa_box.h
+++ b/xfa/fxfa/parser/cxfa_box.h
@@ -32,23 +32,23 @@ class CXFA_Box : public CXFA_Data {
CXFA_Edge GetEdge(int32_t nIndex = 0) const;
void GetStrokes(std::vector<CXFA_Stroke>* strokes) const;
bool IsCircular() const;
- bool GetStartAngle(FX_FLOAT& fStartAngle) const;
- FX_FLOAT GetStartAngle() const {
- FX_FLOAT fStartAngle;
+ bool GetStartAngle(float& fStartAngle) const;
+ float GetStartAngle() const {
+ float fStartAngle;
GetStartAngle(fStartAngle);
return fStartAngle;
}
- bool GetSweepAngle(FX_FLOAT& fSweepAngle) const;
- FX_FLOAT GetSweepAngle() const {
- FX_FLOAT fSweepAngle;
+ bool GetSweepAngle(float& fSweepAngle) const;
+ float GetSweepAngle() const {
+ float fSweepAngle;
GetSweepAngle(fSweepAngle);
return fSweepAngle;
}
CXFA_Fill GetFill(bool bModified = false) const;
CXFA_Margin GetMargin() const;
- int32_t Get3DStyle(bool& bVisible, FX_FLOAT& fThickness) const;
+ int32_t Get3DStyle(bool& bVisible, float& fThickness) const;
};
#endif // XFA_FXFA_PARSER_CXFA_BOX_H_
diff --git a/xfa/fxfa/parser/cxfa_caption.cpp b/xfa/fxfa/parser/cxfa_caption.cpp
index 7f9e88e8e7..5b9365ab16 100644
--- a/xfa/fxfa/parser/cxfa_caption.cpp
+++ b/xfa/fxfa/parser/cxfa_caption.cpp
@@ -23,7 +23,7 @@ int32_t CXFA_Caption::GetPlacementType() {
return eAttr;
}
-FX_FLOAT CXFA_Caption::GetReserve() {
+float CXFA_Caption::GetReserve() {
CXFA_Measurement ms;
m_pNode->TryMeasure(XFA_ATTRIBUTE_Reserve, ms);
return ms.ToUnit(XFA_UNIT_Pt);
diff --git a/xfa/fxfa/parser/cxfa_caption.h b/xfa/fxfa/parser/cxfa_caption.h
index 70dd435653..74650ef9a2 100644
--- a/xfa/fxfa/parser/cxfa_caption.h
+++ b/xfa/fxfa/parser/cxfa_caption.h
@@ -20,7 +20,7 @@ class CXFA_Caption : public CXFA_Data {
int32_t GetPresence();
int32_t GetPlacementType();
- FX_FLOAT GetReserve();
+ float GetReserve();
CXFA_Margin GetMargin();
CXFA_Font GetFont();
CXFA_Value GetValue();
diff --git a/xfa/fxfa/parser/cxfa_data.cpp b/xfa/fxfa/parser/cxfa_data.cpp
index 3544a1de4c..456cc7f223 100644
--- a/xfa/fxfa/parser/cxfa_data.cpp
+++ b/xfa/fxfa/parser/cxfa_data.cpp
@@ -66,7 +66,7 @@ XFA_Element CXFA_Data::GetElementType() const {
}
bool CXFA_Data::TryMeasure(XFA_ATTRIBUTE eAttr,
- FX_FLOAT& fValue,
+ float& fValue,
bool bUseDefault) const {
CXFA_Measurement ms;
if (m_pNode->TryMeasure(eAttr, ms, bUseDefault)) {
@@ -76,7 +76,7 @@ bool CXFA_Data::TryMeasure(XFA_ATTRIBUTE eAttr,
return false;
}
-bool CXFA_Data::SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue) {
+bool CXFA_Data::SetMeasure(XFA_ATTRIBUTE eAttr, float fValue) {
CXFA_Measurement ms(fValue, XFA_UNIT_Pt);
return m_pNode->SetMeasure(eAttr, ms);
}
diff --git a/xfa/fxfa/parser/cxfa_data.h b/xfa/fxfa/parser/cxfa_data.h
index 890486d5fa..4801f08dc5 100644
--- a/xfa/fxfa/parser/cxfa_data.h
+++ b/xfa/fxfa/parser/cxfa_data.h
@@ -25,9 +25,9 @@ class CXFA_Data {
protected:
bool TryMeasure(XFA_ATTRIBUTE eAttr,
- FX_FLOAT& fValue,
+ float& fValue,
bool bUseDefault = false) const;
- bool SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue);
+ bool SetMeasure(XFA_ATTRIBUTE eAttr, float fValue);
CXFA_Node* m_pNode;
};
diff --git a/xfa/fxfa/parser/cxfa_font.cpp b/xfa/fxfa/parser/cxfa_font.cpp
index cedfda6294..f310f76bc6 100644
--- a/xfa/fxfa/parser/cxfa_font.cpp
+++ b/xfa/fxfa/parser/cxfa_font.cpp
@@ -13,25 +13,25 @@
CXFA_Font::CXFA_Font(CXFA_Node* pNode) : CXFA_Data(pNode) {}
-FX_FLOAT CXFA_Font::GetBaselineShift() {
+float CXFA_Font::GetBaselineShift() {
return m_pNode->GetMeasure(XFA_ATTRIBUTE_BaselineShift).ToUnit(XFA_UNIT_Pt);
}
-FX_FLOAT CXFA_Font::GetHorizontalScale() {
+float CXFA_Font::GetHorizontalScale() {
CFX_WideString wsValue;
m_pNode->TryCData(XFA_ATTRIBUTE_FontHorizontalScale, wsValue);
int32_t iScale = FXSYS_wtoi(wsValue.c_str());
- return iScale > 0 ? (FX_FLOAT)iScale : 100.0f;
+ return iScale > 0 ? (float)iScale : 100.0f;
}
-FX_FLOAT CXFA_Font::GetVerticalScale() {
+float CXFA_Font::GetVerticalScale() {
CFX_WideString wsValue;
m_pNode->TryCData(XFA_ATTRIBUTE_FontVerticalScale, wsValue);
int32_t iScale = FXSYS_wtoi(wsValue.c_str());
- return iScale > 0 ? (FX_FLOAT)iScale : 100.0f;
+ return iScale > 0 ? (float)iScale : 100.0f;
}
-FX_FLOAT CXFA_Font::GetLetterSpacing() {
+float CXFA_Font::GetLetterSpacing() {
CFX_WideStringC wsValue;
if (!m_pNode->TryCData(XFA_ATTRIBUTE_LetterSpacing, wsValue))
return 0;
@@ -60,7 +60,7 @@ int32_t CXFA_Font::GetUnderlinePeriod() {
return eAttr;
}
-FX_FLOAT CXFA_Font::GetFontSize() {
+float CXFA_Font::GetFontSize() {
CXFA_Measurement ms;
m_pNode->TryMeasure(XFA_ATTRIBUTE_Size, ms);
return ms.ToUnit(XFA_UNIT_Pt);
diff --git a/xfa/fxfa/parser/cxfa_font.h b/xfa/fxfa/parser/cxfa_font.h
index 0342f68b27..2a5fef1122 100644
--- a/xfa/fxfa/parser/cxfa_font.h
+++ b/xfa/fxfa/parser/cxfa_font.h
@@ -16,14 +16,14 @@ class CXFA_Font : public CXFA_Data {
public:
explicit CXFA_Font(CXFA_Node* pNode);
- FX_FLOAT GetBaselineShift();
- FX_FLOAT GetHorizontalScale();
- FX_FLOAT GetVerticalScale();
- FX_FLOAT GetLetterSpacing();
+ float GetBaselineShift();
+ float GetHorizontalScale();
+ float GetVerticalScale();
+ float GetLetterSpacing();
int32_t GetLineThrough();
int32_t GetUnderline();
int32_t GetUnderlinePeriod();
- FX_FLOAT GetFontSize();
+ float GetFontSize();
void GetTypeface(CFX_WideStringC& wsTypeFace);
bool IsBold();
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
index f38ef0ebfd..c8f4b65a16 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
@@ -454,13 +454,13 @@ void CXFA_LayoutPageMgr::SubmitContentItem(
}
}
-FX_FLOAT CXFA_LayoutPageMgr::GetAvailHeight() {
+float CXFA_LayoutPageMgr::GetAvailHeight() {
CXFA_ContainerLayoutItem* pLayoutItem =
GetCurrentContainerRecord()->pCurContentArea;
if (!pLayoutItem || !pLayoutItem->m_pFormNode)
return 0.0f;
- FX_FLOAT fAvailHeight =
+ float fAvailHeight =
pLayoutItem->m_pFormNode->GetMeasure(XFA_ATTRIBUTE_H).ToUnit(XFA_UNIT_Pt);
if (fAvailHeight >= XFA_LAYOUT_FLOAT_PERCISION)
return fAvailHeight;
@@ -647,7 +647,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() {
}
}
bool bUsable = true;
- CFX_ArrayTemplate<FX_FLOAT> rgUsedHeights;
+ CFX_ArrayTemplate<float> rgUsedHeights;
for (CXFA_LayoutItem* pChildLayoutItem =
pLastPageAreaLayoutItem->m_pFirstChild;
pChildLayoutItem;
@@ -656,7 +656,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() {
XFA_Element::ContentArea) {
continue;
}
- FX_FLOAT fUsedHeight = 0;
+ float fUsedHeight = 0;
for (CXFA_LayoutItem* pContentChildLayoutItem =
pChildLayoutItem->m_pFirstChild;
pContentChildLayoutItem;
@@ -1511,7 +1511,7 @@ void CXFA_LayoutPageMgr::ProcessLastPageSet() {
}
}
-bool CXFA_LayoutPageMgr::GetNextAvailContentHeight(FX_FLOAT fChildHeight) {
+bool CXFA_LayoutPageMgr::GetNextAvailContentHeight(float fChildHeight) {
CXFA_Node* pCurContentNode =
GetCurrentContainerRecord()->pCurContentArea->m_pFormNode;
if (!pCurContentNode)
@@ -1520,7 +1520,7 @@ bool CXFA_LayoutPageMgr::GetNextAvailContentHeight(FX_FLOAT fChildHeight) {
pCurContentNode =
pCurContentNode->GetNextSameClassSibling(XFA_Element::ContentArea);
if (pCurContentNode) {
- FX_FLOAT fNextContentHeight =
+ float fNextContentHeight =
pCurContentNode->GetMeasure(XFA_ATTRIBUTE_H).ToUnit(XFA_UNIT_Pt);
return fNextContentHeight > fChildHeight;
}
@@ -1549,7 +1549,7 @@ bool CXFA_LayoutPageMgr::GetNextAvailContentHeight(FX_FLOAT fChildHeight) {
CXFA_Node* pContentArea =
pNextPage->GetFirstChildByClass(XFA_Element::ContentArea);
if (pContentArea) {
- FX_FLOAT fNextContentHeight =
+ float fNextContentHeight =
pContentArea->GetMeasure(XFA_ATTRIBUTE_H).ToUnit(XFA_UNIT_Pt);
if (fNextContentHeight > fChildHeight)
return true;
@@ -1561,7 +1561,7 @@ bool CXFA_LayoutPageMgr::GetNextAvailContentHeight(FX_FLOAT fChildHeight) {
CXFA_Node* pContentArea =
pPageNode->GetFirstChildByClass(XFA_Element::ContentArea);
- FX_FLOAT fNextContentHeight =
+ float fNextContentHeight =
pContentArea->GetMeasure(XFA_ATTRIBUTE_H).ToUnit(XFA_UNIT_Pt);
if (fNextContentHeight < XFA_LAYOUT_FLOAT_PERCISION)
return true;
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.h b/xfa/fxfa/parser/cxfa_layoutpagemgr.h
index 3c8e7f9d1e..be90b4674f 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.h
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.h
@@ -23,8 +23,8 @@ class CXFA_LayoutPageMgr {
bool InitLayoutPage(CXFA_Node* pFormNode);
bool PrepareFirstPage(CXFA_Node* pRootSubform);
- FX_FLOAT GetAvailHeight();
- bool GetNextAvailContentHeight(FX_FLOAT fChildHeight);
+ float GetAvailHeight();
+ bool GetNextAvailContentHeight(float fChildHeight);
void SubmitContentItem(CXFA_ContentLayoutItem* pContentLayoutItem,
XFA_ItemLayoutProcessorResult eStatus);
void FinishPaginatedPageSets();
diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.cpp b/xfa/fxfa/parser/cxfa_layoutprocessor.cpp
index e179d38985..a41b546aa8 100644
--- a/xfa/fxfa/parser/cxfa_layoutprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutprocessor.cpp
@@ -64,10 +64,10 @@ int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) {
XFA_ItemLayoutProcessorResult eStatus;
CXFA_Node* pFormNode = m_pRootItemLayoutProcessor->GetFormNode();
- FX_FLOAT fPosX = pFormNode->GetMeasure(XFA_ATTRIBUTE_X).ToUnit(XFA_UNIT_Pt);
- FX_FLOAT fPosY = pFormNode->GetMeasure(XFA_ATTRIBUTE_Y).ToUnit(XFA_UNIT_Pt);
+ float fPosX = pFormNode->GetMeasure(XFA_ATTRIBUTE_X).ToUnit(XFA_UNIT_Pt);
+ float fPosY = pFormNode->GetMeasure(XFA_ATTRIBUTE_Y).ToUnit(XFA_UNIT_Pt);
do {
- FX_FLOAT fAvailHeight = m_pLayoutPageMgr->GetAvailHeight();
+ float fAvailHeight = m_pLayoutPageMgr->GetAvailHeight();
eStatus = m_pRootItemLayoutProcessor->DoLayout(true, fAvailHeight,
fAvailHeight, nullptr);
if (eStatus != XFA_ItemLayoutProcessorResult::Done)
diff --git a/xfa/fxfa/parser/cxfa_margin.cpp b/xfa/fxfa/parser/cxfa_margin.cpp
index 38f9626a88..fc4a0f1a63 100644
--- a/xfa/fxfa/parser/cxfa_margin.cpp
+++ b/xfa/fxfa/parser/cxfa_margin.cpp
@@ -10,22 +10,22 @@
CXFA_Margin::CXFA_Margin(CXFA_Node* pNode) : CXFA_Data(pNode) {}
-bool CXFA_Margin::GetLeftInset(FX_FLOAT& fInset, FX_FLOAT fDefInset) const {
+bool CXFA_Margin::GetLeftInset(float& fInset, float fDefInset) const {
fInset = fDefInset;
return TryMeasure(XFA_ATTRIBUTE_LeftInset, fInset);
}
-bool CXFA_Margin::GetTopInset(FX_FLOAT& fInset, FX_FLOAT fDefInset) const {
+bool CXFA_Margin::GetTopInset(float& fInset, float fDefInset) const {
fInset = fDefInset;
return TryMeasure(XFA_ATTRIBUTE_TopInset, fInset);
}
-bool CXFA_Margin::GetRightInset(FX_FLOAT& fInset, FX_FLOAT fDefInset) const {
+bool CXFA_Margin::GetRightInset(float& fInset, float fDefInset) const {
fInset = fDefInset;
return TryMeasure(XFA_ATTRIBUTE_RightInset, fInset);
}
-bool CXFA_Margin::GetBottomInset(FX_FLOAT& fInset, FX_FLOAT fDefInset) const {
+bool CXFA_Margin::GetBottomInset(float& fInset, float fDefInset) const {
fInset = fDefInset;
return TryMeasure(XFA_ATTRIBUTE_BottomInset, fInset);
}
diff --git a/xfa/fxfa/parser/cxfa_margin.h b/xfa/fxfa/parser/cxfa_margin.h
index d1c1955194..89fc4ce38a 100644
--- a/xfa/fxfa/parser/cxfa_margin.h
+++ b/xfa/fxfa/parser/cxfa_margin.h
@@ -16,10 +16,10 @@ class CXFA_Margin : public CXFA_Data {
public:
explicit CXFA_Margin(CXFA_Node* pNode);
- bool GetLeftInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const;
- bool GetTopInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const;
- bool GetRightInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const;
- bool GetBottomInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const;
+ bool GetLeftInset(float& fInset, float fDefInset = 0) const;
+ bool GetTopInset(float& fInset, float fDefInset = 0) const;
+ bool GetRightInset(float& fInset, float fDefInset = 0) const;
+ bool GetBottomInset(float& fInset, float fDefInset = 0) const;
};
#endif // XFA_FXFA_PARSER_CXFA_MARGIN_H_
diff --git a/xfa/fxfa/parser/cxfa_measurement.cpp b/xfa/fxfa/parser/cxfa_measurement.cpp
index ebf7b7bff7..fd00c42d34 100644
--- a/xfa/fxfa/parser/cxfa_measurement.cpp
+++ b/xfa/fxfa/parser/cxfa_measurement.cpp
@@ -16,7 +16,7 @@ CXFA_Measurement::CXFA_Measurement() {
Set(-1, XFA_UNIT_Unknown);
}
-CXFA_Measurement::CXFA_Measurement(FX_FLOAT fValue, XFA_UNIT eUnit) {
+CXFA_Measurement::CXFA_Measurement(float fValue, XFA_UNIT eUnit) {
Set(fValue, eUnit);
}
@@ -28,8 +28,8 @@ void CXFA_Measurement::Set(const CFX_WideStringC& wsMeasure) {
}
int32_t iUsedLen = 0;
int32_t iOffset = (wsMeasure.GetAt(0) == L'=') ? 1 : 0;
- FX_FLOAT fValue = FXSYS_wcstof(wsMeasure.c_str() + iOffset,
- wsMeasure.GetLength() - iOffset, &iUsedLen);
+ float fValue = FXSYS_wcstof(wsMeasure.c_str() + iOffset,
+ wsMeasure.GetLength() - iOffset, &iUsedLen);
XFA_UNIT eUnit = GetUnit(wsMeasure.Mid(iOffset + iUsedLen));
Set(fValue, eUnit);
}
@@ -66,7 +66,7 @@ bool CXFA_Measurement::ToString(CFX_WideString& wsMeasure) const {
}
}
-bool CXFA_Measurement::ToUnit(XFA_UNIT eUnit, FX_FLOAT& fValue) const {
+bool CXFA_Measurement::ToUnit(XFA_UNIT eUnit, float& fValue) const {
fValue = GetValue();
XFA_UNIT eFrom = GetUnit();
if (eFrom == eUnit)
diff --git a/xfa/fxfa/parser/cxfa_measurement.h b/xfa/fxfa/parser/cxfa_measurement.h
index 40f71a7fab..34cf780f81 100644
--- a/xfa/fxfa/parser/cxfa_measurement.h
+++ b/xfa/fxfa/parser/cxfa_measurement.h
@@ -15,27 +15,27 @@ class CXFA_Measurement {
public:
explicit CXFA_Measurement(const CFX_WideStringC& wsMeasure);
CXFA_Measurement();
- CXFA_Measurement(FX_FLOAT fValue, XFA_UNIT eUnit);
+ CXFA_Measurement(float fValue, XFA_UNIT eUnit);
void Set(const CFX_WideStringC& wsMeasure);
- void Set(FX_FLOAT fValue, XFA_UNIT eUnit) {
+ void Set(float fValue, XFA_UNIT eUnit) {
m_fValue = fValue;
m_eUnit = eUnit;
}
XFA_UNIT GetUnit(const CFX_WideStringC& wsUnit);
XFA_UNIT GetUnit() const { return m_eUnit; }
- FX_FLOAT GetValue() const { return m_fValue; }
+ float GetValue() const { return m_fValue; }
bool ToString(CFX_WideString& wsMeasure) const;
- bool ToUnit(XFA_UNIT eUnit, FX_FLOAT& fValue) const;
- FX_FLOAT ToUnit(XFA_UNIT eUnit) const {
- FX_FLOAT f;
+ bool ToUnit(XFA_UNIT eUnit, float& fValue) const;
+ float ToUnit(XFA_UNIT eUnit) const {
+ float f;
return ToUnit(eUnit, f) ? f : 0;
}
private:
- FX_FLOAT m_fValue;
+ float m_fValue;
XFA_UNIT m_eUnit;
};
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 086c0e929d..8d618e9719 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -2034,7 +2034,7 @@ void CXFA_Node::Script_Som_DefaultValue(CFXJSE_Value* pValue,
pValue->SetInteger(FXSYS_wtoi(content.c_str()));
} else if (eType == XFA_Element::Float || eType == XFA_Element::Decimal) {
CFX_Decimal decimal(content.AsStringC());
- pValue->SetFloat((FX_FLOAT)(double)decimal);
+ pValue->SetFloat((float)(double)decimal);
} else {
pValue->SetString(content.UTF8Encode().AsStringC());
}
@@ -2255,7 +2255,7 @@ void CXFA_Node::Script_Field_DefaultValue(CFXJSE_Value* pValue,
pValue->SetString(content.UTF8Encode().AsStringC());
} else {
CFX_Decimal decimal(content.AsStringC());
- pValue->SetFloat((FX_FLOAT)(double)decimal);
+ pValue->SetFloat((float)(double)decimal);
}
} else if (pNode && pNode->GetElementType() == XFA_Element::Integer) {
pValue->SetInteger(FXSYS_wtoi(content.c_str()));
@@ -2263,7 +2263,7 @@ void CXFA_Node::Script_Field_DefaultValue(CFXJSE_Value* pValue,
pValue->SetBoolean(FXSYS_wtoi(content.c_str()) == 0 ? false : true);
} else if (pNode && pNode->GetElementType() == XFA_Element::Float) {
CFX_Decimal decimal(content.AsStringC());
- pValue->SetFloat((FX_FLOAT)(double)decimal);
+ pValue->SetFloat((float)(double)decimal);
} else {
pValue->SetString(content.UTF8Encode().AsStringC());
}
diff --git a/xfa/fxfa/parser/cxfa_para.cpp b/xfa/fxfa/parser/cxfa_para.cpp
index bd3a1bb8ff..3fe4b68f05 100644
--- a/xfa/fxfa/parser/cxfa_para.cpp
+++ b/xfa/fxfa/parser/cxfa_para.cpp
@@ -23,37 +23,37 @@ int32_t CXFA_Para::GetVerticalAlign() {
return eAttr;
}
-FX_FLOAT CXFA_Para::GetLineHeight() {
+float CXFA_Para::GetLineHeight() {
CXFA_Measurement ms;
m_pNode->TryMeasure(XFA_ATTRIBUTE_LineHeight, ms);
return ms.ToUnit(XFA_UNIT_Pt);
}
-FX_FLOAT CXFA_Para::GetMarginLeft() {
+float CXFA_Para::GetMarginLeft() {
CXFA_Measurement ms;
m_pNode->TryMeasure(XFA_ATTRIBUTE_MarginLeft, ms);
return ms.ToUnit(XFA_UNIT_Pt);
}
-FX_FLOAT CXFA_Para::GetMarginRight() {
+float CXFA_Para::GetMarginRight() {
CXFA_Measurement ms;
m_pNode->TryMeasure(XFA_ATTRIBUTE_MarginRight, ms);
return ms.ToUnit(XFA_UNIT_Pt);
}
-FX_FLOAT CXFA_Para::GetSpaceAbove() {
+float CXFA_Para::GetSpaceAbove() {
CXFA_Measurement ms;
m_pNode->TryMeasure(XFA_ATTRIBUTE_SpaceAbove, ms);
return ms.ToUnit(XFA_UNIT_Pt);
}
-FX_FLOAT CXFA_Para::GetSpaceBelow() {
+float CXFA_Para::GetSpaceBelow() {
CXFA_Measurement ms;
m_pNode->TryMeasure(XFA_ATTRIBUTE_SpaceBelow, ms);
return ms.ToUnit(XFA_UNIT_Pt);
}
-FX_FLOAT CXFA_Para::GetTextIndent() {
+float CXFA_Para::GetTextIndent() {
CXFA_Measurement ms;
m_pNode->TryMeasure(XFA_ATTRIBUTE_TextIndent, ms);
return ms.ToUnit(XFA_UNIT_Pt);
diff --git a/xfa/fxfa/parser/cxfa_para.h b/xfa/fxfa/parser/cxfa_para.h
index e12d48f9fa..c2d67b8a19 100644
--- a/xfa/fxfa/parser/cxfa_para.h
+++ b/xfa/fxfa/parser/cxfa_para.h
@@ -18,12 +18,12 @@ class CXFA_Para : public CXFA_Data {
int32_t GetHorizontalAlign();
int32_t GetVerticalAlign();
- FX_FLOAT GetLineHeight();
- FX_FLOAT GetMarginLeft();
- FX_FLOAT GetMarginRight();
- FX_FLOAT GetSpaceAbove();
- FX_FLOAT GetSpaceBelow();
- FX_FLOAT GetTextIndent();
+ float GetLineHeight();
+ float GetMarginLeft();
+ float GetMarginRight();
+ float GetSpaceAbove();
+ float GetSpaceBelow();
+ float GetTextIndent();
};
#endif // XFA_FXFA_PARSER_CXFA_PARA_H_
diff --git a/xfa/fxfa/parser/cxfa_stroke.cpp b/xfa/fxfa/parser/cxfa_stroke.cpp
index 602f2f9f1f..2faad24a97 100644
--- a/xfa/fxfa/parser/cxfa_stroke.cpp
+++ b/xfa/fxfa/parser/cxfa_stroke.cpp
@@ -25,7 +25,7 @@ int32_t CXFA_Stroke::GetStrokeType() const {
: XFA_ATTRIBUTEENUM_Solid;
}
-FX_FLOAT CXFA_Stroke::GetThickness() const {
+float CXFA_Stroke::GetThickness() const {
return GetMSThickness().ToUnit(XFA_UNIT_Pt);
}
@@ -80,7 +80,7 @@ bool CXFA_Stroke::IsInverted() const {
return m_pNode ? m_pNode->GetBoolean(XFA_ATTRIBUTE_Inverted) : false;
}
-FX_FLOAT CXFA_Stroke::GetRadius() const {
+float CXFA_Stroke::GetRadius() const {
return m_pNode ? m_pNode->GetMeasure(XFA_ATTRIBUTE_Radius).ToUnit(XFA_UNIT_Pt)
: 0;
}
diff --git a/xfa/fxfa/parser/cxfa_stroke.h b/xfa/fxfa/parser/cxfa_stroke.h
index cf941c8f0f..63709b9160 100644
--- a/xfa/fxfa/parser/cxfa_stroke.h
+++ b/xfa/fxfa/parser/cxfa_stroke.h
@@ -30,14 +30,14 @@ class CXFA_Stroke : public CXFA_Data {
int32_t GetPresence() const;
int32_t GetCapType() const;
int32_t GetStrokeType() const;
- FX_FLOAT GetThickness() const;
+ float GetThickness() const;
CXFA_Measurement GetMSThickness() const;
void SetMSThickness(CXFA_Measurement msThinkness);
FX_ARGB GetColor() const;
void SetColor(FX_ARGB argb);
int32_t GetJoinType() const;
bool IsInverted() const;
- FX_FLOAT GetRadius() const;
+ float GetRadius() const;
bool SameStyles(CXFA_Stroke stroke, uint32_t dwFlags = 0) const;
};
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index ca0303d00c..cbdb7cfed4 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -18,10 +18,10 @@
namespace {
-FX_FLOAT GetEdgeThickness(const std::vector<CXFA_Stroke>& strokes,
- bool b3DStyle,
- int32_t nIndex) {
- FX_FLOAT fThickness = 0;
+float GetEdgeThickness(const std::vector<CXFA_Stroke>& strokes,
+ bool b3DStyle,
+ int32_t nIndex) {
+ float fThickness = 0;
if (strokes[nIndex * 2 + 1].GetPresence() == XFA_ATTRIBUTEENUM_Visible) {
if (nIndex == 0)
@@ -375,27 +375,27 @@ CXFA_Assist CXFA_WidgetData::GetAssist(bool bModified) {
return CXFA_Assist(m_pNode->GetProperty(0, XFA_Element::Assist, bModified));
}
-bool CXFA_WidgetData::GetWidth(FX_FLOAT& fWidth) {
+bool CXFA_WidgetData::GetWidth(float& fWidth) {
return TryMeasure(XFA_ATTRIBUTE_W, fWidth);
}
-bool CXFA_WidgetData::GetHeight(FX_FLOAT& fHeight) {
+bool CXFA_WidgetData::GetHeight(float& fHeight) {
return TryMeasure(XFA_ATTRIBUTE_H, fHeight);
}
-bool CXFA_WidgetData::GetMinWidth(FX_FLOAT& fMinWidth) {
+bool CXFA_WidgetData::GetMinWidth(float& fMinWidth) {
return TryMeasure(XFA_ATTRIBUTE_MinW, fMinWidth);
}
-bool CXFA_WidgetData::GetMinHeight(FX_FLOAT& fMinHeight) {
+bool CXFA_WidgetData::GetMinHeight(float& fMinHeight) {
return TryMeasure(XFA_ATTRIBUTE_MinH, fMinHeight);
}
-bool CXFA_WidgetData::GetMaxWidth(FX_FLOAT& fMaxWidth) {
+bool CXFA_WidgetData::GetMaxWidth(float& fMaxWidth) {
return TryMeasure(XFA_ATTRIBUTE_MaxW, fMaxWidth);
}
-bool CXFA_WidgetData::GetMaxHeight(FX_FLOAT& fMaxHeight) {
+bool CXFA_WidgetData::GetMaxHeight(float& fMaxHeight) {
return TryMeasure(XFA_ATTRIBUTE_MaxH, fMaxHeight);
}
@@ -419,14 +419,14 @@ CFX_RectF CXFA_WidgetData::GetUIMargin() {
if (border && border.GetPresence() != XFA_ATTRIBUTEENUM_Visible)
return CFX_RectF();
- FX_FLOAT fLeftInset, fTopInset, fRightInset, fBottomInset;
+ float fLeftInset, fTopInset, fRightInset, fBottomInset;
bool bLeft = mgUI.GetLeftInset(fLeftInset);
bool bTop = mgUI.GetTopInset(fTopInset);
bool bRight = mgUI.GetRightInset(fRightInset);
bool bBottom = mgUI.GetBottomInset(fBottomInset);
if (border) {
bool bVisible = false;
- FX_FLOAT fThickness = 0;
+ float fThickness = 0;
border.Get3DStyle(bVisible, fThickness);
if (!bLeft || !bTop || !bRight || !bBottom) {
std::vector<CXFA_Stroke> strokes;
@@ -509,7 +509,7 @@ bool CXFA_WidgetData::IsRadioButton() {
return false;
}
-FX_FLOAT CXFA_WidgetData::GetCheckButtonSize() {
+float CXFA_WidgetData::GetCheckButtonSize() {
CXFA_Node* pUIChild = GetUIChild();
if (pUIChild)
return pUIChild->GetMeasure(XFA_ATTRIBUTE_Size).ToUnit(XFA_UNIT_Pt);
@@ -1393,20 +1393,20 @@ bool CXFA_WidgetData::GetBarcodeAttribute_Truncate(bool& val) {
return false;
}
-bool CXFA_WidgetData::GetBarcodeAttribute_WideNarrowRatio(FX_FLOAT& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_WideNarrowRatio(float& val) {
CXFA_Node* pUIChild = GetUIChild();
CFX_WideString wsWideNarrowRatio;
if (pUIChild->TryCData(XFA_ATTRIBUTE_WideNarrowRatio, wsWideNarrowRatio)) {
FX_STRSIZE ptPos = wsWideNarrowRatio.Find(':');
- FX_FLOAT fRatio = 0;
+ float fRatio = 0;
if (ptPos >= 0) {
- fRatio = (FX_FLOAT)FXSYS_wtoi(wsWideNarrowRatio.c_str());
+ fRatio = (float)FXSYS_wtoi(wsWideNarrowRatio.c_str());
} else {
int32_t fA, fB;
fA = FXSYS_wtoi(wsWideNarrowRatio.Left(ptPos).c_str());
fB = FXSYS_wtoi(wsWideNarrowRatio.Mid(ptPos + 1).c_str());
if (fB)
- fRatio = (FX_FLOAT)fA / fB;
+ fRatio = (float)fA / fB;
}
val = fRatio;
return true;
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h
index 3eca270320..1de04df088 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.h
+++ b/xfa/fxfa/parser/cxfa_widgetdata.h
@@ -63,12 +63,12 @@ class CXFA_WidgetData : public CXFA_Data {
CXFA_Validate GetValidate(bool bModified = false);
CXFA_Bind GetBind(bool bModified = false);
CXFA_Assist GetAssist(bool bModified = false);
- bool GetWidth(FX_FLOAT& fWidth);
- bool GetHeight(FX_FLOAT& fHeight);
- bool GetMinWidth(FX_FLOAT& fMinWidth);
- bool GetMinHeight(FX_FLOAT& fMinHeight);
- bool GetMaxWidth(FX_FLOAT& fMaxWidth);
- bool GetMaxHeight(FX_FLOAT& fMaxHeight);
+ bool GetWidth(float& fWidth);
+ bool GetHeight(float& fHeight);
+ bool GetMinWidth(float& fMinWidth);
+ bool GetMinHeight(float& fMinHeight);
+ bool GetMaxWidth(float& fMaxWidth);
+ bool GetMaxHeight(float& fMaxHeight);
CXFA_Border GetUIBorder();
CFX_RectF GetUIMargin();
int32_t GetButtonHighlight();
@@ -76,7 +76,7 @@ class CXFA_WidgetData : public CXFA_Data {
bool GetButtonDown(CFX_WideString& wsDown, bool& bRichText);
int32_t GetCheckButtonShape();
int32_t GetCheckButtonMark();
- FX_FLOAT GetCheckButtonSize();
+ float GetCheckButtonSize();
bool IsAllowNeutral();
bool IsRadioButton();
XFA_CHECKSTATE GetCheckState();
@@ -148,7 +148,7 @@ class CXFA_WidgetData : public CXFA_Data {
bool GetBarcodeAttribute_PrintChecksum(bool& val);
bool GetBarcodeAttribute_TextLocation(int32_t& val);
bool GetBarcodeAttribute_Truncate(bool& val);
- bool GetBarcodeAttribute_WideNarrowRatio(FX_FLOAT& val);
+ bool GetBarcodeAttribute_WideNarrowRatio(float& val);
void GetPasswordChar(CFX_WideString& wsPassWord);
bool IsMultiLine();
int32_t GetVerticalScrollPolicy();
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
index 193ffdd497..01d2164432 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
@@ -50,8 +50,8 @@ std::vector<CFX_WideString> SeparateStringW(const wchar_t* pStr,
}
void UpdateWidgetSize(CXFA_ContentLayoutItem* pLayoutItem,
- FX_FLOAT* fWidth,
- FX_FLOAT* fHeight) {
+ float* fWidth,
+ float* fHeight) {
CXFA_Node* pNode = pLayoutItem->m_pFormNode;
switch (pNode->GetElementType()) {
case XFA_Element::Subform:
@@ -114,9 +114,9 @@ CFX_SizeF CalculateContainerSpecifiedSize(CXFA_Node* pFormNode,
CFX_SizeF CalculateContainerComponentSizeFromContentSize(
CXFA_Node* pFormNode,
bool bContainerWidthAutoSize,
- FX_FLOAT fContentCalculatedWidth,
+ float fContentCalculatedWidth,
bool bContainerHeightAutoSize,
- FX_FLOAT fContentCalculatedHeight,
+ float fContentCalculatedHeight,
const CFX_SizeF& currentContainerSize) {
CFX_SizeF componentSize = currentContainerSize;
CXFA_Node* pMarginNode = pFormNode->GetFirstChildByClass(XFA_Element::Margin);
@@ -147,7 +147,7 @@ CFX_SizeF CalculateContainerComponentSizeFromContentSize(
void RelocateTableRowCells(
CXFA_ContentLayoutItem* pLayoutRow,
- const CFX_ArrayTemplate<FX_FLOAT>& rgSpecifiedColumnWidths,
+ const CFX_ArrayTemplate<float>& rgSpecifiedColumnWidths,
XFA_ATTRIBUTEENUM eLayout) {
bool bContainerWidthAutoSize = true;
bool bContainerHeightAutoSize = true;
@@ -156,10 +156,10 @@ void RelocateTableRowCells(
&bContainerHeightAutoSize);
CXFA_Node* pMarginNode =
pLayoutRow->m_pFormNode->GetFirstChildByClass(XFA_Element::Margin);
- FX_FLOAT fLeftInset = 0;
- FX_FLOAT fTopInset = 0;
- FX_FLOAT fRightInset = 0;
- FX_FLOAT fBottomInset = 0;
+ float fLeftInset = 0;
+ float fTopInset = 0;
+ float fRightInset = 0;
+ float fBottomInset = 0;
if (pMarginNode) {
fLeftInset =
pMarginNode->GetMeasure(XFA_ATTRIBUTE_LeftInset).ToUnit(XFA_UNIT_Pt);
@@ -171,14 +171,14 @@ void RelocateTableRowCells(
pMarginNode->GetMeasure(XFA_ATTRIBUTE_BottomInset).ToUnit(XFA_UNIT_Pt);
}
- FX_FLOAT fContentWidthLimit =
+ float fContentWidthLimit =
bContainerWidthAutoSize ? FLT_MAX
: containerSize.width - fLeftInset - fRightInset;
- FX_FLOAT fContentCurrentHeight =
+ float fContentCurrentHeight =
pLayoutRow->m_sSize.height - fTopInset - fBottomInset;
- FX_FLOAT fContentCalculatedWidth = 0;
- FX_FLOAT fContentCalculatedHeight = 0;
- FX_FLOAT fCurrentColX = 0;
+ float fContentCalculatedWidth = 0;
+ float fContentCalculatedHeight = 0;
+ float fCurrentColX = 0;
int32_t nCurrentColIdx = 0;
bool bMetWholeRowCell = false;
@@ -189,7 +189,7 @@ void RelocateTableRowCells(
int32_t nOriginalColSpan =
pLayoutChild->m_pFormNode->GetInteger(XFA_ATTRIBUTE_ColSpan);
int32_t nColSpan = nOriginalColSpan;
- FX_FLOAT fColSpanWidth = 0;
+ float fColSpanWidth = 0;
if (nColSpan == -1 ||
nCurrentColIdx + nColSpan > rgSpecifiedColumnWidths.GetSize()) {
nColSpan = rgSpecifiedColumnWidths.GetSize() - nCurrentColIdx;
@@ -212,7 +212,7 @@ void RelocateTableRowCells(
fCurrentColX += fColSpanWidth;
nCurrentColIdx += nColSpan;
- FX_FLOAT fNewHeight = bContainerHeightAutoSize ? -1 : fContentCurrentHeight;
+ float fNewHeight = bContainerHeightAutoSize ? -1 : fContentCurrentHeight;
UpdateWidgetSize(pLayoutChild, &fColSpanWidth, &fNewHeight);
pLayoutChild->m_sSize.height = fNewHeight;
if (bContainerHeightAutoSize) {
@@ -228,12 +228,12 @@ void RelocateTableRowCells(
pLayoutChild = (CXFA_ContentLayoutItem*)pLayoutChild->m_pNextSibling) {
UpdateWidgetSize(pLayoutChild, &pLayoutChild->m_sSize.width,
&fContentCalculatedHeight);
- FX_FLOAT fOldChildHeight = pLayoutChild->m_sSize.height;
+ float fOldChildHeight = pLayoutChild->m_sSize.height;
pLayoutChild->m_sSize.height = fContentCalculatedHeight;
CXFA_Node* pParaNode =
pLayoutChild->m_pFormNode->GetFirstChildByClass(XFA_Element::Para);
if (pParaNode && pLayoutChild->m_pFirstChild) {
- FX_FLOAT fOffHeight = fContentCalculatedHeight - fOldChildHeight;
+ float fOffHeight = fContentCalculatedHeight - fOldChildHeight;
XFA_ATTRIBUTEENUM eVType = pParaNode->GetEnum(XFA_ATTRIBUTE_VAlign);
switch (eVType) {
case XFA_ATTRIBUTEENUM_Middle:
@@ -260,7 +260,7 @@ void RelocateTableRowCells(
}
if (bContainerWidthAutoSize) {
- FX_FLOAT fChildSuppliedWidth = fCurrentColX;
+ float fChildSuppliedWidth = fCurrentColX;
if (fContentWidthLimit < FLT_MAX &&
fContentWidthLimit > fChildSuppliedWidth) {
fChildSuppliedWidth = fContentWidthLimit;
@@ -303,15 +303,15 @@ void UpdatePendingItemLayout(CXFA_ItemLayoutProcessor* pProcessor,
}
void AddTrailerBeforeSplit(CXFA_ItemLayoutProcessor* pProcessor,
- FX_FLOAT fSplitPos,
+ float fSplitPos,
CXFA_ContentLayoutItem* pTrailerLayoutItem,
bool bUseInherited) {
if (!pTrailerLayoutItem)
return;
- FX_FLOAT fHeight = pTrailerLayoutItem->m_sSize.height;
+ float fHeight = pTrailerLayoutItem->m_sSize.height;
if (bUseInherited) {
- FX_FLOAT fNewSplitPos = 0;
+ float fNewSplitPos = 0;
if (fSplitPos - fHeight > XFA_LAYOUT_FLOAT_PERCISION)
fNewSplitPos = pProcessor->FindSplitPos(fSplitPos - fHeight);
if (fNewSplitPos > XFA_LAYOUT_FLOAT_PERCISION)
@@ -322,10 +322,10 @@ void AddTrailerBeforeSplit(CXFA_ItemLayoutProcessor* pProcessor,
UpdatePendingItemLayout(pProcessor, pTrailerLayoutItem);
CXFA_Node* pMarginNode =
pProcessor->m_pFormNode->GetFirstChildByClass(XFA_Element::Margin);
- FX_FLOAT fLeftInset = 0;
- FX_FLOAT fTopInset = 0;
- FX_FLOAT fRightInset = 0;
- FX_FLOAT fBottomInset = 0;
+ float fLeftInset = 0;
+ float fTopInset = 0;
+ float fRightInset = 0;
+ float fBottomInset = 0;
if (pMarginNode) {
fLeftInset =
pMarginNode->GetMeasure(XFA_ATTRIBUTE_LeftInset).ToUnit(XFA_UNIT_Pt);
@@ -346,7 +346,7 @@ void AddTrailerBeforeSplit(CXFA_ItemLayoutProcessor* pProcessor,
return;
}
- FX_FLOAT fNewSplitPos = 0;
+ float fNewSplitPos = 0;
if (fSplitPos - fHeight > XFA_LAYOUT_FLOAT_PERCISION)
fNewSplitPos = pProcessor->FindSplitPos(fSplitPos - fHeight);
@@ -384,8 +384,8 @@ void AddLeaderAfterSplit(CXFA_ItemLayoutProcessor* pProcessor,
CXFA_Node* pMarginNode =
pProcessor->m_pFormNode->GetFirstChildByClass(XFA_Element::Margin);
- FX_FLOAT fLeftInset = 0;
- FX_FLOAT fRightInset = 0;
+ float fLeftInset = 0;
+ float fRightInset = 0;
if (pMarginNode) {
fLeftInset =
pMarginNode->GetMeasure(XFA_ATTRIBUTE_LeftInset).ToUnit(XFA_UNIT_Pt);
@@ -393,7 +393,7 @@ void AddLeaderAfterSplit(CXFA_ItemLayoutProcessor* pProcessor,
pMarginNode->GetMeasure(XFA_ATTRIBUTE_RightInset).ToUnit(XFA_UNIT_Pt);
}
- FX_FLOAT fHeight = pLeaderLayoutItem->m_sSize.height;
+ float fHeight = pLeaderLayoutItem->m_sSize.height;
for (CXFA_ContentLayoutItem* pChildItem =
(CXFA_ContentLayoutItem*)pProcessor->m_pLayoutItem->m_pFirstChild;
pChildItem;
@@ -430,9 +430,9 @@ void AddPendingNode(CXFA_ItemLayoutProcessor* pProcessor,
pProcessor->m_bBreakPending = bBreakPending;
}
-FX_FLOAT InsertPendingItems(CXFA_ItemLayoutProcessor* pProcessor,
- CXFA_Node* pCurChildNode) {
- FX_FLOAT fTotalHeight = 0;
+float InsertPendingItems(CXFA_ItemLayoutProcessor* pProcessor,
+ CXFA_Node* pCurChildNode) {
+ float fTotalHeight = 0;
if (pProcessor->m_PendingNodes.empty())
return fTotalHeight;
@@ -605,17 +605,17 @@ XFA_ItemLayoutProcessorResult InsertFlowedItem(
CXFA_ItemLayoutProcessor* pProcessor,
bool bContainerWidthAutoSize,
bool bContainerHeightAutoSize,
- FX_FLOAT fContainerHeight,
+ float fContainerHeight,
XFA_ATTRIBUTEENUM eFlowStrategy,
uint8_t* uCurHAlignState,
CFX_ArrayTemplate<CXFA_ContentLayoutItem*> (&rgCurLineLayoutItems)[3],
bool bUseBreakControl,
- FX_FLOAT fAvailHeight,
- FX_FLOAT fRealHeight,
- FX_FLOAT fContentWidthLimit,
- FX_FLOAT* fContentCurRowY,
- FX_FLOAT* fContentCurRowAvailWidth,
- FX_FLOAT* fContentCurRowHeight,
+ float fAvailHeight,
+ float fRealHeight,
+ float fContentWidthLimit,
+ float* fContentCurRowY,
+ float* fContentCurRowAvailWidth,
+ float* fContentCurRowHeight,
bool* bAddedItemInRow,
bool* bForceEndPage,
CXFA_LayoutContext* pLayoutContext,
@@ -808,8 +808,7 @@ XFA_ItemLayoutProcessorResult InsertFlowedItem(
}
*bForceEndPage = true;
- FX_FLOAT fSplitPos =
- pProcessor->FindSplitPos(fAvailHeight - *fContentCurRowY);
+ float fSplitPos = pProcessor->FindSplitPos(fAvailHeight - *fContentCurRowY);
if (fSplitPos > XFA_LAYOUT_FLOAT_PERCISION) {
XFA_ATTRIBUTEENUM eLayout =
pProcessor->m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout);
@@ -940,8 +939,8 @@ XFA_ItemLayoutProcessorResult InsertFlowedItem(
}
bool FindLayoutItemSplitPos(CXFA_ContentLayoutItem* pLayoutItem,
- FX_FLOAT fCurVerticalOffset,
- FX_FLOAT* fProposedSplitPos,
+ float fCurVerticalOffset,
+ float* fProposedSplitPos,
bool* bAppChange,
bool bCalculateMargin) {
CXFA_Node* pFormNode = pLayoutItem->m_pFormNode;
@@ -956,7 +955,7 @@ bool FindLayoutItemSplitPos(CXFA_ContentLayoutItem* pLayoutItem,
bool bAnyChanged = false;
CXFA_Document* pDocument = pFormNode->GetDocument();
CXFA_FFNotify* pNotify = pDocument->GetNotify();
- FX_FLOAT fCurTopMargin = 0, fCurBottomMargin = 0;
+ float fCurTopMargin = 0, fCurBottomMargin = 0;
CXFA_Node* pMarginNode =
pFormNode->GetFirstChildByClass(XFA_Element::Margin);
if (pMarginNode && bCalculateMargin) {
@@ -969,7 +968,7 @@ bool FindLayoutItemSplitPos(CXFA_ContentLayoutItem* pLayoutItem,
while (bChanged) {
bChanged = false;
{
- FX_FLOAT fRelSplitPos = *fProposedSplitPos - fCurVerticalOffset;
+ float fRelSplitPos = *fProposedSplitPos - fCurVerticalOffset;
if (pNotify->FindSplitPos(pFormNode, pLayoutItem->GetIndex(),
fRelSplitPos)) {
bAnyChanged = true;
@@ -982,12 +981,12 @@ bool FindLayoutItemSplitPos(CXFA_ContentLayoutItem* pLayoutItem,
}
}
}
- FX_FLOAT fRelSplitPos = *fProposedSplitPos - fCurBottomMargin;
+ float fRelSplitPos = *fProposedSplitPos - fCurBottomMargin;
for (CXFA_ContentLayoutItem* pChildItem =
(CXFA_ContentLayoutItem*)pLayoutItem->m_pFirstChild;
pChildItem;
pChildItem = (CXFA_ContentLayoutItem*)pChildItem->m_pNextSibling) {
- FX_FLOAT fChildOffset =
+ float fChildOffset =
fCurVerticalOffset + fCurTopMargin + pChildItem->m_sPos.y;
bool bChange = false;
if (FindLayoutItemSplitPos(pChildItem, fChildOffset, &fRelSplitPos,
@@ -1149,7 +1148,7 @@ CXFA_ContentLayoutItem* CXFA_ItemLayoutProcessor::CreateContentLayoutItem(
return pLayoutItem;
}
-FX_FLOAT CXFA_ItemLayoutProcessor::FindSplitPos(FX_FLOAT fProposedSplitPos) {
+float CXFA_ItemLayoutProcessor::FindSplitPos(float fProposedSplitPos) {
ASSERT(m_pLayoutItem);
XFA_ATTRIBUTEENUM eLayout = m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout);
bool bCalculateMargin = eLayout != XFA_ATTRIBUTEENUM_Position;
@@ -1166,8 +1165,8 @@ FX_FLOAT CXFA_ItemLayoutProcessor::FindSplitPos(FX_FLOAT fProposedSplitPos) {
void CXFA_ItemLayoutProcessor::SplitLayoutItem(
CXFA_ContentLayoutItem* pLayoutItem,
CXFA_ContentLayoutItem* pSecondParent,
- FX_FLOAT fSplitPos) {
- FX_FLOAT fCurTopMargin = 0, fCurBottomMargin = 0;
+ float fSplitPos) {
+ float fCurTopMargin = 0, fCurBottomMargin = 0;
XFA_ATTRIBUTEENUM eLayout = m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout);
bool bCalculateMargin = true;
if (eLayout == XFA_ATTRIBUTEENUM_Position)
@@ -1218,9 +1217,9 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(
CXFA_ContentLayoutItem* pChildren =
(CXFA_ContentLayoutItem*)pLayoutItem->m_pFirstChild;
pLayoutItem->m_pFirstChild = nullptr;
- FX_FLOAT lHeightForKeep = 0;
+ float lHeightForKeep = 0;
CFX_ArrayTemplate<CXFA_ContentLayoutItem*> keepLayoutItems;
- FX_FLOAT fAddMarginHeight = 0;
+ float fAddMarginHeight = 0;
for (CXFA_ContentLayoutItem *pChildItem = pChildren, *pChildNext = nullptr;
pChildItem; pChildItem = pChildNext) {
pChildNext = (CXFA_ContentLayoutItem*)pChildItem->m_pNextSibling;
@@ -1273,7 +1272,7 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(
continue;
}
- FX_FLOAT fOldHeight = pSecondLayoutItem->m_sSize.height;
+ float fOldHeight = pSecondLayoutItem->m_sSize.height;
SplitLayoutItem(
pChildItem, pSecondLayoutItem,
fSplitPos - fCurTopMargin - fCurBottomMargin - pChildItem->m_sPos.y);
@@ -1282,7 +1281,7 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(
}
}
-void CXFA_ItemLayoutProcessor::SplitLayoutItem(FX_FLOAT fSplitPos) {
+void CXFA_ItemLayoutProcessor::SplitLayoutItem(float fSplitPos) {
ASSERT(m_pLayoutItem);
SplitLayoutItem(m_pLayoutItem, nullptr, fSplitPos);
}
@@ -1624,10 +1623,10 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer(
CFX_SizeF containerSize = CalculateContainerSpecifiedSize(
m_pFormNode, &bContainerWidthAutoSize, &bContainerHeightAutoSize);
- FX_FLOAT fContentCalculatedWidth = 0;
- FX_FLOAT fContentCalculatedHeight = 0;
- FX_FLOAT fHiddenContentCalculatedWidth = 0;
- FX_FLOAT fHiddenContentCalculatedHeight = 0;
+ float fContentCalculatedWidth = 0;
+ float fContentCalculatedHeight = 0;
+ float fHiddenContentCalculatedWidth = 0;
+ float fHiddenContentCalculatedHeight = 0;
if (m_pCurChildNode == XFA_LAYOUT_INVALIDNODE) {
GotoNextContainerNode(m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode,
false);
@@ -1678,7 +1677,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer(
pProcessor->SetCurrentComponentPos(absolutePos);
if (bContainerWidthAutoSize) {
- FX_FLOAT fChildSuppliedWidth = absolutePos.x + size.width;
+ float fChildSuppliedWidth = absolutePos.x + size.width;
if (bChangeParentSize) {
fContentCalculatedWidth =
std::max(fContentCalculatedWidth, fChildSuppliedWidth);
@@ -1691,7 +1690,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer(
}
if (bContainerHeightAutoSize) {
- FX_FLOAT fChildSuppliedHeight = absolutePos.y + size.height;
+ float fChildSuppliedHeight = absolutePos.y + size.height;
if (bChangeParentSize) {
fContentCalculatedHeight =
std::max(fContentCalculatedHeight, fChildSuppliedHeight);
@@ -1730,12 +1729,12 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
bool bContainerHeightAutoSize = true;
CFX_SizeF containerSize = CalculateContainerSpecifiedSize(
m_pFormNode, &bContainerWidthAutoSize, &bContainerHeightAutoSize);
- FX_FLOAT fContentCalculatedWidth = 0;
- FX_FLOAT fContentCalculatedHeight = 0;
+ float fContentCalculatedWidth = 0;
+ float fContentCalculatedHeight = 0;
CXFA_Node* pMarginNode =
m_pFormNode->GetFirstChildByClass(XFA_Element::Margin);
- FX_FLOAT fLeftInset = 0;
- FX_FLOAT fRightInset = 0;
+ float fLeftInset = 0;
+ float fRightInset = 0;
if (pMarginNode) {
fLeftInset =
pMarginNode->GetMeasure(XFA_ATTRIBUTE_LeftInset).ToUnit(XFA_UNIT_Pt);
@@ -1743,7 +1742,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
pMarginNode->GetMeasure(XFA_ATTRIBUTE_RightInset).ToUnit(XFA_UNIT_Pt);
}
- FX_FLOAT fContentWidthLimit =
+ float fContentWidthLimit =
bContainerWidthAutoSize ? FLT_MAX
: containerSize.width - fLeftInset - fRightInset;
CFX_WideStringC wsColumnWidths;
@@ -1791,7 +1790,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
{
CFX_ArrayTemplate<CXFA_ContentLayoutItem*> rgRowItems;
CFX_ArrayTemplate<int32_t> rgRowItemsSpan;
- CFX_ArrayTemplate<FX_FLOAT> rgRowItemsWidth;
+ CFX_ArrayTemplate<float> rgRowItemsWidth;
for (CXFA_ContentLayoutItem* pLayoutChild =
(CXFA_ContentLayoutItem*)m_pLayoutItem->m_pFirstChild;
pLayoutChild;
@@ -1864,7 +1863,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
if (!bMoreColumns)
continue;
- FX_FLOAT fFinalColumnWidth = 0.0f;
+ float fFinalColumnWidth = 0.0f;
if (iColCount < m_rgSpecifiedColumnWidths.GetSize())
fFinalColumnWidth = m_rgSpecifiedColumnWidths[iColCount];
for (int32_t i = 0; i < iRowCount; ++i) {
@@ -1877,7 +1876,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
}
}
- FX_FLOAT fCurrentRowY = 0;
+ float fCurrentRowY = 0;
for (CXFA_ContentLayoutItem* pLayoutChild =
(CXFA_ContentLayoutItem*)m_pLayoutItem->m_pFirstChild;
pLayoutChild;
@@ -1916,7 +1915,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
}
if (bContainerWidthAutoSize) {
- FX_FLOAT fChildSuppliedWidth =
+ float fChildSuppliedWidth =
pLayoutChild->m_sPos.x + pLayoutChild->m_sSize.width;
if (fContentWidthLimit < FLT_MAX &&
fContentWidthLimit > fChildSuppliedWidth) {
@@ -1942,12 +1941,12 @@ bool CXFA_ItemLayoutProcessor::IsAddNewRowForTrailer(
if (!pTrailerItem)
return false;
- FX_FLOAT fWidth = pTrailerItem->m_sSize.width;
+ float fWidth = pTrailerItem->m_sSize.width;
XFA_ATTRIBUTEENUM eLayout = m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout);
return eLayout == XFA_ATTRIBUTEENUM_Tb || m_fWidthLimite <= fWidth;
}
-FX_FLOAT CXFA_ItemLayoutProcessor::InsertKeepLayoutItems() {
+float CXFA_ItemLayoutProcessor::InsertKeepLayoutItems() {
if (m_arrayKeepItems.empty())
return 0;
@@ -1956,7 +1955,7 @@ FX_FLOAT CXFA_ItemLayoutProcessor::InsertKeepLayoutItems() {
m_pLayoutItem->m_sSize.clear();
}
- FX_FLOAT fTotalHeight = 0;
+ float fTotalHeight = 0;
for (auto iter = m_arrayKeepItems.rbegin(); iter != m_arrayKeepItems.rend();
iter++) {
AddLeaderAfterSplit(this, *iter);
@@ -1972,9 +1971,9 @@ bool CXFA_ItemLayoutProcessor::ProcessKeepForSplit(
CXFA_ItemLayoutProcessor* pChildProcessor,
XFA_ItemLayoutProcessorResult eRetValue,
CFX_ArrayTemplate<CXFA_ContentLayoutItem*>* rgCurLineLayoutItem,
- FX_FLOAT* fContentCurRowAvailWidth,
- FX_FLOAT* fContentCurRowHeight,
- FX_FLOAT* fContentCurRowY,
+ float* fContentCurRowAvailWidth,
+ float* fContentCurRowHeight,
+ float* fContentCurRowY,
bool* bAddedItemInRow,
bool* bForceEndPage,
XFA_ItemLayoutProcessorResult* result) {
@@ -2017,12 +2016,12 @@ bool CXFA_ItemLayoutProcessor::ProcessKeepForSplit(
bool CXFA_ItemLayoutProcessor::JudgePutNextPage(
CXFA_ContentLayoutItem* pParentLayoutItem,
- FX_FLOAT fChildHeight,
+ float fChildHeight,
std::vector<CXFA_ContentLayoutItem*>* pKeepItems) {
if (!pParentLayoutItem)
return false;
- FX_FLOAT fItemsHeight = 0;
+ float fItemsHeight = 0;
for (CXFA_ContentLayoutItem* pChildLayoutItem =
(CXFA_ContentLayoutItem*)pParentLayoutItem->m_pFirstChild;
pChildLayoutItem;
@@ -2084,8 +2083,8 @@ void CXFA_ItemLayoutProcessor::ProcessUnUseOverFlow(
XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
bool bUseBreakControl,
XFA_ATTRIBUTEENUM eFlowStrategy,
- FX_FLOAT fHeightLimit,
- FX_FLOAT fRealHeight,
+ float fHeightLimit,
+ float fRealHeight,
CXFA_LayoutContext* pContext,
bool bRootForceTb) {
m_bHasAvailHeight = true;
@@ -2126,10 +2125,10 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
CXFA_Node* pMarginNode =
m_pFormNode->GetFirstChildByClass(XFA_Element::Margin);
- FX_FLOAT fLeftInset = 0;
- FX_FLOAT fTopInset = 0;
- FX_FLOAT fRightInset = 0;
- FX_FLOAT fBottomInset = 0;
+ float fLeftInset = 0;
+ float fTopInset = 0;
+ float fRightInset = 0;
+ float fBottomInset = 0;
if (pMarginNode) {
fLeftInset =
pMarginNode->GetMeasure(XFA_ATTRIBUTE_LeftInset).ToUnit(XFA_UNIT_Pt);
@@ -2140,17 +2139,17 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
fBottomInset =
pMarginNode->GetMeasure(XFA_ATTRIBUTE_BottomInset).ToUnit(XFA_UNIT_Pt);
}
- FX_FLOAT fContentWidthLimit =
+ float fContentWidthLimit =
bContainerWidthAutoSize ? FLT_MAX
: containerSize.width - fLeftInset - fRightInset;
- FX_FLOAT fContentCalculatedWidth = 0;
- FX_FLOAT fContentCalculatedHeight = 0;
- FX_FLOAT fAvailHeight = fHeightLimit - fTopInset - fBottomInset;
+ float fContentCalculatedWidth = 0;
+ float fContentCalculatedHeight = 0;
+ float fAvailHeight = fHeightLimit - fTopInset - fBottomInset;
if (fAvailHeight < 0)
m_bHasAvailHeight = false;
fRealHeight = fRealHeight - fTopInset - fBottomInset;
- FX_FLOAT fContentCurRowY = 0;
+ float fContentCurRowY = 0;
CXFA_ContentLayoutItem* pLayoutChild = nullptr;
if (m_pLayoutItem) {
if (m_nCurChildNodeStage != XFA_ItemLayoutProcessorStages::Done &&
@@ -2202,8 +2201,8 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
}
while (m_nCurChildNodeStage != XFA_ItemLayoutProcessorStages::Done) {
- FX_FLOAT fContentCurRowHeight = 0;
- FX_FLOAT fContentCurRowAvailWidth = fContentWidthLimit;
+ float fContentCurRowHeight = 0;
+ float fContentCurRowAvailWidth = fContentWidthLimit;
m_fWidthLimite = fContentCurRowAvailWidth;
CFX_ArrayTemplate<CXFA_ContentLayoutItem*> rgCurLineLayoutItems[3];
uint8_t uCurHAlignState =
@@ -2535,14 +2534,14 @@ bool CXFA_ItemLayoutProcessor::CalculateRowChildPosition(
XFA_ATTRIBUTEENUM eFlowStrategy,
bool bContainerHeightAutoSize,
bool bContainerWidthAutoSize,
- FX_FLOAT* fContentCalculatedWidth,
- FX_FLOAT* fContentCalculatedHeight,
- FX_FLOAT* fContentCurRowY,
- FX_FLOAT fContentCurRowHeight,
- FX_FLOAT fContentWidthLimit,
+ float* fContentCalculatedWidth,
+ float* fContentCalculatedHeight,
+ float* fContentCurRowY,
+ float fContentCurRowHeight,
+ float fContentWidthLimit,
bool bRootForceTb) {
int32_t nGroupLengths[3] = {0, 0, 0};
- FX_FLOAT fGroupWidths[3] = {0, 0, 0};
+ float fGroupWidths[3] = {0, 0, 0};
int32_t nTotalLength = 0;
for (int32_t i = 0; i < 3; i++) {
nGroupLengths[i] = rgCurLineLayoutItems[i].GetSize();
@@ -2567,7 +2566,7 @@ bool CXFA_ItemLayoutProcessor::CalculateRowChildPosition(
m_pLayoutItem = CreateContentLayoutItem(m_pFormNode);
if (eFlowStrategy != XFA_ATTRIBUTEENUM_Rl_tb) {
- FX_FLOAT fCurPos;
+ float fCurPos;
fCurPos = 0;
for (int32_t c = nGroupLengths[0], j = 0; j < c; j++) {
if (bRootForceTb) {
@@ -2622,7 +2621,7 @@ bool CXFA_ItemLayoutProcessor::CalculateRowChildPosition(
m_fLastRowWidth = fCurPos;
}
} else {
- FX_FLOAT fCurPos;
+ float fCurPos;
fCurPos = fGroupWidths[0];
for (int32_t c = nGroupLengths[0], j = 0; j < c; j++) {
if (XFA_ItemLayoutProcessor_IsTakingSpace(
@@ -2662,7 +2661,7 @@ bool CXFA_ItemLayoutProcessor::CalculateRowChildPosition(
m_fLastRowY = *fContentCurRowY;
*fContentCurRowY += fContentCurRowHeight;
if (bContainerWidthAutoSize) {
- FX_FLOAT fChildSuppliedWidth = fGroupWidths[0];
+ float fChildSuppliedWidth = fGroupWidths[0];
if (fContentWidthLimit < FLT_MAX &&
fContentWidthLimit > fChildSuppliedWidth) {
fChildSuppliedWidth = fContentWidthLimit;
@@ -2715,8 +2714,8 @@ void CXFA_ItemLayoutProcessor::DoLayoutField() {
XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayout(
bool bUseBreakControl,
- FX_FLOAT fHeightLimit,
- FX_FLOAT fRealHeight,
+ float fHeightLimit,
+ float fRealHeight,
CXFA_LayoutContext* pContext) {
switch (m_pFormNode->GetElementType()) {
case XFA_Element::Subform:
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.h b/xfa/fxfa/parser/xfa_layout_itemlayout.h
index d411bf0e9f..7b19283b9b 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.h
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.h
@@ -56,8 +56,8 @@ class CXFA_LayoutContext {
m_pOverflowNode(nullptr) {}
~CXFA_LayoutContext() {}
- CFX_ArrayTemplate<FX_FLOAT>* m_prgSpecifiedColumnWidths;
- FX_FLOAT m_fCurColumnWidth;
+ CFX_ArrayTemplate<float>* m_prgSpecifiedColumnWidths;
+ float m_fCurColumnWidth;
bool m_bCurColumnWidthAvaiable;
CXFA_ItemLayoutProcessor* m_pOverflowProcessor;
CXFA_Node* m_pOverflowNode;
@@ -75,8 +75,8 @@ class CXFA_ItemLayoutProcessor {
~CXFA_ItemLayoutProcessor();
XFA_ItemLayoutProcessorResult DoLayout(bool bUseBreakControl,
- FX_FLOAT fHeightLimit,
- FX_FLOAT fRealHeight,
+ float fHeightLimit,
+ float fRealHeight,
CXFA_LayoutContext* pContext);
void DoLayoutPageArea(CXFA_ContainerLayoutItem* pPageAreaLayoutItem);
@@ -84,18 +84,18 @@ class CXFA_ItemLayoutProcessor {
CXFA_Node* GetFormNode() { return m_pFormNode; }
bool HasLayoutItem() const { return !!m_pLayoutItem; }
CXFA_ContentLayoutItem* ExtractLayoutItem();
- void SplitLayoutItem(FX_FLOAT fSplitPos);
+ void SplitLayoutItem(float fSplitPos);
- FX_FLOAT FindSplitPos(FX_FLOAT fProposedSplitPos);
+ float FindSplitPos(float fProposedSplitPos);
bool ProcessKeepForSplit(
CXFA_ItemLayoutProcessor* pParentProcessor,
CXFA_ItemLayoutProcessor* pChildProcessor,
XFA_ItemLayoutProcessorResult eRetValue,
CFX_ArrayTemplate<CXFA_ContentLayoutItem*>* rgCurLineLayoutItem,
- FX_FLOAT* fContentCurRowAvailWidth,
- FX_FLOAT* fContentCurRowHeight,
- FX_FLOAT* fContentCurRowY,
+ float* fContentCurRowAvailWidth,
+ float* fContentCurRowHeight,
+ float* fContentCurRowY,
bool* bAddedItemInRow,
bool* bForceEndPage,
XFA_ItemLayoutProcessorResult* result);
@@ -111,14 +111,14 @@ class CXFA_ItemLayoutProcessor {
CXFA_Node* m_pFormNode;
CXFA_ContentLayoutItem* m_pLayoutItem;
CXFA_Node* m_pCurChildNode;
- FX_FLOAT m_fUsedSize;
+ float m_fUsedSize;
CXFA_LayoutPageMgr* m_pPageMgr;
std::list<CXFA_Node*> m_PendingNodes;
bool m_bBreakPending;
- CFX_ArrayTemplate<FX_FLOAT> m_rgSpecifiedColumnWidths;
+ CFX_ArrayTemplate<float> m_rgSpecifiedColumnWidths;
std::vector<CXFA_ContentLayoutItem*> m_arrayKeepItems;
- FX_FLOAT m_fLastRowWidth;
- FX_FLOAT m_fLastRowY;
+ float m_fLastRowWidth;
+ float m_fLastRowY;
bool m_bUseInheriated;
XFA_ItemLayoutProcessorResult m_ePreProcessRs;
@@ -128,22 +128,22 @@ class CXFA_ItemLayoutProcessor {
void SplitLayoutItem(CXFA_ContentLayoutItem* pLayoutItem,
CXFA_ContentLayoutItem* pSecondParent,
- FX_FLOAT fSplitPos);
- FX_FLOAT InsertKeepLayoutItems();
+ float fSplitPos);
+ float InsertKeepLayoutItems();
bool CalculateRowChildPosition(
CFX_ArrayTemplate<CXFA_ContentLayoutItem*> (&rgCurLineLayoutItems)[3],
XFA_ATTRIBUTEENUM eFlowStrategy,
bool bContainerHeightAutoSize,
bool bContainerWidthAutoSize,
- FX_FLOAT* fContentCalculatedWidth,
- FX_FLOAT* fContentCalculatedHeight,
- FX_FLOAT* fContentCurRowY,
- FX_FLOAT fContentCurRowHeight,
- FX_FLOAT fContentWidthLimit,
+ float* fContentCalculatedWidth,
+ float* fContentCalculatedHeight,
+ float* fContentCurRowY,
+ float fContentCurRowHeight,
+ float fContentWidthLimit,
bool bRootForceTb);
void ProcessUnUseBinds(CXFA_Node* pFormNode);
bool JudgePutNextPage(CXFA_ContentLayoutItem* pParentLayoutItem,
- FX_FLOAT fChildHeight,
+ float fChildHeight,
std::vector<CXFA_ContentLayoutItem*>* pKeepItems);
void DoLayoutPositionedContainer(CXFA_LayoutContext* pContext);
@@ -151,8 +151,8 @@ class CXFA_ItemLayoutProcessor {
XFA_ItemLayoutProcessorResult DoLayoutFlowedContainer(
bool bUseBreakControl,
XFA_ATTRIBUTEENUM eFlowStrategy,
- FX_FLOAT fHeightLimit,
- FX_FLOAT fRealHeight,
+ float fHeightLimit,
+ float fRealHeight,
CXFA_LayoutContext* pContext,
bool bRootForceTb);
void DoLayoutField();
@@ -181,7 +181,7 @@ class CXFA_ItemLayoutProcessor {
CXFA_ItemLayoutProcessor* m_pCurChildPreprocessor;
XFA_ItemLayoutProcessorStages m_nCurChildNodeStage;
std::map<CXFA_Node*, int32_t> m_PendingNodesCount;
- FX_FLOAT m_fWidthLimite;
+ float m_fWidthLimite;
bool m_bHasAvailHeight;
};
diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp
index b011f0fdad..b86ab90f19 100644
--- a/xfa/fxfa/parser/xfa_localevalue.cpp
+++ b/xfa/fxfa/parser/xfa_localevalue.cpp
@@ -210,7 +210,7 @@ CFX_WideString CXFA_LocaleValue::GetText() const {
}
return CFX_WideString();
}
-FX_FLOAT CXFA_LocaleValue::GetNum() const {
+float CXFA_LocaleValue::GetNum() const {
if (m_bValid && (m_dwType == XFA_VT_BOOLEAN || m_dwType == XFA_VT_INTEGER ||
m_dwType == XFA_VT_DECIMAL || m_dwType == XFA_VT_FLOAT)) {
int64_t nIntegral = 0;
@@ -277,10 +277,10 @@ FX_FLOAT CXFA_LocaleValue::GetNum() const {
}
nExponent = bExpSign ? -nExponent : nExponent;
}
- FX_FLOAT fValue = (FX_FLOAT)(dwFractional / 4294967296.0);
+ float fValue = (float)(dwFractional / 4294967296.0);
fValue = nIntegral + (nIntegral >= 0 ? fValue : -fValue);
if (nExponent != 0) {
- fValue *= FXSYS_pow(10, (FX_FLOAT)nExponent);
+ fValue *= FXSYS_pow(10, (float)nExponent);
}
return fValue;
}
@@ -356,7 +356,7 @@ double CXFA_LocaleValue::GetDoubleNum() const {
double dValue = (dwFractional / 4294967296.0);
dValue = nIntegral + (nIntegral >= 0 ? dValue : -dValue);
if (nExponent != 0) {
- dValue *= FXSYS_pow(10, (FX_FLOAT)nExponent);
+ dValue *= FXSYS_pow(10, (float)nExponent);
}
return dValue;
}
@@ -404,7 +404,7 @@ bool CXFA_LocaleValue::SetText(const CFX_WideString& wsText,
m_dwType = XFA_VT_TEXT;
return m_bValid = ParsePatternValue(wsText, wsFormat, pLocale);
}
-bool CXFA_LocaleValue::SetNum(FX_FLOAT fNum) {
+bool CXFA_LocaleValue::SetNum(float fNum) {
m_dwType = XFA_VT_FLOAT;
m_wsValue.Format(L"%.8g", (double)fNum);
return true;
diff --git a/xfa/fxfa/parser/xfa_localevalue.h b/xfa/fxfa/parser/xfa_localevalue.h
index 084f63cb6e..a239fa7609 100644
--- a/xfa/fxfa/parser/xfa_localevalue.h
+++ b/xfa/fxfa/parser/xfa_localevalue.h
@@ -70,7 +70,7 @@ class CXFA_LocaleValue {
uint32_t GetType() const;
void SetValue(const CFX_WideString& wsValue, uint32_t dwType);
CFX_WideString GetText() const;
- FX_FLOAT GetNum() const;
+ float GetNum() const;
double GetDoubleNum() const;
CFX_Unitime GetDate() const;
CFX_Unitime GetTime() const;
@@ -79,7 +79,7 @@ class CXFA_LocaleValue {
bool SetText(const CFX_WideString& wsText,
const CFX_WideString& wsFormat,
IFX_Locale* pLocale);
- bool SetNum(FX_FLOAT fNum);
+ bool SetNum(float fNum);
bool SetNum(const CFX_WideString& wsNum,
const CFX_WideString& wsFormat,
IFX_Locale* pLocale);
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp
index c41902676d..101a6cf90e 100644
--- a/xfa/fxfa/parser/xfa_utils.cpp
+++ b/xfa/fxfa/parser/xfa_utils.cpp
@@ -109,7 +109,7 @@ double WideStringToDouble(const CFX_WideString& wsStringVal) {
double dValue = (dwFractional / 4294967296.0);
dValue = nIntegral + (nIntegral >= 0 ? dValue : -dValue);
if (nExponent != 0) {
- dValue *= FXSYS_pow(10, (FX_FLOAT)nExponent);
+ dValue *= FXSYS_pow(10, (float)nExponent);
}
return dValue;
}