summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-14 14:43:42 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-14 19:05:58 +0000
commit05df075154a832fcb476e1dfcfb865722d0ea898 (patch)
treeb8b771b62adae74d5d5ee561db75d10de3a848bf /xfa/fxfa
parent6b94f01d1c8ad386d497428c7397b1a99614aeba (diff)
downloadpdfium-05df075154a832fcb476e1dfcfb865722d0ea898.tar.xz
Replace FX_FLOAT with underlying float type.
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56 Reviewed-on: https://pdfium-review.googlesource.com/3031 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/app/cxfa_loadercontext.h12
-rw-r--r--xfa/fxfa/app/cxfa_textlayout.cpp125
-rw-r--r--xfa/fxfa/app/cxfa_textlayout.h34
-rw-r--r--xfa/fxfa/app/cxfa_textparser.cpp34
-rw-r--r--xfa/fxfa/app/cxfa_textparser.h18
-rw-r--r--xfa/fxfa/app/cxfa_texttabstopscontext.cpp2
-rw-r--r--xfa/fxfa/app/cxfa_texttabstopscontext.h8
-rw-r--r--xfa/fxfa/app/xfa_ffbarcode.cpp2
-rw-r--r--xfa/fxfa/app/xfa_ffcheckbutton.cpp10
-rw-r--r--xfa/fxfa/app/xfa_fffield.cpp20
-rw-r--r--xfa/fxfa/app/xfa_ffnotify.cpp6
-rw-r--r--xfa/fxfa/app/xfa_ffnotify.h6
-rw-r--r--xfa/fxfa/app/xfa_ffpageview.cpp34
-rw-r--r--xfa/fxfa/app/xfa_ffpath.cpp6
-rw-r--r--xfa/fxfa/app/xfa_ffpath.h2
-rw-r--r--xfa/fxfa/app/xfa_ffpushbutton.cpp6
-rw-r--r--xfa/fxfa/app/xfa_ffpushbutton.h2
-rw-r--r--xfa/fxfa/app/xfa_fftext.cpp12
-rw-r--r--xfa/fxfa/app/xfa_ffwidget.cpp122
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp129
-rw-r--r--xfa/fxfa/app/xfa_ffwidgethandler.cpp2
-rw-r--r--xfa/fxfa/app/xfa_fwladapter.cpp4
-rw-r--r--xfa/fxfa/app/xfa_fwladapter.h4
-rw-r--r--xfa/fxfa/app/xfa_textpiece.h2
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp114
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.h2
-rw-r--r--xfa/fxfa/fxfa.h4
-rw-r--r--xfa/fxfa/fxfa_widget.h22
-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
-rw-r--r--xfa/fxfa/xfa_ffwidget.h2
-rw-r--r--xfa/fxfa/xfa_ffwidgethandler.h2
58 files changed, 604 insertions, 621 deletions
diff --git a/xfa/fxfa/app/cxfa_loadercontext.h b/xfa/fxfa/app/cxfa_loadercontext.h
index d8ccdbe7e2..4d1a2b3a6b 100644
--- a/xfa/fxfa/app/cxfa_loadercontext.h
+++ b/xfa/fxfa/app/cxfa_loadercontext.h
@@ -22,19 +22,19 @@ class CXFA_LoaderContext {
~CXFA_LoaderContext();
bool m_bSaveLineHeight;
- FX_FLOAT m_fWidth;
- FX_FLOAT m_fHeight;
- FX_FLOAT m_fLastPos;
- FX_FLOAT m_fStartLineOffset;
+ float m_fWidth;
+ float m_fHeight;
+ float m_fLastPos;
+ float m_fStartLineOffset;
int32_t m_iChar;
int32_t m_iLines;
int32_t m_iTotalLines;
CFDE_XMLNode* m_pXMLNode;
CXFA_Node* m_pNode;
CFX_RetainPtr<CFDE_CSSComputedStyle> m_pParentStyle;
- CFX_ArrayTemplate<FX_FLOAT> m_lineHeights;
+ CFX_ArrayTemplate<float> m_lineHeights;
uint32_t m_dwFlags;
- std::vector<FX_FLOAT> m_BlocksHeight;
+ std::vector<float> m_BlocksHeight;
};
#endif // XFA_FXFA_APP_CXFA_LOADERCONTEXT_H_
diff --git a/xfa/fxfa/app/cxfa_textlayout.cpp b/xfa/fxfa/app/cxfa_textlayout.cpp
index 3c0087de09..f25f6cceee 100644
--- a/xfa/fxfa/app/cxfa_textlayout.cpp
+++ b/xfa/fxfa/app/cxfa_textlayout.cpp
@@ -101,11 +101,11 @@ std::unique_ptr<CFX_RTFBreak> CXFA_TextLayout::CreateBreak(bool bDefault) {
return pBreak;
}
-void CXFA_TextLayout::InitBreak(FX_FLOAT fLineWidth) {
+void CXFA_TextLayout::InitBreak(float fLineWidth) {
CXFA_Font font = m_pTextProvider->GetFontNode();
CXFA_Para para = m_pTextProvider->GetParaNode();
- FX_FLOAT fStart = 0;
- FX_FLOAT fStartPos = 0;
+ float fStart = 0;
+ float fStartPos = 0;
if (para) {
CFX_RTFLineAlignment iAlign = CFX_RTFLineAlignment::Left;
switch (para.GetHorizontalAlign()) {
@@ -135,7 +135,7 @@ void CXFA_TextLayout::InitBreak(FX_FLOAT fLineWidth) {
fLineWidth = fStart;
fStartPos = fStart;
- FX_FLOAT fIndent = para.GetTextIndent();
+ float fIndent = para.GetTextIndent();
if (fIndent > 0)
fStartPos += fIndent;
}
@@ -148,7 +148,7 @@ void CXFA_TextLayout::InitBreak(FX_FLOAT fLineWidth) {
m_pBreak->SetCharSpace(font.GetLetterSpacing());
}
- FX_FLOAT fFontSize = m_textParser.GetFontSize(m_pTextProvider, nullptr);
+ float fFontSize = m_textParser.GetFontSize(m_pTextProvider, nullptr);
m_pBreak->SetFontSize(fFontSize);
m_pBreak->SetFont(m_textParser.GetFont(m_pTextProvider, nullptr));
m_pBreak->SetLineBreakTolerance(fFontSize * 0.2f);
@@ -156,7 +156,7 @@ void CXFA_TextLayout::InitBreak(FX_FLOAT fLineWidth) {
void CXFA_TextLayout::InitBreak(CFDE_CSSComputedStyle* pStyle,
FDE_CSSDisplay eDisplay,
- FX_FLOAT fLineWidth,
+ float fLineWidth,
CFDE_XMLNode* pXMLNode,
CFDE_CSSComputedStyle* pParentStyle) {
if (!pStyle) {
@@ -185,7 +185,7 @@ void CXFA_TextLayout::InitBreak(CFDE_CSSComputedStyle* pStyle,
}
m_pBreak->SetAlignment(iAlign);
- FX_FLOAT fStart = 0;
+ float fStart = 0;
const FDE_CSSRect* pRect = pStyle->GetMarginWidth();
const FDE_CSSRect* pPaddingRect = pStyle->GetPaddingWidth();
if (pRect) {
@@ -215,7 +215,7 @@ void CXFA_TextLayout::InitBreak(CFDE_CSSComputedStyle* pStyle,
}
}
m_pBreak->SetLineBoundary(fStart, fLineWidth);
- FX_FLOAT fIndent = pStyle->GetTextIndent().GetValue();
+ float fIndent = pStyle->GetTextIndent().GetValue();
if (fIndent > 0)
fStart += fIndent;
@@ -230,7 +230,7 @@ void CXFA_TextLayout::InitBreak(CFDE_CSSComputedStyle* pStyle,
}
}
- FX_FLOAT fFontSize = m_textParser.GetFontSize(m_pTextProvider, pStyle);
+ float fFontSize = m_textParser.GetFontSize(m_pTextProvider, pStyle);
m_pBreak->SetFontSize(fFontSize);
m_pBreak->SetLineBreakTolerance(fFontSize * 0.2f);
m_pBreak->SetFont(m_textParser.GetFont(m_pTextProvider, pStyle));
@@ -248,7 +248,7 @@ int32_t CXFA_TextLayout::GetText(CFX_WideString& wsText) {
return wsText.GetLength();
}
-FX_FLOAT CXFA_TextLayout::GetLayoutHeight() {
+float CXFA_TextLayout::GetLayoutHeight() {
if (!m_pLoader)
return 0;
@@ -263,7 +263,7 @@ FX_FLOAT CXFA_TextLayout::GetLayoutHeight() {
return szDef.height;
}
- FX_FLOAT fHeight = m_pLoader->m_fHeight;
+ float fHeight = m_pLoader->m_fHeight;
if (fHeight < 0.1f) {
fHeight = 0;
for (int32_t i = 0; i < iCount; i++)
@@ -272,7 +272,7 @@ FX_FLOAT CXFA_TextLayout::GetLayoutHeight() {
return fHeight;
}
-FX_FLOAT CXFA_TextLayout::StartLayout(FX_FLOAT fWidth) {
+float CXFA_TextLayout::StartLayout(float fWidth) {
if (!m_pLoader)
m_pLoader = pdfium::MakeUnique<CXFA_LoaderContext>();
@@ -298,14 +298,14 @@ FX_FLOAT CXFA_TextLayout::StartLayout(FX_FLOAT fWidth) {
}
bool CXFA_TextLayout::DoLayout(int32_t iBlockIndex,
- FX_FLOAT& fCalcHeight,
- FX_FLOAT fContentAreaHeight,
- FX_FLOAT fTextHeight) {
+ float& fCalcHeight,
+ float fContentAreaHeight,
+ float fTextHeight) {
if (!m_pLoader)
return false;
int32_t iBlockCount = m_Blocks.GetSize();
- FX_FLOAT fHeight = fTextHeight;
+ float fHeight = fTextHeight;
if (fHeight < 0)
fHeight = GetLayoutHeight();
@@ -326,7 +326,7 @@ bool CXFA_TextLayout::DoLayout(int32_t iBlockIndex,
}
}
- FX_FLOAT fLinePos = m_pLoader->m_fStartLineOffset;
+ float fLinePos = m_pLoader->m_fStartLineOffset;
int32_t iLineIndex = 0;
if (iBlockCount > 1) {
if (iBlockCount >= (iBlockIndex + 1) * 2) {
@@ -344,7 +344,7 @@ bool CXFA_TextLayout::DoLayout(int32_t iBlockIndex,
int32_t iCount = m_pLoader->m_lineHeights.GetSize();
int32_t i = 0;
for (i = iLineIndex; i < iCount; i++) {
- FX_FLOAT fLineHeight = m_pLoader->m_lineHeights.ElementAt(i);
+ float fLineHeight = m_pLoader->m_lineHeights.ElementAt(i);
if ((i == iLineIndex) && (fLineHeight - fContentAreaHeight > 0.001)) {
fCalcHeight = 0;
return true;
@@ -364,7 +364,7 @@ bool CXFA_TextLayout::DoLayout(int32_t iBlockIndex,
(m_pLoader->m_BlocksHeight[iBlockIndex * 2] == iBlockIndex)) {
m_pLoader->m_BlocksHeight[iBlockIndex * 2 + 1] = fCalcHeight;
} else {
- m_pLoader->m_BlocksHeight.push_back((FX_FLOAT)iBlockIndex);
+ m_pLoader->m_BlocksHeight.push_back((float)iBlockIndex);
m_pLoader->m_BlocksHeight.push_back(fCalcHeight);
}
}
@@ -392,7 +392,7 @@ bool CXFA_TextLayout::CalcSize(const CFX_SizeF& minSize,
defaultSize.width = 0xFFFF;
m_pBreak = CreateBreak(false);
- FX_FLOAT fLinePos = 0;
+ float fLinePos = 0;
m_iLines = 0;
m_fMaxWidth = 0;
Loader(defaultSize, fLinePos, false);
@@ -404,7 +404,7 @@ bool CXFA_TextLayout::CalcSize(const CFX_SizeF& minSize,
return true;
}
-bool CXFA_TextLayout::Layout(const CFX_SizeF& size, FX_FLOAT* fHeight) {
+bool CXFA_TextLayout::Layout(const CFX_SizeF& size, float* fHeight) {
if (size.width < 1)
return false;
@@ -416,7 +416,7 @@ bool CXFA_TextLayout::Layout(const CFX_SizeF& size, FX_FLOAT* fHeight) {
}
m_iLines = 0;
- FX_FLOAT fLinePos = 0;
+ float fLinePos = 0;
Loader(size, fLinePos, true);
UpdateAlign(size.height, fLinePos);
m_pTabstopContext.reset();
@@ -433,7 +433,7 @@ bool CXFA_TextLayout::Layout(int32_t iBlock) {
m_pLoader->m_iTotalLines = -1;
m_iLines = 0;
- FX_FLOAT fLinePos = 0;
+ float fLinePos = 0;
CXFA_Node* pNode = nullptr;
CFX_SizeF szText(m_pLoader->m_fWidth, m_pLoader->m_fHeight);
int32_t iCount = m_Blocks.GetSize();
@@ -523,7 +523,7 @@ void CXFA_TextLayout::ItemBlocks(const CFX_RectF& rtText, int32_t iBlockIndex) {
bool bEndItem = true;
int32_t iBlockCount = m_Blocks.GetSize();
- FX_FLOAT fLinePos = m_pLoader->m_fStartLineOffset;
+ float fLinePos = m_pLoader->m_fStartLineOffset;
int32_t iLineIndex = 0;
if (iBlockIndex > 0) {
int32_t iBlockHeightCount =
@@ -540,7 +540,7 @@ void CXFA_TextLayout::ItemBlocks(const CFX_RectF& rtText, int32_t iBlockIndex) {
int32_t i = 0;
for (i = iLineIndex; i < iCountHeight; i++) {
- FX_FLOAT fLineHeight = m_pLoader->m_lineHeights.ElementAt(i);
+ float fLineHeight = m_pLoader->m_lineHeights.ElementAt(i);
if (fLinePos + fLineHeight - rtText.height > 0.001) {
m_Blocks.Add(iLineIndex);
m_Blocks.Add(i - iLineIndex);
@@ -619,7 +619,7 @@ bool CXFA_TextLayout::DrawString(CFX_RenderDevice* pFxDevice,
return iPieceLines > 0;
}
-void CXFA_TextLayout::UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom) {
+void CXFA_TextLayout::UpdateAlign(float fHeight, float fBottom) {
fHeight -= fBottom;
if (fHeight < 0.1f)
return;
@@ -641,7 +641,7 @@ void CXFA_TextLayout::UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom) {
}
bool CXFA_TextLayout::Loader(const CFX_SizeF& szText,
- FX_FLOAT& fLinePos,
+ float& fLinePos,
bool bSavePieces) {
GetTextDataNode();
if (!m_pTextDataNode)
@@ -665,12 +665,12 @@ bool CXFA_TextLayout::Loader(const CFX_SizeF& szText,
void CXFA_TextLayout::LoadText(CXFA_Node* pNode,
const CFX_SizeF& szText,
- FX_FLOAT& fLinePos,
+ float& fLinePos,
bool bSavePieces) {
InitBreak(szText.width);
CXFA_Para para = m_pTextProvider->GetParaNode();
- FX_FLOAT fSpaceAbove = 0;
+ float fSpaceAbove = 0;
if (para) {
fSpaceAbove = para.GetSpaceAbove();
if (fSpaceAbove < 0.1f) {
@@ -699,7 +699,7 @@ void CXFA_TextLayout::LoadText(CXFA_Node* pNode,
bool CXFA_TextLayout::LoadRichText(
CFDE_XMLNode* pXMLNode,
const CFX_SizeF& szText,
- FX_FLOAT& fLinePos,
+ float& fLinePos,
const CFX_RetainPtr<CFDE_CSSComputedStyle>& pParentStyle,
bool bSavePieces,
CFX_RetainPtr<CXFA_LinkUserData> pLinkData,
@@ -713,7 +713,7 @@ bool CXFA_TextLayout::LoadRichText(
m_textParser.GetParseContextFromMap(pXMLNode);
FDE_CSSDisplay eDisplay = FDE_CSSDisplay::None;
bool bContentNode = false;
- FX_FLOAT fSpaceBelow = 0;
+ float fSpaceBelow = 0;
CFX_RetainPtr<CFDE_CSSComputedStyle> pStyle;
CFX_WideString wsName;
if (bEndBreak) {
@@ -887,8 +887,8 @@ bool CXFA_TextLayout::LoadRichText(
}
bool CXFA_TextLayout::AppendChar(const CFX_WideString& wsText,
- FX_FLOAT& fLinePos,
- FX_FLOAT fSpaceAbove,
+ float& fLinePos,
+ float fSpaceAbove,
bool bSavePieces) {
CFX_BreakType dwStatus = CFX_BreakType::None;
int32_t iChar = 0;
@@ -950,7 +950,7 @@ void CXFA_TextLayout::ProcessText(CFX_WideString& wsText) {
}
void CXFA_TextLayout::EndBreak(CFX_BreakType dwStatus,
- FX_FLOAT& fLinePos,
+ float& fLinePos,
bool bSavePieces) {
dwStatus = m_pBreak->EndBreak(dwStatus);
if (dwStatus != CFX_BreakType::None && dwStatus != CFX_BreakType::Piece)
@@ -977,7 +977,7 @@ void CXFA_TextLayout::DoTabstops(CFDE_CSSComputedStyle* pStyle,
if (iCount > 0) {
iTabstopsIndex++;
m_pTabstopContext->m_bTabstops = true;
- FX_FLOAT fRight = 0;
+ float fRight = 0;
if (iPieces > 1) {
XFA_TextPiece* p = pPieceLine->m_textPieces[iPieces - 2].get();
fRight = p->rtPiece.right();
@@ -985,7 +985,7 @@ void CXFA_TextLayout::DoTabstops(CFDE_CSSComputedStyle* pStyle,
m_pTabstopContext->m_fTabWidth =
pPiece->rtPiece.width + pPiece->rtPiece.left - fRight;
} else if (iTabstopsIndex > -1) {
- FX_FLOAT fLeft = 0;
+ float fLeft = 0;
if (m_pTabstopContext->m_bTabstops) {
XFA_TABSTOPS* pTabstops =
m_pTabstopContext->m_tabstops.GetDataPtr(iTabstopsIndex);
@@ -1014,7 +1014,7 @@ void CXFA_TextLayout::DoTabstops(CFDE_CSSComputedStyle* pStyle,
}
void CXFA_TextLayout::AppendTextLine(CFX_BreakType dwStatus,
- FX_FLOAT& fLinePos,
+ float& fLinePos,
bool bSavePieces,
bool bEndBreak) {
int32_t iPieces = m_pBreak->CountBreakPieces();
@@ -1029,7 +1029,7 @@ void CXFA_TextLayout::AppendTextLine(CFX_BreakType dwStatus,
if (m_pTabstopContext)
m_pTabstopContext->Reset();
- FX_FLOAT fLineStep = 0, fBaseLine = 0;
+ float fLineStep = 0, fBaseLine = 0;
int32_t i = 0;
for (i = 0; i < iPieces; i++) {
const CFX_BreakPiece* pPiece = m_pBreak->GetBreakPieceUnstable(i);
@@ -1037,7 +1037,7 @@ void CXFA_TextLayout::AppendTextLine(CFX_BreakType dwStatus,
static_cast<CXFA_TextUserData*>(pPiece->m_pUserData.Get());
if (pUserData)
pStyle = pUserData->m_pStyle;
- FX_FLOAT fVerScale = pPiece->m_iVerticalScale / 100.0f;
+ float fVerScale = pPiece->m_iVerticalScale / 100.0f;
auto pTP = pdfium::MakeUnique<XFA_TextPiece>();
pTP->iChars = pPiece->m_iChars;
@@ -1055,15 +1055,15 @@ void CXFA_TextLayout::AppendTextLine(CFX_BreakType dwStatus,
pTP->fFontSize = m_textParser.GetFontSize(m_pTextProvider, pStyle.Get());
pTP->rtPiece.left = pPiece->m_iStartPos / 20000.0f;
pTP->rtPiece.width = pPiece->m_iWidth / 20000.0f;
- pTP->rtPiece.height = (FX_FLOAT)pPiece->m_iFontSize * fVerScale / 20.0f;
- FX_FLOAT fBaseLineTemp =
+ pTP->rtPiece.height = (float)pPiece->m_iFontSize * fVerScale / 20.0f;
+ float fBaseLineTemp =
m_textParser.GetBaseline(m_pTextProvider, pStyle.Get());
pTP->rtPiece.top = fBaseLineTemp;
- FX_FLOAT fLineHeight = m_textParser.GetLineHeight(
+ float fLineHeight = m_textParser.GetLineHeight(
m_pTextProvider, pStyle.Get(), m_iLines == 0, fVerScale);
if (fBaseLineTemp > 0) {
- FX_FLOAT fLineHeightTmp = fBaseLineTemp + pTP->rtPiece.height;
+ float fLineHeightTmp = fBaseLineTemp + pTP->rtPiece.height;
if (fLineHeight < fLineHeightTmp)
fLineHeight = fLineHeightTmp;
else
@@ -1077,29 +1077,28 @@ void CXFA_TextLayout::AppendTextLine(CFX_BreakType dwStatus,
DoTabstops(pStyle.Get(), pPieceLine);
}
for (const auto& pTP : pPieceLine->m_textPieces) {
- FX_FLOAT& fTop = pTP->rtPiece.top;
- FX_FLOAT fBaseLineTemp = fTop;
+ float& fTop = pTP->rtPiece.top;
+ float fBaseLineTemp = fTop;
fTop = fLinePos + fLineStep - pTP->rtPiece.height - fBaseLineTemp;
fTop = std::max(0.0f, fTop);
}
fLinePos += fLineStep + fBaseLine;
} else {
- FX_FLOAT fLineStep = 0;
- FX_FLOAT fLineWidth = 0;
+ float fLineStep = 0;
+ float fLineWidth = 0;
for (int32_t i = 0; i < iPieces; i++) {
const CFX_BreakPiece* pPiece = m_pBreak->GetBreakPieceUnstable(i);
CXFA_TextUserData* pUserData =
static_cast<CXFA_TextUserData*>(pPiece->m_pUserData.Get());
if (pUserData)
pStyle = pUserData->m_pStyle;
- FX_FLOAT fVerScale = pPiece->m_iVerticalScale / 100.0f;
- FX_FLOAT fBaseLine =
- m_textParser.GetBaseline(m_pTextProvider, pStyle.Get());
- FX_FLOAT fLineHeight = m_textParser.GetLineHeight(
+ float fVerScale = pPiece->m_iVerticalScale / 100.0f;
+ float fBaseLine = m_textParser.GetBaseline(m_pTextProvider, pStyle.Get());
+ float fLineHeight = m_textParser.GetLineHeight(
m_pTextProvider, pStyle.Get(), m_iLines == 0, fVerScale);
if (fBaseLine > 0) {
- FX_FLOAT fLineHeightTmp =
- fBaseLine + (FX_FLOAT)pPiece->m_iFontSize * fVerScale / 20.0f;
+ float fLineHeightTmp =
+ fBaseLine + (float)pPiece->m_iFontSize * fVerScale / 20.0f;
if (fLineHeight < fLineHeightTmp) {
fLineHeight = fLineHeightTmp;
}
@@ -1110,7 +1109,7 @@ void CXFA_TextLayout::AppendTextLine(CFX_BreakType dwStatus,
fLinePos += fLineStep;
m_fMaxWidth = std::max(m_fMaxWidth, fLineWidth);
if (m_pLoader && m_pLoader->m_bSaveLineHeight) {
- FX_FLOAT fHeight = fLinePos - m_pLoader->m_fLastPos;
+ float fHeight = fLinePos - m_pLoader->m_fLastPos;
m_pLoader->m_fLastPos = fLinePos;
m_pLoader->m_lineHeights.Add(fHeight);
}
@@ -1122,12 +1121,12 @@ void CXFA_TextLayout::AppendTextLine(CFX_BreakType dwStatus,
if (!pStyle && bEndBreak) {
CXFA_Para para = m_pTextProvider->GetParaNode();
if (para) {
- FX_FLOAT fStartPos = para.GetMarginLeft();
- FX_FLOAT fIndent = para.GetTextIndent();
+ float fStartPos = para.GetMarginLeft();
+ float fIndent = para.GetTextIndent();
if (fIndent > 0)
fStartPos += fIndent;
- FX_FLOAT fSpaceBelow = para.GetSpaceBelow();
+ float fSpaceBelow = para.GetSpaceBelow();
if (fSpaceBelow < 0.1f)
fSpaceBelow = 0;
@@ -1138,12 +1137,12 @@ void CXFA_TextLayout::AppendTextLine(CFX_BreakType dwStatus,
}
if (pStyle) {
- FX_FLOAT fStart = 0;
+ float fStart = 0;
const FDE_CSSRect* pRect = pStyle->GetMarginWidth();
if (pRect)
fStart = pRect->left.GetValue();
- FX_FLOAT fTextIndent = pStyle->GetTextIndent().GetValue();
+ float fTextIndent = pStyle->GetTextIndent().GetValue();
if (fTextIndent < 0)
fStart -= fTextIndent;
@@ -1185,7 +1184,7 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice,
int32_t iChars = GetDisplayPos(pPiece, pCharPos);
if (iChars > 0) {
CFX_PointF pt1, pt2;
- FX_FLOAT fEndY = pCharPos[0].m_Origin.y + 1.05f;
+ float fEndY = pCharPos[0].m_Origin.y + 1.05f;
if (pPiece->iPeriod == XFA_ATTRIBUTEENUM_Word) {
for (int32_t i = 0; i < pPiece->iUnderline; i++) {
for (int32_t j = 0; j < iChars; j++) {
@@ -1244,8 +1243,8 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice,
if (iCharsTmp == 0)
return;
- FX_FLOAT fOrgX = 0.0f;
- FX_FLOAT fEndX = 0.0f;
+ float fOrgX = 0.0f;
+ float fEndX = 0.0f;
pPiece = pPieceLine->m_textPieces[iPiecePrev].get();
iChars = GetDisplayPos(pPiece, pCharPos);
if (iChars < 1)
@@ -1263,7 +1262,7 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice,
CFX_PointF pt2;
pt1.x = fOrgX;
pt2.x = fEndX;
- FX_FLOAT fEndY = pCharPos[0].m_Origin.y + 1.05f;
+ float fEndY = pCharPos[0].m_Origin.y + 1.05f;
for (int32_t i = 0; i < pPiece->iUnderline; i++) {
pt1.y = fEndY;
pt2.y = fEndY;
diff --git a/xfa/fxfa/app/cxfa_textlayout.h b/xfa/fxfa/app/cxfa_textlayout.h
index cbf3d33ad9..dcf415ac16 100644
--- a/xfa/fxfa/app/cxfa_textlayout.h
+++ b/xfa/fxfa/app/cxfa_textlayout.h
@@ -37,17 +37,17 @@ class CXFA_TextLayout {
~CXFA_TextLayout();
int32_t GetText(CFX_WideString& wsText);
- FX_FLOAT GetLayoutHeight();
- FX_FLOAT StartLayout(FX_FLOAT fWidth = -1);
+ float GetLayoutHeight();
+ float StartLayout(float fWidth = -1);
bool DoLayout(int32_t iBlockIndex,
- FX_FLOAT& fCalcHeight,
- FX_FLOAT fContentAreaHeight = -1,
- FX_FLOAT fTextHeight = -1);
+ float& fCalcHeight,
+ float fContentAreaHeight = -1,
+ float fTextHeight = -1);
bool CalcSize(const CFX_SizeF& minSize,
const CFX_SizeF& maxSize,
CFX_SizeF& defaultSize);
- bool Layout(const CFX_SizeF& size, FX_FLOAT* fHeight = nullptr);
+ bool Layout(const CFX_SizeF& size, float* fHeight = nullptr);
void ItemBlocks(const CFX_RectF& rtText, int32_t iBlockIndex);
bool DrawString(CFX_RenderDevice* pFxDevice,
const CFX_Matrix& tmDoc2Device,
@@ -66,22 +66,22 @@ class CXFA_TextLayout {
void GetTextDataNode();
CFDE_XMLNode* GetXMLContainerNode();
std::unique_ptr<CFX_RTFBreak> CreateBreak(bool bDefault);
- void InitBreak(FX_FLOAT fLineWidth);
+ void InitBreak(float fLineWidth);
void InitBreak(CFDE_CSSComputedStyle* pStyle,
FDE_CSSDisplay eDisplay,
- FX_FLOAT fLineWidth,
+ float fLineWidth,
CFDE_XMLNode* pXMLNode,
CFDE_CSSComputedStyle* pParentStyle = nullptr);
bool Loader(const CFX_SizeF& szText,
- FX_FLOAT& fLinePos,
+ float& fLinePos,
bool bSavePieces = true);
void LoadText(CXFA_Node* pNode,
const CFX_SizeF& szText,
- FX_FLOAT& fLinePos,
+ float& fLinePos,
bool bSavePieces);
bool LoadRichText(CFDE_XMLNode* pXMLNode,
const CFX_SizeF& szText,
- FX_FLOAT& fLinePos,
+ float& fLinePos,
const CFX_RetainPtr<CFDE_CSSComputedStyle>& pParentStyle,
bool bSavePieces,
CFX_RetainPtr<CXFA_LinkUserData> pLinkData,
@@ -89,17 +89,17 @@ class CXFA_TextLayout {
bool bIsOl = false,
int32_t iLiCount = 0);
bool AppendChar(const CFX_WideString& wsText,
- FX_FLOAT& fLinePos,
- FX_FLOAT fSpaceAbove,
+ float& fLinePos,
+ float fSpaceAbove,
bool bSavePieces);
void AppendTextLine(CFX_BreakType dwStatus,
- FX_FLOAT& fLinePos,
+ float& fLinePos,
bool bSavePieces,
bool bEndBreak = false);
- void EndBreak(CFX_BreakType dwStatus, FX_FLOAT& fLinePos, bool bDefault);
+ void EndBreak(CFX_BreakType dwStatus, float& fLinePos, bool bDefault);
bool IsEnd(bool bSavePieces);
void ProcessText(CFX_WideString& wsText);
- void UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom);
+ void UpdateAlign(float fHeight, float fBottom);
void RenderString(CFDE_RenderDevice* pDevice,
CFDE_Brush* pBrush,
CXFA_PieceLine* pPieceLine,
@@ -126,7 +126,7 @@ class CXFA_TextLayout {
std::unique_ptr<CFX_RTFBreak> m_pBreak;
std::unique_ptr<CXFA_LoaderContext> m_pLoader;
int32_t m_iLines;
- FX_FLOAT m_fMaxWidth;
+ float m_fMaxWidth;
CXFA_TextParser m_textParser;
std::vector<std::unique_ptr<CXFA_PieceLine>> m_pieceLines;
std::unique_ptr<CXFA_TextTabstopsContext> m_pTabstopContext;
diff --git a/xfa/fxfa/app/cxfa_textparser.cpp b/xfa/fxfa/app/cxfa_textparser.cpp
index 750a0baaff..6a9aeb04d8 100644
--- a/xfa/fxfa/app/cxfa_textparser.cpp
+++ b/xfa/fxfa/app/cxfa_textparser.cpp
@@ -67,7 +67,7 @@ void CXFA_TextParser::InitCSSData(CXFA_TextProvider* pTextProvider) {
CFGAS_FontMgr* pFontMgr = pDoc->GetApp()->GetFDEFontMgr();
ASSERT(pFontMgr);
m_pSelector = pdfium::MakeUnique<CFDE_CSSStyleSelector>(pFontMgr);
- FX_FLOAT fFontSize = 10;
+ float fFontSize = 10;
CXFA_Font font = pTextProvider->GetFontNode();
if (font) {
fFontSize = font.GetFontSize();
@@ -106,8 +106,8 @@ CFX_RetainPtr<CFDE_CSSComputedStyle> CXFA_TextParser::CreateRootStyle(
CXFA_Font font = pTextProvider->GetFontNode();
CXFA_Para para = pTextProvider->GetParaNode();
auto pStyle = m_pSelector->CreateComputedStyle(nullptr);
- FX_FLOAT fLineHeight = 0;
- FX_FLOAT fFontSize = 10;
+ float fLineHeight = 0;
+ float fFontSize = 10;
if (para) {
fLineHeight = para.GetLineHeight();
@@ -171,7 +171,7 @@ CFX_RetainPtr<CFDE_CSSComputedStyle> CXFA_TextParser::CreateStyle(
return pNewStyle;
uint32_t dwDecoration = pParentStyle->GetTextDecoration();
- FX_FLOAT fBaseLine = 0;
+ float fBaseLine = 0;
if (pParentStyle->GetVerticalAlign() == FDE_CSSVerticalAlign::Number)
fBaseLine = pParentStyle->GetNumberVerticalAlign();
@@ -307,7 +307,7 @@ int32_t CXFA_TextParser::GetVAlign(CXFA_TextProvider* pTextProvider) const {
return para ? para.GetVerticalAlign() : XFA_ATTRIBUTEENUM_Top;
}
-FX_FLOAT CXFA_TextParser::GetTabInterval(CFDE_CSSComputedStyle* pStyle) const {
+float CXFA_TextParser::GetTabInterval(CFDE_CSSComputedStyle* pStyle) const {
CFX_WideString wsValue;
if (pStyle && pStyle->GetCustomStyle(L"tab-interval", wsValue))
return CXFA_Measurement(wsValue.AsStringC()).ToUnit(XFA_UNIT_Pt);
@@ -361,8 +361,8 @@ CFX_RetainPtr<CFGAS_GEFont> CXFA_TextParser::GetFont(
return pFontMgr->GetFont(pDoc, wsFamily, dwStyle);
}
-FX_FLOAT CXFA_TextParser::GetFontSize(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle) const {
+float CXFA_TextParser::GetFontSize(CXFA_TextProvider* pTextProvider,
+ CFDE_CSSComputedStyle* pStyle) const {
if (pStyle)
return pStyle->GetFontSize();
@@ -466,8 +466,8 @@ FX_ARGB CXFA_TextParser::GetColor(CXFA_TextProvider* pTextProvider,
return 0xFF000000;
}
-FX_FLOAT CXFA_TextParser::GetBaseline(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle) const {
+float CXFA_TextParser::GetBaseline(CXFA_TextProvider* pTextProvider,
+ CFDE_CSSComputedStyle* pStyle) const {
if (pStyle) {
if (pStyle->GetVerticalAlign() == FDE_CSSVerticalAlign::Number)
return pStyle->GetNumberVerticalAlign();
@@ -477,18 +477,18 @@ FX_FLOAT CXFA_TextParser::GetBaseline(CXFA_TextProvider* pTextProvider,
return 0;
}
-FX_FLOAT CXFA_TextParser::GetLineHeight(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle,
- bool bFirst,
- FX_FLOAT fVerScale) const {
- FX_FLOAT fLineHeight = 0;
+float CXFA_TextParser::GetLineHeight(CXFA_TextProvider* pTextProvider,
+ CFDE_CSSComputedStyle* pStyle,
+ bool bFirst,
+ float fVerScale) const {
+ float fLineHeight = 0;
if (pStyle)
fLineHeight = pStyle->GetLineHeight();
else if (CXFA_Para para = pTextProvider->GetParaNode())
fLineHeight = para.GetLineHeight();
if (bFirst) {
- FX_FLOAT fFontSize = GetFontSize(pTextProvider, pStyle);
+ float fFontSize = GetFontSize(pTextProvider, pStyle);
if (fLineHeight < 0.1f)
fLineHeight = fFontSize;
else
@@ -618,7 +618,7 @@ bool CXFA_TextParser::GetTabstops(CFDE_CSSComputedStyle* pStyle,
if (ch == ' ') {
uint32_t dwHashCode = FX_HashCode_GetW(wsAlign.AsStringC(), true);
CXFA_Measurement ms(CFX_WideStringC(pTabStops + iLast, iCur - iLast));
- FX_FLOAT fPos = ms.ToUnit(XFA_UNIT_Pt);
+ float fPos = ms.ToUnit(XFA_UNIT_Pt);
pTabstopContext->Append(dwHashCode, fPos);
wsAlign.clear();
eStatus = TabStopStatus::None;
@@ -633,7 +633,7 @@ bool CXFA_TextParser::GetTabstops(CFDE_CSSComputedStyle* pStyle,
if (!wsAlign.IsEmpty()) {
uint32_t dwHashCode = FX_HashCode_GetW(wsAlign.AsStringC(), true);
CXFA_Measurement ms(CFX_WideStringC(pTabStops + iLast, iCur - iLast));
- FX_FLOAT fPos = ms.ToUnit(XFA_UNIT_Pt);
+ float fPos = ms.ToUnit(XFA_UNIT_Pt);
pTabstopContext->Append(dwHashCode, fPos);
}
return true;
diff --git a/xfa/fxfa/app/cxfa_textparser.h b/xfa/fxfa/app/cxfa_textparser.h
index 86da502dbf..524f125665 100644
--- a/xfa/fxfa/app/cxfa_textparser.h
+++ b/xfa/fxfa/app/cxfa_textparser.h
@@ -43,7 +43,7 @@ class CXFA_TextParser {
int32_t GetVAlign(CXFA_TextProvider* pTextProvider) const;
- FX_FLOAT GetTabInterval(CFDE_CSSComputedStyle* pStyle) const;
+ float GetTabInterval(CFDE_CSSComputedStyle* pStyle) const;
int32_t CountTabs(CFDE_CSSComputedStyle* pStyle) const;
bool IsSpaceRun(CFDE_CSSComputedStyle* pStyle) const;
@@ -52,8 +52,8 @@ class CXFA_TextParser {
CFX_RetainPtr<CFGAS_GEFont> GetFont(CXFA_TextProvider* pTextProvider,
CFDE_CSSComputedStyle* pStyle) const;
- FX_FLOAT GetFontSize(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle) const;
+ float GetFontSize(CXFA_TextProvider* pTextProvider,
+ CFDE_CSSComputedStyle* pStyle) const;
int32_t GetHorScale(CXFA_TextProvider* pTextProvider,
CFDE_CSSComputedStyle* pStyle,
@@ -70,12 +70,12 @@ class CXFA_TextParser {
int32_t& iLinethrough) const;
FX_ARGB GetColor(CXFA_TextProvider* pTextProvider,
CFDE_CSSComputedStyle* pStyle) const;
- FX_FLOAT GetBaseline(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle) const;
- FX_FLOAT GetLineHeight(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle,
- bool bFirst,
- FX_FLOAT fVerScale) const;
+ float GetBaseline(CXFA_TextProvider* pTextProvider,
+ CFDE_CSSComputedStyle* pStyle) const;
+ float GetLineHeight(CXFA_TextProvider* pTextProvider,
+ CFDE_CSSComputedStyle* pStyle,
+ bool bFirst,
+ float fVerScale) const;
bool GetEmbbedObj(CXFA_TextProvider* pTextProvider,
CFDE_XMLNode* pXMLNode,
diff --git a/xfa/fxfa/app/cxfa_texttabstopscontext.cpp b/xfa/fxfa/app/cxfa_texttabstopscontext.cpp
index 3209603af3..b654e87a04 100644
--- a/xfa/fxfa/app/cxfa_texttabstopscontext.cpp
+++ b/xfa/fxfa/app/cxfa_texttabstopscontext.cpp
@@ -15,7 +15,7 @@ CXFA_TextTabstopsContext::CXFA_TextTabstopsContext()
CXFA_TextTabstopsContext::~CXFA_TextTabstopsContext() {}
-void CXFA_TextTabstopsContext::Append(uint32_t dwAlign, FX_FLOAT fTabstops) {
+void CXFA_TextTabstopsContext::Append(uint32_t dwAlign, float fTabstops) {
int32_t i = 0;
for (i = 0; i < m_iTabCount; i++) {
XFA_TABSTOPS* pTabstop = m_tabstops.GetDataPtr(i);
diff --git a/xfa/fxfa/app/cxfa_texttabstopscontext.h b/xfa/fxfa/app/cxfa_texttabstopscontext.h
index 8fe0e6273f..64b83a4421 100644
--- a/xfa/fxfa/app/cxfa_texttabstopscontext.h
+++ b/xfa/fxfa/app/cxfa_texttabstopscontext.h
@@ -11,7 +11,7 @@
struct XFA_TABSTOPS {
uint32_t dwAlign;
- FX_FLOAT fTabstops;
+ float fTabstops;
};
class CXFA_TextTabstopsContext {
@@ -19,7 +19,7 @@ class CXFA_TextTabstopsContext {
CXFA_TextTabstopsContext();
~CXFA_TextTabstopsContext();
- void Append(uint32_t dwAlign, FX_FLOAT fTabstops);
+ void Append(uint32_t dwAlign, float fTabstops);
void RemoveAll();
void Reset();
@@ -27,8 +27,8 @@ class CXFA_TextTabstopsContext {
int32_t m_iTabCount;
int32_t m_iTabIndex;
bool m_bTabstops;
- FX_FLOAT m_fTabWidth;
- FX_FLOAT m_fLeft;
+ float m_fTabWidth;
+ float m_fLeft;
};
#endif // XFA_FXFA_APP_CXFA_TEXTTABSTOPSCONTEXT_H_
diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp
index 3bbef30d06..6b13069ed2 100644
--- a/xfa/fxfa/app/xfa_ffbarcode.cpp
+++ b/xfa/fxfa/app/xfa_ffbarcode.cpp
@@ -176,7 +176,7 @@ void CXFA_FFBarcode::UpdateWidgetProperty() {
int32_t intVal;
char charVal;
bool boolVal;
- FX_FLOAT floatVal;
+ float floatVal;
if (pAcc->GetBarcodeAttribute_CharEncoding(intVal)) {
pBarCodeWidget->SetCharEncoding((BC_CHAR_ENCODING)intVal);
}
diff --git a/xfa/fxfa/app/xfa_ffcheckbutton.cpp b/xfa/fxfa/app/xfa_ffcheckbutton.cpp
index f088b5d4dd..22fdb3d9df 100644
--- a/xfa/fxfa/app/xfa_ffcheckbutton.cpp
+++ b/xfa/fxfa/app/xfa_ffcheckbutton.cpp
@@ -49,7 +49,7 @@ void CXFA_FFCheckButton::UpdateWidgetProperty() {
if (!m_pNormalWidget) {
return;
}
- FX_FLOAT fSize = m_pDataAcc->GetCheckButtonSize();
+ float fSize = m_pDataAcc->GetCheckButtonSize();
pCheckBox->SetBoxSize(fSize);
uint32_t dwStyleEx = FWL_STYLEEXT_CKB_SignShapeCross;
int32_t iCheckMark = m_pDataAcc->GetCheckButtonMark();
@@ -86,14 +86,14 @@ void CXFA_FFCheckButton::UpdateWidgetProperty() {
}
bool CXFA_FFCheckButton::PerformLayout() {
CXFA_FFWidget::PerformLayout();
- FX_FLOAT fCheckSize = m_pDataAcc->GetCheckButtonSize();
+ float fCheckSize = m_pDataAcc->GetCheckButtonSize();
CXFA_Margin mgWidget = m_pDataAcc->GetMargin();
CFX_RectF rtWidget = GetRectWithoutRotate();
if (mgWidget) {
XFA_RectWidthoutMargin(rtWidget, mgWidget);
}
int32_t iCapPlacement = -1;
- FX_FLOAT fCapReserve = 0;
+ float fCapReserve = 0;
CXFA_Caption caption = m_pDataAcc->GetCaption();
if (caption && caption.GetPresence()) {
m_rtCaption = rtWidget;
@@ -189,8 +189,8 @@ void CXFA_FFCheckButton::CapLeftRightPlacement(CXFA_Margin mgCap) {
void CXFA_FFCheckButton::AddUIMargin(int32_t iCapPlacement) {
CFX_RectF rtUIMargin = m_pDataAcc->GetUIMargin();
m_rtUI.top -= rtUIMargin.top / 2 - rtUIMargin.height / 2;
- FX_FLOAT fLeftAddRight = rtUIMargin.left + rtUIMargin.width;
- FX_FLOAT fTopAddBottom = rtUIMargin.top + rtUIMargin.height;
+ float fLeftAddRight = rtUIMargin.left + rtUIMargin.width;
+ float fTopAddBottom = rtUIMargin.top + rtUIMargin.height;
if (m_rtUI.width < fLeftAddRight) {
if (iCapPlacement == XFA_ATTRIBUTEENUM_Right ||
iCapPlacement == XFA_ATTRIBUTEENUM_Left) {
diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp
index 630d04311f..06763be094 100644
--- a/xfa/fxfa/app/xfa_fffield.cpp
+++ b/xfa/fxfa/app/xfa_fffield.cpp
@@ -94,7 +94,7 @@ void CXFA_FFField::DrawFocus(CFX_Graphics* pGS, CFX_Matrix* pMatrix) {
if (m_dwStatus & XFA_WidgetStatus_Focused) {
CFX_Color cr(0xFF000000);
pGS->SetStrokeColor(&cr);
- FX_FLOAT DashPattern[2] = {1, 1};
+ float DashPattern[2] = {1, 1};
pGS->SetLineDash(0.0f, DashPattern, 2);
pGS->SetLineWidth(0, false);
@@ -124,7 +124,7 @@ void CXFA_FFField::SetEditScrollOffset() {
XFA_Element eType = m_pDataAcc->GetUIType();
if (eType == XFA_Element::TextEdit || eType == XFA_Element::NumericEdit ||
eType == XFA_Element::PasswordEdit) {
- FX_FLOAT fScrollOffset = 0;
+ float fScrollOffset = 0;
CXFA_FFField* pPrev = static_cast<CXFA_FFField*>(GetPrev());
if (pPrev) {
CFX_RectF rtMargin = m_pDataAcc->GetUIMargin();
@@ -153,7 +153,7 @@ void CXFA_FFField::CapPlacement() {
CXFA_Margin mgWidget = m_pDataAcc->GetMargin();
if (mgWidget) {
CXFA_LayoutItem* pItem = this;
- FX_FLOAT fLeftInset = 0, fRightInset = 0, fTopInset = 0, fBottomInset = 0;
+ float fLeftInset = 0, fRightInset = 0, fTopInset = 0, fBottomInset = 0;
mgWidget.GetLeftInset(fLeftInset);
mgWidget.GetRightInset(fRightInset);
mgWidget.GetTopInset(fTopInset);
@@ -171,7 +171,7 @@ void CXFA_FFField::CapPlacement() {
}
XFA_ATTRIBUTEENUM iCapPlacement = XFA_ATTRIBUTEENUM_Unknown;
- FX_FLOAT fCapReserve = 0;
+ float fCapReserve = 0;
CXFA_Caption caption = m_pDataAcc->GetCaption();
if (caption && caption.GetPresence() != XFA_ATTRIBUTEENUM_Hidden) {
iCapPlacement = (XFA_ATTRIBUTEENUM)caption.GetPlacementType();
@@ -260,8 +260,8 @@ void CXFA_FFField::CapTopBottomPlacement(CXFA_Caption caption,
m_rtCaption.top += m_rtCaption.height;
}
}
- FX_FLOAT fWidth = rtUIMargin.left + rtUIMargin.width;
- FX_FLOAT fHeight = m_rtCaption.height + rtUIMargin.top + rtUIMargin.height;
+ float fWidth = rtUIMargin.left + rtUIMargin.width;
+ float fHeight = m_rtCaption.height + rtUIMargin.top + rtUIMargin.height;
if (fWidth > rtWidget.width) {
m_rtUI.width += fWidth - rtWidget.width;
}
@@ -287,8 +287,8 @@ void CXFA_FFField::CapLeftRightPlacement(CXFA_Caption caption,
m_rtCaption.top += m_rtCaption.height;
}
}
- FX_FLOAT fWidth = m_rtCaption.width + rtUIMargin.left + rtUIMargin.width;
- FX_FLOAT fHeight = rtUIMargin.top + rtUIMargin.height;
+ float fWidth = m_rtCaption.width + rtUIMargin.left + rtUIMargin.width;
+ float fHeight = rtUIMargin.top + rtUIMargin.height;
if (fWidth > rtWidget.width) {
m_rtUI.width += fWidth - rtWidget.width;
if (iCapPlacement == XFA_ATTRIBUTEENUM_Right) {
@@ -323,7 +323,7 @@ void CXFA_FFField::SetFWLRect() {
if (rtUi.width < 1.0)
rtUi.width = 1.0;
if (!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) {
- FX_FLOAT fFontSize = m_pDataAcc->GetFontSize();
+ float fFontSize = m_pDataAcc->GetFontSize();
if (rtUi.height < fFontSize) {
rtUi.height = fFontSize;
}
@@ -563,7 +563,7 @@ void CXFA_FFField::LayoutCaption() {
if (!pCapTextLayout)
return;
- FX_FLOAT fHeight = 0;
+ float fHeight = 0;
pCapTextLayout->Layout(CFX_SizeF(m_rtCaption.width, m_rtCaption.height),
&fHeight);
if (m_rtCaption.height < fHeight)
diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp
index a0b834b96b..ce6d7db4e2 100644
--- a/xfa/fxfa/app/xfa_ffnotify.cpp
+++ b/xfa/fxfa/app/xfa_ffnotify.cpp
@@ -171,8 +171,8 @@ CXFA_LayoutItem* CXFA_FFNotify::OnCreateLayoutItem(CXFA_Node* pNode) {
}
void CXFA_FFNotify::StartFieldDrawLayout(CXFA_Node* pItem,
- FX_FLOAT& fCalcWidth,
- FX_FLOAT& fCalcHeight) {
+ float& fCalcWidth,
+ float& fCalcHeight) {
CXFA_WidgetAcc* pAcc = static_cast<CXFA_WidgetAcc*>(pItem->GetWidgetData());
if (!pAcc)
return;
@@ -182,7 +182,7 @@ void CXFA_FFNotify::StartFieldDrawLayout(CXFA_Node* pItem,
bool CXFA_FFNotify::FindSplitPos(CXFA_Node* pItem,
int32_t iBlockIndex,
- FX_FLOAT& fCalcHeightPos) {
+ float& fCalcHeightPos) {
CXFA_WidgetAcc* pAcc = static_cast<CXFA_WidgetAcc*>(pItem->GetWidgetData());
return pAcc && pAcc->FindSplitPos(iBlockIndex, fCalcHeightPos);
}
diff --git a/xfa/fxfa/app/xfa_ffnotify.h b/xfa/fxfa/app/xfa_ffnotify.h
index f76d35b639..c002ed4c15 100644
--- a/xfa/fxfa/app/xfa_ffnotify.h
+++ b/xfa/fxfa/app/xfa_ffnotify.h
@@ -44,11 +44,11 @@ class CXFA_FFNotify {
CXFA_LayoutItem* pSender);
void StartFieldDrawLayout(CXFA_Node* pItem,
- FX_FLOAT& fCalcWidth,
- FX_FLOAT& fCalcHeight);
+ float& fCalcWidth,
+ float& fCalcHeight);
bool FindSplitPos(CXFA_Node* pItem,
int32_t iBlockIndex,
- FX_FLOAT& fCalcHeightPos);
+ float& fCalcHeightPos);
bool RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem);
int32_t ExecEventByDeepFirst(CXFA_Node* pFormNode,
XFA_EVENTTYPE eEventType,
diff --git a/xfa/fxfa/app/xfa_ffpageview.cpp b/xfa/fxfa/app/xfa_ffpageview.cpp
index 181f0f19a5..d54e1472a1 100644
--- a/xfa/fxfa/app/xfa_ffpageview.cpp
+++ b/xfa/fxfa/app/xfa_ffpageview.cpp
@@ -35,37 +35,29 @@ CFX_Matrix GetPageMatrix(const CFX_RectF& docPageRect,
bool bFlipY = (dwCoordinatesType & 0x02) != 0;
CFX_Matrix m((bFlipX ? -1.0f : 1.0f), 0, 0, (bFlipY ? -1.0f : 1.0f), 0, 0);
if (iRotate == 0 || iRotate == 2) {
- m.a *= (FX_FLOAT)devicePageRect.width / docPageRect.width;
- m.d *= (FX_FLOAT)devicePageRect.height / docPageRect.height;
+ m.a *= (float)devicePageRect.width / docPageRect.width;
+ m.d *= (float)devicePageRect.height / docPageRect.height;
} else {
- m.a *= (FX_FLOAT)devicePageRect.height / docPageRect.width;
- m.d *= (FX_FLOAT)devicePageRect.width / docPageRect.height;
+ m.a *= (float)devicePageRect.height / docPageRect.width;
+ m.d *= (float)devicePageRect.width / docPageRect.height;
}
m.Rotate(iRotate * 1.57079632675f);
switch (iRotate) {
case 0:
- m.e = bFlipX ? (FX_FLOAT)devicePageRect.right()
- : (FX_FLOAT)devicePageRect.left;
- m.f = bFlipY ? (FX_FLOAT)devicePageRect.bottom()
- : (FX_FLOAT)devicePageRect.top;
+ m.e = bFlipX ? (float)devicePageRect.right() : (float)devicePageRect.left;
+ m.f = bFlipY ? (float)devicePageRect.bottom() : (float)devicePageRect.top;
break;
case 1:
- m.e = bFlipY ? (FX_FLOAT)devicePageRect.left
- : (FX_FLOAT)devicePageRect.right();
- m.f = bFlipX ? (FX_FLOAT)devicePageRect.bottom()
- : (FX_FLOAT)devicePageRect.top;
+ m.e = bFlipY ? (float)devicePageRect.left : (float)devicePageRect.right();
+ m.f = bFlipX ? (float)devicePageRect.bottom() : (float)devicePageRect.top;
break;
case 2:
- m.e = bFlipX ? (FX_FLOAT)devicePageRect.left
- : (FX_FLOAT)devicePageRect.right();
- m.f = bFlipY ? (FX_FLOAT)devicePageRect.top
- : (FX_FLOAT)devicePageRect.bottom();
+ m.e = bFlipX ? (float)devicePageRect.left : (float)devicePageRect.right();
+ m.f = bFlipY ? (float)devicePageRect.top : (float)devicePageRect.bottom();
break;
case 3:
- m.e = bFlipY ? (FX_FLOAT)devicePageRect.right()
- : (FX_FLOAT)devicePageRect.left;
- m.f = bFlipX ? (FX_FLOAT)devicePageRect.top
- : (FX_FLOAT)devicePageRect.bottom();
+ m.e = bFlipY ? (float)devicePageRect.right() : (float)devicePageRect.left;
+ m.f = bFlipX ? (float)devicePageRect.top : (float)devicePageRect.bottom();
break;
default:
break;
@@ -367,7 +359,7 @@ static int32_t XFA_TabOrderWidgetComparator(const void* phWidget1,
auto* param2 = *static_cast<CXFA_TabParam**>(const_cast<void*>(phWidget2));
CFX_RectF rt1 = param1->m_pWidget->GetWidgetRect();
CFX_RectF rt2 = param2->m_pWidget->GetWidgetRect();
- FX_FLOAT x1 = rt1.left, y1 = rt1.top, x2 = rt2.left, y2 = rt2.top;
+ float x1 = rt1.left, y1 = rt1.top, x2 = rt2.left, y2 = rt2.top;
if (y1 < y2 || (y1 - y2 < XFA_FLOAT_PERCISION && x1 < x2))
return -1;
return 1;
diff --git a/xfa/fxfa/app/xfa_ffpath.cpp b/xfa/fxfa/app/xfa_ffpath.cpp
index 43016fe5c6..186d1b1dbd 100644
--- a/xfa/fxfa/app/xfa_ffpath.cpp
+++ b/xfa/fxfa/app/xfa_ffpath.cpp
@@ -20,8 +20,8 @@ CXFA_FFLine::~CXFA_FFLine() {}
void CXFA_FFLine::GetRectFromHand(CFX_RectF& rect,
int32_t iHand,
- FX_FLOAT fLineWidth) {
- FX_FLOAT fHalfWidth = fLineWidth / 2.0f;
+ float fLineWidth) {
+ float fHalfWidth = fLineWidth / 2.0f;
if (rect.height < 1.0f) {
switch (iHand) {
case XFA_ATTRIBUTEENUM_Left:
@@ -64,7 +64,7 @@ void CXFA_FFLine::RenderWidget(CFX_Graphics* pGS,
CXFA_Line lineObj = value.GetLine();
FX_ARGB lineColor = 0xFF000000;
int32_t iStrokeType = 0;
- FX_FLOAT fLineWidth = 1.0f;
+ float fLineWidth = 1.0f;
int32_t iCap = 0;
CXFA_Edge edge = lineObj.GetEdge();
if (edge) {
diff --git a/xfa/fxfa/app/xfa_ffpath.h b/xfa/fxfa/app/xfa_ffpath.h
index 002f75d262..6df53f4e1d 100644
--- a/xfa/fxfa/app/xfa_ffpath.h
+++ b/xfa/fxfa/app/xfa_ffpath.h
@@ -20,7 +20,7 @@ class CXFA_FFLine : public CXFA_FFDraw {
uint32_t dwStatus) override;
private:
- void GetRectFromHand(CFX_RectF& rect, int32_t iHand, FX_FLOAT fLineWidth);
+ void GetRectFromHand(CFX_RectF& rect, int32_t iHand, float fLineWidth);
};
class CXFA_FFArc : public CXFA_FFDraw {
diff --git a/xfa/fxfa/app/xfa_ffpushbutton.cpp b/xfa/fxfa/app/xfa_ffpushbutton.cpp
index 7b6be82035..7989e3207d 100644
--- a/xfa/fxfa/app/xfa_ffpushbutton.cpp
+++ b/xfa/fxfa/app/xfa_ffpushbutton.cpp
@@ -117,7 +117,7 @@ bool CXFA_FFPushButton::PerformLayout() {
return true;
}
-FX_FLOAT CXFA_FFPushButton::GetLineWidth() {
+float CXFA_FFPushButton::GetLineWidth() {
CXFA_Border border = m_pDataAcc->GetBorder();
if (border && border.GetPresence() == XFA_ATTRIBUTEENUM_Visible) {
CXFA_Edge edge = border.GetEdge(0);
@@ -210,7 +210,7 @@ void CXFA_FFPushButton::OnDrawWidget(CFX_Graphics* pGraphics,
if ((m_pNormalWidget->GetStates() & FWL_STATE_PSB_Pressed) &&
(m_pNormalWidget->GetStates() & FWL_STATE_PSB_Hovered)) {
CFX_RectF rtFill(0, 0, m_pNormalWidget->GetWidgetRect().Size());
- FX_FLOAT fLineWith = GetLineWidth();
+ float fLineWith = GetLineWidth();
rtFill.Deflate(fLineWith, fLineWith);
CFX_Color cr(FXARGB_MAKE(128, 128, 255, 255));
pGraphics->SetFillColor(&cr);
@@ -223,7 +223,7 @@ void CXFA_FFPushButton::OnDrawWidget(CFX_Graphics* pGraphics,
XFA_FWL_PSBSTYLEEXT_HiliteOutLine) {
if ((m_pNormalWidget->GetStates() & FWL_STATE_PSB_Pressed) &&
(m_pNormalWidget->GetStates() & FWL_STATE_PSB_Hovered)) {
- FX_FLOAT fLineWidth = GetLineWidth();
+ float fLineWidth = GetLineWidth();
CFX_Color cr(FXARGB_MAKE(255, 128, 255, 255));
pGraphics->SetStrokeColor(&cr);
pGraphics->SetLineWidth(fLineWidth);
diff --git a/xfa/fxfa/app/xfa_ffpushbutton.h b/xfa/fxfa/app/xfa_ffpushbutton.h
index eb18ccb11c..70853e8942 100644
--- a/xfa/fxfa/app/xfa_ffpushbutton.h
+++ b/xfa/fxfa/app/xfa_ffpushbutton.h
@@ -38,7 +38,7 @@ class CXFA_FFPushButton : public CXFA_FFField {
void LoadHighlightCaption();
void LayoutHighlightCaption();
void RenderHighlightCaption(CFX_Graphics* pGS, CFX_Matrix* pMatrix = nullptr);
- FX_FLOAT GetLineWidth();
+ float GetLineWidth();
FX_ARGB GetLineColor();
FX_ARGB GetFillColor();
diff --git a/xfa/fxfa/app/xfa_fftext.cpp b/xfa/fxfa/app/xfa_fftext.cpp
index 04de9d918a..c4b533f855 100644
--- a/xfa/fxfa/app/xfa_fftext.cpp
+++ b/xfa/fxfa/app/xfa_fftext.cpp
@@ -46,10 +46,10 @@ void CXFA_FFText::RenderWidget(CFX_Graphics* pGS,
if (!pItem->GetPrev() && !pItem->GetNext()) {
XFA_RectWidthoutMargin(rtText, mgWidget);
} else {
- FX_FLOAT fLeftInset;
- FX_FLOAT fRightInset;
- FX_FLOAT fTopInset = 0;
- FX_FLOAT fBottomInset = 0;
+ float fLeftInset;
+ float fRightInset;
+ float fTopInset = 0;
+ float fBottomInset = 0;
mgWidget.GetLeftInset(fLeftInset);
mgWidget.GetRightInset(fRightInset);
if (!pItem->GetPrev())
@@ -91,11 +91,11 @@ bool CXFA_FFText::PerformLayout() {
CFX_RectF rtText = pItem->GetRect(false);
if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin()) {
if (!pItem->GetPrev()) {
- FX_FLOAT fTopInset;
+ float fTopInset;
mgWidget.GetTopInset(fTopInset);
rtText.height -= fTopInset;
} else if (!pItem->GetNext()) {
- FX_FLOAT fBottomInset;
+ float fBottomInset;
mgWidget.GetBottomInset(fBottomInset);
rtText.height -= fBottomInset;
}
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index ad175349f6..43bb32feec 100644
--- a/xfa/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/fxfa/app/xfa_ffwidget.cpp
@@ -57,7 +57,7 @@ CFX_RectF CXFA_FFWidget::RecacheWidgetRect() {
CFX_RectF CXFA_FFWidget::GetRectWithoutRotate() {
CFX_RectF rtWidget = GetWidgetRect();
- FX_FLOAT fValue = 0;
+ float fValue = 0;
switch (m_pDataAcc->GetRotate()) {
case 90:
rtWidget.top = rtWidget.bottom();
@@ -357,8 +357,8 @@ static void XFA_GetMatrix(CFX_Matrix& m,
if (!iRotate) {
return;
}
- FX_FLOAT fAnchorX = 0;
- FX_FLOAT fAnchorY = 0;
+ float fAnchorX = 0;
+ float fAnchorY = 0;
switch (at) {
case XFA_ATTRIBUTEENUM_TopLeft:
fAnchorX = rt.left, fAnchorY = rt.top;
@@ -502,7 +502,7 @@ int32_t XFA_StrokeTypeSetLineDash(CFX_Graphics* pGraphics,
int32_t iCapType) {
switch (iStrokeType) {
case XFA_ATTRIBUTEENUM_DashDot: {
- FX_FLOAT dashArray[] = {4, 1, 2, 1};
+ float dashArray[] = {4, 1, 2, 1};
if (iCapType != XFA_ATTRIBUTEENUM_Butt) {
dashArray[1] = 2;
dashArray[3] = 2;
@@ -511,7 +511,7 @@ int32_t XFA_StrokeTypeSetLineDash(CFX_Graphics* pGraphics,
return FX_DASHSTYLE_DashDot;
}
case XFA_ATTRIBUTEENUM_DashDotDot: {
- FX_FLOAT dashArray[] = {4, 1, 2, 1, 2, 1};
+ float dashArray[] = {4, 1, 2, 1, 2, 1};
if (iCapType != XFA_ATTRIBUTEENUM_Butt) {
dashArray[1] = 2;
dashArray[3] = 2;
@@ -521,7 +521,7 @@ int32_t XFA_StrokeTypeSetLineDash(CFX_Graphics* pGraphics,
return FX_DASHSTYLE_DashDotDot;
}
case XFA_ATTRIBUTEENUM_Dashed: {
- FX_FLOAT dashArray[] = {5, 1};
+ float dashArray[] = {5, 1};
if (iCapType != XFA_ATTRIBUTEENUM_Butt) {
dashArray[1] = 2;
}
@@ -529,7 +529,7 @@ int32_t XFA_StrokeTypeSetLineDash(CFX_Graphics* pGraphics,
return FX_DASHSTYLE_Dash;
}
case XFA_ATTRIBUTEENUM_Dotted: {
- FX_FLOAT dashArray[] = {2, 1};
+ float dashArray[] = {2, 1};
if (iCapType != XFA_ATTRIBUTEENUM_Butt) {
dashArray[1] = 2;
}
@@ -849,12 +849,12 @@ void XFA_DrawImage(CFX_Graphics* pGS,
CFX_RectF rtFit(
rtImage.TopLeft(),
- XFA_UnitPx2Pt((FX_FLOAT)pDIBitmap->GetWidth(), (FX_FLOAT)iImageXDpi),
- XFA_UnitPx2Pt((FX_FLOAT)pDIBitmap->GetHeight(), (FX_FLOAT)iImageYDpi));
+ XFA_UnitPx2Pt((float)pDIBitmap->GetWidth(), (float)iImageXDpi),
+ XFA_UnitPx2Pt((float)pDIBitmap->GetHeight(), (float)iImageYDpi));
switch (iAspect) {
case XFA_ATTRIBUTEENUM_Fit: {
- FX_FLOAT f1 = rtImage.height / rtFit.height;
- FX_FLOAT f2 = rtImage.width / rtFit.width;
+ float f1 = rtImage.height / rtFit.height;
+ float f2 = rtImage.width / rtFit.width;
f1 = std::min(f1, f2);
rtFit.height = rtFit.height * f1;
rtFit.width = rtFit.width * f1;
@@ -862,7 +862,7 @@ void XFA_DrawImage(CFX_Graphics* pGS,
case XFA_ATTRIBUTEENUM_Actual:
break;
case XFA_ATTRIBUTEENUM_Height: {
- FX_FLOAT f1 = rtImage.height / rtFit.height;
+ float f1 = rtImage.height / rtFit.height;
rtFit.height = rtImage.height;
rtFit.width = f1 * rtFit.width;
} break;
@@ -871,7 +871,7 @@ void XFA_DrawImage(CFX_Graphics* pGS,
rtFit.width = rtImage.width;
break;
case XFA_ATTRIBUTEENUM_Width: {
- FX_FLOAT f1 = rtImage.width / rtFit.width;
+ float f1 = rtImage.width / rtFit.width;
rtFit.width = rtImage.width;
rtFit.height = rtFit.height * f1;
} break;
@@ -1137,8 +1137,8 @@ CFX_DIBitmap* XFA_LoadImageFromBuffer(
dibAttr.m_nYDPI = (int32_t)(dibAttr.m_nYDPI * 2.54f);
break;
case FXCODEC_RESUNIT_METER:
- dibAttr.m_nXDPI = (int32_t)(dibAttr.m_nXDPI / (FX_FLOAT)100 * 2.54f);
- dibAttr.m_nYDPI = (int32_t)(dibAttr.m_nYDPI / (FX_FLOAT)100 * 2.54f);
+ dibAttr.m_nXDPI = (int32_t)(dibAttr.m_nXDPI / (float)100 * 2.54f);
+ dibAttr.m_nYDPI = (int32_t)(dibAttr.m_nYDPI / (float)100 * 2.54f);
break;
default:
break;
@@ -1171,7 +1171,7 @@ void XFA_RectWidthoutMargin(CFX_RectF& rt, const CXFA_Margin& mg, bool bUI) {
if (!mg) {
return;
}
- FX_FLOAT fLeftInset, fTopInset, fRightInset, fBottomInset;
+ float fLeftInset, fTopInset, fRightInset, fBottomInset;
mg.GetLeftInset(fLeftInset);
mg.GetTopInset(fTopInset);
mg.GetRightInset(fRightInset);
@@ -1191,7 +1191,7 @@ static void XFA_BOX_GetPath_Arc(CXFA_Box box,
CFX_RectF rtDraw,
CFX_Path& fillPath,
uint32_t dwFlags) {
- FX_FLOAT a, b;
+ float a, b;
a = rtDraw.width / 2.0f;
b = rtDraw.height / 2.0f;
if (box.IsCircular() || (dwFlags & XFA_DRAWBOX_ForceRound) != 0) {
@@ -1202,7 +1202,7 @@ static void XFA_BOX_GetPath_Arc(CXFA_Box box,
rtDraw.top = center.y - b;
rtDraw.width = a + a;
rtDraw.height = b + b;
- FX_FLOAT startAngle = 0, sweepAngle = 360;
+ float startAngle = 0, sweepAngle = 360;
bool bStart = box.GetStartAngle(startAngle);
bool bEnd = box.GetSweepAngle(sweepAngle);
if (!bStart && !bEnd) {
@@ -1225,14 +1225,14 @@ static void XFA_BOX_GetPath(CXFA_Box box,
int32_t n = (nIndex & 1) ? nIndex - 1 : nIndex;
CXFA_Corner corner1(strokes[n].GetNode());
CXFA_Corner corner2(strokes[(n + 2) % 8].GetNode());
- FX_FLOAT fRadius1 = bCorner ? corner1.GetRadius() : 0.0f;
- FX_FLOAT fRadius2 = bCorner ? corner2.GetRadius() : 0.0f;
+ float fRadius1 = bCorner ? corner1.GetRadius() : 0.0f;
+ float fRadius2 = bCorner ? corner2.GetRadius() : 0.0f;
bool bInverted = corner1.IsInverted();
- FX_FLOAT offsetY = 0.0f;
- FX_FLOAT offsetX = 0.0f;
+ float offsetY = 0.0f;
+ float offsetX = 0.0f;
bool bRound = corner1.GetJoinType() == XFA_ATTRIBUTEENUM_Round;
- FX_FLOAT halfAfter = 0.0f;
- FX_FLOAT halfBefore = 0.0f;
+ float halfAfter = 0.0f;
+ float halfBefore = 0.0f;
CXFA_Stroke stroke = strokes[nIndex];
if (stroke.IsCorner()) {
CXFA_Stroke edgeBefore = strokes[(nIndex + 1 * 8 - 1) % 8];
@@ -1253,14 +1253,14 @@ static void XFA_BOX_GetPath(CXFA_Box box,
halfAfter = edgeAfter.GetThickness() / 2;
}
}
- FX_FLOAT offsetEX = 0.0f;
- FX_FLOAT offsetEY = 0.0f;
- FX_FLOAT sx = 0.0f;
- FX_FLOAT sy = 0.0f;
- FX_FLOAT vx = 1.0f;
- FX_FLOAT vy = 1.0f;
- FX_FLOAT nx = 1.0f;
- FX_FLOAT ny = 1.0f;
+ float offsetEX = 0.0f;
+ float offsetEY = 0.0f;
+ float sx = 0.0f;
+ float sy = 0.0f;
+ float vx = 1.0f;
+ float vy = 1.0f;
+ float nx = 1.0f;
+ float ny = 1.0f;
CFX_PointF cpStart;
CFX_PointF cp1;
CFX_PointF cp2;
@@ -1390,11 +1390,11 @@ static void XFA_BOX_GetFillPath(CXFA_Box box,
uint16_t dwFlags) {
if (box.IsArc() || (dwFlags & XFA_DRAWBOX_ForceRound) != 0) {
CXFA_Edge edge = box.GetEdge(0);
- FX_FLOAT fThickness = edge.GetThickness();
+ float fThickness = edge.GetThickness();
if (fThickness < 0) {
fThickness = 0;
}
- FX_FLOAT fHalf = fThickness / 2;
+ float fHalf = fThickness / 2;
int32_t iHand = box.GetHand();
if (iHand == XFA_ATTRIBUTEENUM_Left) {
rtWidget.Inflate(fHalf, fHalf);
@@ -1442,17 +1442,17 @@ static void XFA_BOX_GetFillPath(CXFA_Box box,
}
for (int32_t i = 0; i < 8; i += 2) {
- FX_FLOAT sx = 0.0f;
- FX_FLOAT sy = 0.0f;
- FX_FLOAT vx = 1.0f;
- FX_FLOAT vy = 1.0f;
- FX_FLOAT nx = 1.0f;
- FX_FLOAT ny = 1.0f;
+ float sx = 0.0f;
+ float sy = 0.0f;
+ float vx = 1.0f;
+ float vy = 1.0f;
+ float nx = 1.0f;
+ float ny = 1.0f;
CFX_PointF cp1, cp2;
CXFA_Corner corner1(strokes[i].GetNode());
CXFA_Corner corner2(strokes[(i + 2) % 8].GetNode());
- FX_FLOAT fRadius1 = corner1.GetRadius();
- FX_FLOAT fRadius2 = corner2.GetRadius();
+ float fRadius1 = corner1.GetRadius();
+ float fRadius2 = corner2.GetRadius();
bool bInverted = corner1.IsInverted();
bool bRound = corner1.GetJoinType() == XFA_ATTRIBUTEENUM_Round;
if (bRound) {
@@ -1682,7 +1682,7 @@ static void XFA_BOX_StrokePath(CXFA_Stroke stroke,
if (!stroke || !stroke.IsVisible()) {
return;
}
- FX_FLOAT fThickness = stroke.GetThickness();
+ float fThickness = stroke.GetThickness();
if (fThickness < 0.001f) {
return;
}
@@ -1709,14 +1709,14 @@ static void XFA_BOX_StrokeArc(CXFA_Box box,
return;
}
bool bVisible = false;
- FX_FLOAT fThickness = 0;
+ float fThickness = 0;
int32_t i3DType = box.Get3DStyle(bVisible, fThickness);
if (i3DType) {
if (bVisible && fThickness >= 0.001f) {
dwFlags |= XFA_DRAWBOX_Lowered3D;
}
}
- FX_FLOAT fHalf = edge.GetThickness() / 2;
+ float fHalf = edge.GetThickness() / 2;
if (fHalf < 0) {
fHalf = 0;
}
@@ -1739,7 +1739,7 @@ static void XFA_BOX_StrokeArc(CXFA_Box box,
pGS->SaveGraphState();
pGS->SetLineWidth(fHalf);
- FX_FLOAT a, b;
+ float a, b;
a = rtWidget.width / 2.0f;
b = rtWidget.height / 2.0f;
if (dwFlags & XFA_DRAWBOX_ForceRound) {
@@ -1753,7 +1753,7 @@ static void XFA_BOX_StrokeArc(CXFA_Box box,
rtWidget.width = a + a;
rtWidget.height = b + b;
- FX_FLOAT startAngle = 0, sweepAngle = 360;
+ float startAngle = 0, sweepAngle = 360;
startAngle = startAngle * FX_PI / 180.0f;
sweepAngle = -sweepAngle * FX_PI / 180.0f;
@@ -1790,14 +1790,14 @@ static void XFA_BOX_StrokeArc(CXFA_Box box,
}
static void XFA_Draw3DRect(CFX_Graphics* pGraphic,
const CFX_RectF& rt,
- FX_FLOAT fLineWidth,
+ float fLineWidth,
CFX_Matrix* pMatrix,
FX_ARGB argbTopLeft,
FX_ARGB argbBottomRight) {
CFX_Color crLT(argbTopLeft);
pGraphic->SetFillColor(&crLT);
- FX_FLOAT fBottom = rt.bottom();
- FX_FLOAT fRight = rt.right();
+ float fBottom = rt.bottom();
+ float fRight = rt.right();
CFX_Path pathLT;
pathLT.MoveTo(CFX_PointF(rt.left, fBottom));
pathLT.LineTo(CFX_PointF(rt.left, rt.top));
@@ -1823,9 +1823,9 @@ static void XFA_Draw3DRect(CFX_Graphics* pGraphic,
}
static void XFA_BOX_Stroke_3DRect_Lowered(CFX_Graphics* pGS,
CFX_RectF rt,
- FX_FLOAT fThickness,
+ float fThickness,
CFX_Matrix* pMatrix) {
- FX_FLOAT fHalfWidth = fThickness / 2.0f;
+ float fHalfWidth = fThickness / 2.0f;
CFX_RectF rtInner(rt);
rtInner.Deflate(fHalfWidth, fHalfWidth);
CFX_Color cr(0xFF000000);
@@ -1838,9 +1838,9 @@ static void XFA_BOX_Stroke_3DRect_Lowered(CFX_Graphics* pGS,
}
static void XFA_BOX_Stroke_3DRect_Raised(CFX_Graphics* pGS,
CFX_RectF rt,
- FX_FLOAT fThickness,
+ float fThickness,
CFX_Matrix* pMatrix) {
- FX_FLOAT fHalfWidth = fThickness / 2.0f;
+ float fHalfWidth = fThickness / 2.0f;
CFX_RectF rtInner(rt);
rtInner.Deflate(fHalfWidth, fHalfWidth);
CFX_Color cr(0xFF000000);
@@ -1853,9 +1853,9 @@ static void XFA_BOX_Stroke_3DRect_Raised(CFX_Graphics* pGS,
}
static void XFA_BOX_Stroke_3DRect_Etched(CFX_Graphics* pGS,
CFX_RectF rt,
- FX_FLOAT fThickness,
+ float fThickness,
CFX_Matrix* pMatrix) {
- FX_FLOAT fHalfWidth = fThickness / 2.0f;
+ float fHalfWidth = fThickness / 2.0f;
XFA_Draw3DRect(pGS, rt, fThickness, pMatrix, 0xFF808080, 0xFFFFFFFF);
CFX_RectF rtInner(rt);
rtInner.Deflate(fHalfWidth, fHalfWidth);
@@ -1863,9 +1863,9 @@ static void XFA_BOX_Stroke_3DRect_Etched(CFX_Graphics* pGS,
}
static void XFA_BOX_Stroke_3DRect_Embossed(CFX_Graphics* pGS,
CFX_RectF rt,
- FX_FLOAT fThickness,
+ float fThickness,
CFX_Matrix* pMatrix) {
- FX_FLOAT fHalfWidth = fThickness / 2.0f;
+ float fHalfWidth = fThickness / 2.0f;
XFA_Draw3DRect(pGS, rt, fThickness, pMatrix, 0xFF808080, 0xFF000000);
CFX_RectF rtInner(rt);
rtInner.Deflate(fHalfWidth, fHalfWidth);
@@ -1877,7 +1877,7 @@ static void XFA_BOX_Stroke_Rect(CXFA_Box box,
CFX_RectF rtWidget,
CFX_Matrix* pMatrix) {
bool bVisible = false;
- FX_FLOAT fThickness = 0;
+ float fThickness = 0;
int32_t i3DType = box.Get3DStyle(bVisible, fThickness);
if (i3DType) {
if (!bVisible || fThickness < 0.001f) {
@@ -1981,11 +1981,11 @@ static void XFA_BOX_Stroke(CXFA_Box box,
}
for (int32_t i = 1; i < 8; i += 2) {
CXFA_Edge edge(strokes[i].GetNode());
- FX_FLOAT fThickness = edge.GetThickness();
+ float fThickness = edge.GetThickness();
if (fThickness < 0) {
fThickness = 0;
}
- FX_FLOAT fHalf = fThickness / 2;
+ float fHalf = fThickness / 2;
int32_t iHand = box.GetHand();
switch (i) {
case 1:
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index 655c9da511..52c11508aa 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -45,7 +45,7 @@ class CXFA_WidgetLayoutData {
CXFA_WidgetLayoutData() : m_fWidgetHeight(-1) {}
virtual ~CXFA_WidgetLayoutData() {}
- FX_FLOAT m_fWidgetHeight;
+ float m_fWidgetHeight;
};
class CXFA_TextLayoutData : public CXFA_WidgetLayoutData {
@@ -128,7 +128,7 @@ class CXFA_FieldLayoutData : public CXFA_WidgetLayoutData {
std::unique_ptr<CXFA_TextLayout> m_pCapTextLayout;
std::unique_ptr<CXFA_TextProvider> m_pCapTextProvider;
std::unique_ptr<CFDE_TextOut> m_pTextOut;
- std::vector<FX_FLOAT> m_FieldSplitArray;
+ std::vector<float> m_FieldSplitArray;
};
class CXFA_TextEditData : public CXFA_FieldLayoutData {
@@ -718,7 +718,7 @@ void CXFA_WidgetAcc::CalcCaptionSize(CFX_SizeF& szCap) {
LoadCaption();
XFA_Element eUIType = GetUIType();
int32_t iCapPlacement = caption.GetPlacementType();
- FX_FLOAT fCapReserve = caption.GetReserve();
+ float fCapReserve = caption.GetReserve();
const bool bVert = iCapPlacement == XFA_ATTRIBUTEENUM_Top ||
iCapPlacement == XFA_ATTRIBUTEENUM_Bottom;
const bool bReserveExit = fCapReserve > 0.01;
@@ -735,7 +735,7 @@ void CXFA_WidgetAcc::CalcCaptionSize(CFX_SizeF& szCap) {
bVert ? szCap.height = fCapReserve : szCap.width = fCapReserve;
}
} else {
- FX_FLOAT fFontSize = 10.0f;
+ float fFontSize = 10.0f;
if (CXFA_Font font = caption.GetFont()) {
fFontSize = font.GetFontSize();
} else if (CXFA_Font widgetfont = GetFont()) {
@@ -749,7 +749,7 @@ void CXFA_WidgetAcc::CalcCaptionSize(CFX_SizeF& szCap) {
}
}
if (CXFA_Margin mgCap = caption.GetMargin()) {
- FX_FLOAT fLeftInset, fTopInset, fRightInset, fBottomInset;
+ float fLeftInset, fTopInset, fRightInset, fBottomInset;
mgCap.GetLeftInset(fLeftInset);
mgCap.GetTopInset(fTopInset);
mgCap.GetRightInset(fRightInset);
@@ -792,7 +792,7 @@ bool CXFA_WidgetAcc::CalculateFieldAutoSize(CFX_SizeF& size) {
bool CXFA_WidgetAcc::CalculateWidgetAutoSize(CFX_SizeF& size) {
CXFA_Margin mgWidget = GetMargin();
if (mgWidget) {
- FX_FLOAT fLeftInset, fTopInset, fRightInset, fBottomInset;
+ float fLeftInset, fTopInset, fRightInset, fBottomInset;
mgWidget.GetLeftInset(fLeftInset);
mgWidget.GetTopInset(fTopInset);
mgWidget.GetRightInset(fRightInset);
@@ -804,9 +804,9 @@ bool CXFA_WidgetAcc::CalculateWidgetAutoSize(CFX_SizeF& size) {
if (para)
size.width += para.GetMarginLeft() + para.GetTextIndent();
- FX_FLOAT fVal = 0;
- FX_FLOAT fMin = 0;
- FX_FLOAT fMax = 0;
+ float fVal = 0;
+ float fMin = 0;
+ float fMax = 0;
if (GetWidth(fVal)) {
size.width = fVal;
} else {
@@ -830,7 +830,7 @@ bool CXFA_WidgetAcc::CalculateWidgetAutoSize(CFX_SizeF& size) {
}
void CXFA_WidgetAcc::CalculateTextContentSize(CFX_SizeF& size) {
- FX_FLOAT fFontSize = GetFontSize();
+ float fFontSize = GetFontSize();
CFX_WideString wsText;
GetValue(wsText, XFA_VALUEPICTURE_Display);
if (wsText.IsEmpty()) {
@@ -885,7 +885,7 @@ bool CXFA_WidgetAcc::CalculateTextEditAutoSize(CFX_SizeF& size) {
size.width -= rtUIMargin.left + rtUIMargin.width;
CXFA_Margin mgWidget = GetMargin();
if (mgWidget) {
- FX_FLOAT fLeftInset, fRightInset;
+ float fLeftInset, fRightInset;
mgWidget.GetLeftInset(fLeftInset);
mgWidget.GetRightInset(fRightInset);
size.width -= fLeftInset + fRightInset;
@@ -914,7 +914,7 @@ bool CXFA_WidgetAcc::CalculateTextEditAutoSize(CFX_SizeF& size) {
return CalculateFieldAutoSize(size);
}
bool CXFA_WidgetAcc::CalculateCheckButtonAutoSize(CFX_SizeF& size) {
- FX_FLOAT fCheckSize = GetCheckButtonSize();
+ float fCheckSize = GetCheckButtonSize();
size = CFX_SizeF(fCheckSize, fCheckSize);
return CalculateFieldAutoSize(size);
}
@@ -932,9 +932,8 @@ bool CXFA_WidgetAcc::CalculateImageAutoSize(CFX_SizeF& size) {
int32_t iImageYDpi = 0;
GetImageDpi(iImageXDpi, iImageYDpi);
CFX_RectF rtImage(
- 0, 0,
- XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetWidth(), (FX_FLOAT)iImageXDpi),
- XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetHeight(), (FX_FLOAT)iImageYDpi));
+ 0, 0, XFA_UnitPx2Pt((float)pBitmap->GetWidth(), (float)iImageXDpi),
+ XFA_UnitPx2Pt((float)pBitmap->GetHeight(), (float)iImageYDpi));
CFX_RectF rtFit;
if (GetWidth(rtFit.width)) {
@@ -961,9 +960,8 @@ bool CXFA_WidgetAcc::CalculateImageEditAutoSize(CFX_SizeF& size) {
int32_t iImageYDpi = 0;
GetImageEditDpi(iImageXDpi, iImageYDpi);
CFX_RectF rtImage(
- 0, 0,
- XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetWidth(), (FX_FLOAT)iImageXDpi),
- XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetHeight(), (FX_FLOAT)iImageYDpi));
+ 0, 0, XFA_UnitPx2Pt((float)pBitmap->GetWidth(), (float)iImageXDpi),
+ XFA_UnitPx2Pt((float)pBitmap->GetHeight(), (float)iImageYDpi));
CFX_RectF rtFit;
if (GetWidth(rtFit.width)) {
@@ -1017,15 +1015,15 @@ void CXFA_WidgetAcc::LoadText() {
InitLayoutData();
static_cast<CXFA_TextLayoutData*>(m_pLayoutData.get())->LoadText(this);
}
-FX_FLOAT CXFA_WidgetAcc::CalculateWidgetAutoWidth(FX_FLOAT fWidthCalc) {
+float CXFA_WidgetAcc::CalculateWidgetAutoWidth(float fWidthCalc) {
CXFA_Margin mgWidget = GetMargin();
if (mgWidget) {
- FX_FLOAT fLeftInset, fRightInset;
+ float fLeftInset, fRightInset;
mgWidget.GetLeftInset(fLeftInset);
mgWidget.GetRightInset(fRightInset);
fWidthCalc += fLeftInset + fRightInset;
}
- FX_FLOAT fMin = 0, fMax = 0;
+ float fMin = 0, fMax = 0;
if (GetMinWidth(fMin)) {
fWidthCalc = std::max(fWidthCalc, fMin);
}
@@ -1034,25 +1032,25 @@ FX_FLOAT CXFA_WidgetAcc::CalculateWidgetAutoWidth(FX_FLOAT fWidthCalc) {
}
return fWidthCalc;
}
-FX_FLOAT CXFA_WidgetAcc::GetWidthWithoutMargin(FX_FLOAT fWidthCalc) {
+float CXFA_WidgetAcc::GetWidthWithoutMargin(float fWidthCalc) {
CXFA_Margin mgWidget = GetMargin();
if (mgWidget) {
- FX_FLOAT fLeftInset, fRightInset;
+ float fLeftInset, fRightInset;
mgWidget.GetLeftInset(fLeftInset);
mgWidget.GetRightInset(fRightInset);
fWidthCalc -= fLeftInset + fRightInset;
}
return fWidthCalc;
}
-FX_FLOAT CXFA_WidgetAcc::CalculateWidgetAutoHeight(FX_FLOAT fHeightCalc) {
+float CXFA_WidgetAcc::CalculateWidgetAutoHeight(float fHeightCalc) {
CXFA_Margin mgWidget = GetMargin();
if (mgWidget) {
- FX_FLOAT fTopInset, fBottomInset;
+ float fTopInset, fBottomInset;
mgWidget.GetTopInset(fTopInset);
mgWidget.GetBottomInset(fBottomInset);
fHeightCalc += fTopInset + fBottomInset;
}
- FX_FLOAT fMin = 0, fMax = 0;
+ float fMin = 0, fMax = 0;
if (GetMinHeight(fMin)) {
fHeightCalc = std::max(fHeightCalc, fMin);
}
@@ -1061,18 +1059,17 @@ FX_FLOAT CXFA_WidgetAcc::CalculateWidgetAutoHeight(FX_FLOAT fHeightCalc) {
}
return fHeightCalc;
}
-FX_FLOAT CXFA_WidgetAcc::GetHeightWithoutMargin(FX_FLOAT fHeightCalc) {
+float CXFA_WidgetAcc::GetHeightWithoutMargin(float fHeightCalc) {
CXFA_Margin mgWidget = GetMargin();
if (mgWidget) {
- FX_FLOAT fTopInset, fBottomInset;
+ float fTopInset, fBottomInset;
mgWidget.GetTopInset(fTopInset);
mgWidget.GetBottomInset(fBottomInset);
fHeightCalc -= fTopInset + fBottomInset;
}
return fHeightCalc;
}
-void CXFA_WidgetAcc::StartWidgetLayout(FX_FLOAT& fCalcWidth,
- FX_FLOAT& fCalcHeight) {
+void CXFA_WidgetAcc::StartWidgetLayout(float& fCalcWidth, float& fCalcHeight) {
InitLayoutData();
XFA_Element eUIType = GetUIType();
if (eUIType == XFA_Element::Text) {
@@ -1085,7 +1082,7 @@ void CXFA_WidgetAcc::StartWidgetLayout(FX_FLOAT& fCalcWidth,
return;
}
m_pLayoutData->m_fWidgetHeight = -1;
- FX_FLOAT fWidth = 0;
+ float fWidth = 0;
if (fCalcWidth > 0 && fCalcHeight < 0) {
if (!GetHeight(fCalcHeight)) {
CalculateAccWidthAndHeight(eUIType, fCalcWidth, fCalcHeight);
@@ -1102,8 +1099,8 @@ void CXFA_WidgetAcc::StartWidgetLayout(FX_FLOAT& fCalcWidth,
m_pLayoutData->m_fWidgetHeight = fCalcHeight;
}
void CXFA_WidgetAcc::CalculateAccWidthAndHeight(XFA_Element eUIType,
- FX_FLOAT& fWidth,
- FX_FLOAT& fCalcHeight) {
+ float& fWidth,
+ float& fCalcHeight) {
CFX_SizeF sz(fWidth, m_pLayoutData->m_fWidgetHeight);
switch (eUIType) {
case XFA_Element::Barcode:
@@ -1143,7 +1140,7 @@ void CXFA_WidgetAcc::CalculateAccWidthAndHeight(XFA_Element eUIType,
m_pLayoutData->m_fWidgetHeight = sz.height;
fCalcHeight = sz.height;
}
-bool CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight) {
+bool CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, float& fCalcHeight) {
XFA_Element eUIType = GetUIType();
if (eUIType == XFA_Element::Subform) {
return false;
@@ -1154,8 +1151,8 @@ bool CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight) {
fCalcHeight = 0;
return true;
}
- FX_FLOAT fTopInset = 0;
- FX_FLOAT fBottomInset = 0;
+ float fTopInset = 0;
+ float fBottomInset = 0;
if (iBlockIndex == 0) {
CXFA_Margin mgWidget = GetMargin();
if (mgWidget) {
@@ -1167,7 +1164,7 @@ bool CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight) {
fBottomInset += rtUIMargin.width;
}
if (eUIType == XFA_Element::Text) {
- FX_FLOAT fHeight = fCalcHeight;
+ float fHeight = fCalcHeight;
if (iBlockIndex == 0) {
fCalcHeight = fCalcHeight - fTopInset;
if (fCalcHeight < 0) {
@@ -1189,7 +1186,7 @@ bool CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight) {
return true;
}
XFA_ATTRIBUTEENUM iCapPlacement = XFA_ATTRIBUTEENUM_Unknown;
- FX_FLOAT fCapReserve = 0;
+ float fCapReserve = 0;
if (iBlockIndex == 0) {
CXFA_Caption caption = GetCaption();
if (caption && caption.GetPresence() != XFA_ATTRIBUTEENUM_Hidden) {
@@ -1213,20 +1210,20 @@ bool CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight) {
CXFA_FieldLayoutData* pFieldData =
static_cast<CXFA_FieldLayoutData*>(m_pLayoutData.get());
int32_t iLinesCount = 0;
- FX_FLOAT fHeight = m_pLayoutData->m_fWidgetHeight;
+ float fHeight = m_pLayoutData->m_fWidgetHeight;
CFX_WideString wsText;
GetValue(wsText, XFA_VALUEPICTURE_Display);
if (wsText.IsEmpty()) {
iLinesCount = 1;
} else {
if (!pFieldData->m_pTextOut) {
- FX_FLOAT fWidth = 0;
+ float fWidth = 0;
GetWidth(fWidth);
CalculateAccWidthAndHeight(eUIType, fWidth, fHeight);
}
iLinesCount = pFieldData->m_pTextOut->GetTotalLines();
}
- std::vector<FX_FLOAT>* pFieldArray = &pFieldData->m_FieldSplitArray;
+ std::vector<float>* pFieldArray = &pFieldData->m_FieldSplitArray;
int32_t iFieldSplitCount = pdfium::CollectionSize<int32_t>(*pFieldArray);
for (int32_t i = 0; i < iBlockIndex * 3; i += 3) {
iLinesCount -= (int32_t)(*pFieldArray)[i + 1];
@@ -1235,17 +1232,17 @@ bool CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight) {
if (iLinesCount == 0) {
return false;
}
- FX_FLOAT fLineHeight = GetLineHeight();
- FX_FLOAT fFontSize = GetFontSize();
- FX_FLOAT fTextHeight = iLinesCount * fLineHeight - fLineHeight + fFontSize;
- FX_FLOAT fSpaceAbove = 0;
- FX_FLOAT fStartOffset = 0;
+ float fLineHeight = GetLineHeight();
+ float fFontSize = GetFontSize();
+ float fTextHeight = iLinesCount * fLineHeight - fLineHeight + fFontSize;
+ float fSpaceAbove = 0;
+ float fStartOffset = 0;
if (fHeight > 0.1f && iBlockIndex == 0) {
fStartOffset = fTopInset;
fHeight -= (fTopInset + fBottomInset);
if (CXFA_Para para = GetPara()) {
fSpaceAbove = para.GetSpaceAbove();
- FX_FLOAT fSpaceBelow = para.GetSpaceBelow();
+ float fSpaceBelow = para.GetSpaceBelow();
fHeight -= (fSpaceAbove + fSpaceBelow);
switch (para.GetVerticalAlign()) {
case XFA_ATTRIBUTEENUM_Top:
@@ -1322,17 +1319,17 @@ bool CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight) {
}
return true;
}
- FX_FLOAT fTextNum =
+ float fTextNum =
fCalcHeight + XFA_FLOAT_PERCISION - fCapReserve - fStartOffset;
int32_t iLineNum =
(int32_t)((fTextNum + (fLineHeight - fFontSize)) / fLineHeight);
if (iLineNum >= iLinesCount) {
if (fCalcHeight - fStartOffset - fTextHeight >= fFontSize) {
if (iFieldSplitCount / 3 == (iBlockIndex + 1)) {
- (*pFieldArray)[iBlockIndex * 3 + 1] = (FX_FLOAT)iLinesCount;
+ (*pFieldArray)[iBlockIndex * 3 + 1] = (float)iLinesCount;
(*pFieldArray)[iBlockIndex * 3 + 2] = fCalcHeight;
} else {
- pFieldArray->push_back((FX_FLOAT)iLinesCount);
+ pFieldArray->push_back((float)iLinesCount);
pFieldArray->push_back(fCalcHeight);
}
return false;
@@ -1348,13 +1345,12 @@ bool CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight) {
}
}
if (iLineNum > 0) {
- FX_FLOAT fSplitHeight =
- iLineNum * fLineHeight + fCapReserve + fStartOffset;
+ float fSplitHeight = iLineNum * fLineHeight + fCapReserve + fStartOffset;
if (iFieldSplitCount / 3 == (iBlockIndex + 1)) {
- (*pFieldArray)[iBlockIndex * 3 + 1] = (FX_FLOAT)iLineNum;
+ (*pFieldArray)[iBlockIndex * 3 + 1] = (float)iLineNum;
(*pFieldArray)[iBlockIndex * 3 + 2] = fSplitHeight;
} else {
- pFieldArray->push_back((FX_FLOAT)iLineNum);
+ pFieldArray->push_back((float)iLineNum);
pFieldArray->push_back(fSplitHeight);
}
if (fabs(fSplitHeight - fCalcHeight) < XFA_FLOAT_PERCISION) {
@@ -1394,14 +1390,13 @@ void CXFA_WidgetAcc::InitLayoutData() {
m_pLayoutData = pdfium::MakeUnique<CXFA_WidgetLayoutData>();
}
-void CXFA_WidgetAcc::StartTextLayout(FX_FLOAT& fCalcWidth,
- FX_FLOAT& fCalcHeight) {
+void CXFA_WidgetAcc::StartTextLayout(float& fCalcWidth, float& fCalcHeight) {
LoadText();
CXFA_TextLayout* pTextLayout =
static_cast<CXFA_TextLayoutData*>(m_pLayoutData.get())->GetTextLayout();
- FX_FLOAT fTextHeight = 0;
+ float fTextHeight = 0;
if (fCalcWidth > 0 && fCalcHeight > 0) {
- FX_FLOAT fWidth = GetWidthWithoutMargin(fCalcWidth);
+ float fWidth = GetWidthWithoutMargin(fCalcWidth);
pTextLayout->StartLayout(fWidth);
fTextHeight = fCalcHeight;
fTextHeight = GetHeightWithoutMargin(fTextHeight);
@@ -1409,17 +1404,17 @@ void CXFA_WidgetAcc::StartTextLayout(FX_FLOAT& fCalcWidth,
return;
}
if (fCalcWidth > 0 && fCalcHeight < 0) {
- FX_FLOAT fWidth = GetWidthWithoutMargin(fCalcWidth);
+ float fWidth = GetWidthWithoutMargin(fCalcWidth);
pTextLayout->StartLayout(fWidth);
}
if (fCalcWidth < 0 && fCalcHeight < 0) {
- FX_FLOAT fMaxWidth = -1;
+ float fMaxWidth = -1;
bool bRet = GetWidth(fMaxWidth);
if (bRet) {
- FX_FLOAT fWidth = GetWidthWithoutMargin(fMaxWidth);
+ float fWidth = GetWidthWithoutMargin(fMaxWidth);
pTextLayout->StartLayout(fWidth);
} else {
- FX_FLOAT fWidth = pTextLayout->StartLayout(fMaxWidth);
+ float fWidth = pTextLayout->StartLayout(fMaxWidth);
fMaxWidth = CalculateWidgetAutoWidth(fWidth);
fWidth = GetWidthWithoutMargin(fMaxWidth);
pTextLayout->StartLayout(fWidth);
@@ -1509,15 +1504,15 @@ CFX_RetainPtr<CFGAS_GEFont> CXFA_WidgetAcc::GetFDEFont() {
return pDoc->GetApp()->GetXFAFontMgr()->GetFont(pDoc, wsFontName,
dwFontStyle);
}
-FX_FLOAT CXFA_WidgetAcc::GetFontSize() {
- FX_FLOAT fFontSize = 10.0f;
+float CXFA_WidgetAcc::GetFontSize() {
+ float fFontSize = 10.0f;
if (CXFA_Font font = GetFont()) {
fFontSize = font.GetFontSize();
}
return fFontSize < 0.1f ? 10.0f : fFontSize;
}
-FX_FLOAT CXFA_WidgetAcc::GetLineHeight() {
- FX_FLOAT fLineHeight = 0;
+float CXFA_WidgetAcc::GetLineHeight() {
+ float fLineHeight = 0;
if (CXFA_Para para = GetPara()) {
fLineHeight = para.GetLineHeight();
}
@@ -1636,7 +1631,7 @@ CXFA_Font CXFA_TextProvider::GetFontNode() {
bool CXFA_TextProvider::IsCheckButtonAndAutoWidth() {
XFA_Element eType = m_pWidgetAcc->GetUIType();
if (eType == XFA_Element::CheckButton) {
- FX_FLOAT fWidth = 0;
+ float fWidth = 0;
return !m_pWidgetAcc->GetWidth(fWidth);
}
return false;
diff --git a/xfa/fxfa/app/xfa_ffwidgethandler.cpp b/xfa/fxfa/app/xfa_ffwidgethandler.cpp
index 2fddfb6156..dc3850c778 100644
--- a/xfa/fxfa/app/xfa_ffwidgethandler.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgethandler.cpp
@@ -499,7 +499,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateFontNode(CXFA_Node* pParent) const {
CXFA_Node* CXFA_FFWidgetHandler::CreateMarginNode(CXFA_Node* pParent,
uint32_t dwFlags,
- FX_FLOAT fInsets[4]) const {
+ float fInsets[4]) const {
CXFA_Node* pMargin = CreateCopyNode(XFA_Element::Margin, pParent);
if (dwFlags & 0x01)
pMargin->SetMeasure(XFA_ATTRIBUTE_LeftInset,
diff --git a/xfa/fxfa/app/xfa_fwladapter.cpp b/xfa/fxfa/app/xfa_fwladapter.cpp
index e1f3e202ed..af578fcf8f 100644
--- a/xfa/fxfa/app/xfa_fwladapter.cpp
+++ b/xfa/fxfa/app/xfa_fwladapter.cpp
@@ -25,8 +25,8 @@ void CXFA_FWLAdapterWidgetMgr::RepaintWidget(CFWL_Widget* pWidget) {
}
bool CXFA_FWLAdapterWidgetMgr::GetPopupPos(CFWL_Widget* pWidget,
- FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) {
CXFA_FFWidget* pFFWidget = pWidget->GetLayoutItem();
diff --git a/xfa/fxfa/app/xfa_fwladapter.h b/xfa/fxfa/app/xfa_fwladapter.h
index c68fb7015f..b4a3481588 100644
--- a/xfa/fxfa/app/xfa_fwladapter.h
+++ b/xfa/fxfa/app/xfa_fwladapter.h
@@ -19,8 +19,8 @@ class CXFA_FWLAdapterWidgetMgr {
void RepaintWidget(CFWL_Widget* pWidget);
bool GetPopupPos(CFWL_Widget* pWidget,
- FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup);
};
diff --git a/xfa/fxfa/app/xfa_textpiece.h b/xfa/fxfa/app/xfa_textpiece.h
index 6802df5566..fd1f3bdbaa 100644
--- a/xfa/fxfa/app/xfa_textpiece.h
+++ b/xfa/fxfa/app/xfa_textpiece.h
@@ -32,7 +32,7 @@ class XFA_TextPiece {
int32_t iPeriod;
int32_t iLineThrough;
FX_ARGB dwColor;
- FX_FLOAT fFontSize;
+ float fFontSize;
CFX_RectF rtPiece;
CFX_RetainPtr<CFGAS_GEFont> pFont;
CFX_RetainPtr<CXFA_LinkUserData> pLinkData;
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 3ecea1643c..2ee687d326 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -914,7 +914,7 @@ void CXFA_FM2JSContext::Round(CFXJSE_Value* pThis,
static_cast<uint8_t>(std::min(std::max(dPrecision, 0.0), 12.0));
}
- CFX_Decimal decimalValue((FX_FLOAT)dValue, uPrecision);
+ CFX_Decimal decimalValue((float)dValue, uPrecision);
CFX_WideString wsValue = decimalValue;
args.GetReturnValue()->SetString(wsValue.UTF8Encode().AsStringC());
}
@@ -1465,7 +1465,7 @@ void CXFA_FM2JSContext::Num2Time(CFXJSE_Value* pThis,
args.GetReturnValue()->SetNull();
return;
}
- FX_FLOAT fTime = ValueToFloat(pThis, timeValue.get());
+ float fTime = ValueToFloat(pThis, timeValue.get());
if (FXSYS_fabs(fTime) < 1.0) {
args.GetReturnValue()->SetNull();
return;
@@ -2134,7 +2134,7 @@ int32_t CXFA_FM2JSContext::DateString2Num(const CFX_ByteStringC& szDateString) {
}
}
- FX_FLOAT dDays = 0;
+ float dDays = 0;
int32_t i = 1;
if (iYear < 1900)
return 0;
@@ -2407,17 +2407,17 @@ void CXFA_FM2JSContext::CTerm(CFXJSE_Value* pThis,
return;
}
- FX_FLOAT nRate = ValueToFloat(pThis, argOne.get());
- FX_FLOAT nFutureValue = ValueToFloat(pThis, argTwo.get());
- FX_FLOAT nInitAmount = ValueToFloat(pThis, argThree.get());
+ float nRate = ValueToFloat(pThis, argOne.get());
+ float nFutureValue = ValueToFloat(pThis, argTwo.get());
+ float nInitAmount = ValueToFloat(pThis, argThree.get());
if ((nRate <= 0) || (nFutureValue <= 0) || (nInitAmount <= 0)) {
pContext->ThrowArgumentMismatchException();
return;
}
args.GetReturnValue()->SetFloat(
- FXSYS_log((FX_FLOAT)(nFutureValue / nInitAmount)) /
- FXSYS_log((FX_FLOAT)(1 + nRate)));
+ FXSYS_log((float)(nFutureValue / nInitAmount)) /
+ FXSYS_log((float)(1 + nRate)));
}
// static
@@ -2483,22 +2483,22 @@ void CXFA_FM2JSContext::IPmt(CFXJSE_Value* pThis,
return;
}
- FX_FLOAT nPrincipalAmount = ValueToFloat(pThis, argOne.get());
- FX_FLOAT nRate = ValueToFloat(pThis, argTwo.get());
- FX_FLOAT nPayment = ValueToFloat(pThis, argThree.get());
- FX_FLOAT nFirstMonth = ValueToFloat(pThis, argFour.get());
- FX_FLOAT nNumberOfMonths = ValueToFloat(pThis, argFive.get());
+ float nPrincipalAmount = ValueToFloat(pThis, argOne.get());
+ float nRate = ValueToFloat(pThis, argTwo.get());
+ float nPayment = ValueToFloat(pThis, argThree.get());
+ float nFirstMonth = ValueToFloat(pThis, argFour.get());
+ float nNumberOfMonths = ValueToFloat(pThis, argFive.get());
if ((nPrincipalAmount <= 0) || (nRate <= 0) || (nPayment <= 0) ||
(nFirstMonth < 0) || (nNumberOfMonths < 0)) {
pContext->ThrowArgumentMismatchException();
return;
}
- FX_FLOAT nRateOfMonth = nRate / 12;
+ float nRateOfMonth = nRate / 12;
int32_t iNums = (int32_t)(
- (FXSYS_log10((FX_FLOAT)(nPayment / nPrincipalAmount)) -
- FXSYS_log10((FX_FLOAT)(nPayment / nPrincipalAmount - nRateOfMonth))) /
- FXSYS_log10((FX_FLOAT)(1 + nRateOfMonth)));
+ (FXSYS_log10((float)(nPayment / nPrincipalAmount)) -
+ FXSYS_log10((float)(nPayment / nPrincipalAmount - nRateOfMonth))) /
+ FXSYS_log10((float)(1 + nRateOfMonth)));
int32_t iEnd = std::min((int32_t)(nFirstMonth + nNumberOfMonths - 1), iNums);
if (nPayment < nPrincipalAmount * nRateOfMonth) {
@@ -2510,7 +2510,7 @@ void CXFA_FM2JSContext::IPmt(CFXJSE_Value* pThis,
for (i = 0; i < nFirstMonth - 1; ++i)
nPrincipalAmount -= nPayment - nPrincipalAmount * nRateOfMonth;
- FX_FLOAT nSum = 0;
+ float nSum = 0;
for (; i < iEnd; ++i) {
nSum += nPrincipalAmount * nRateOfMonth;
nPrincipalAmount -= nPayment - nPrincipalAmount * nRateOfMonth;
@@ -2580,16 +2580,16 @@ void CXFA_FM2JSContext::Pmt(CFXJSE_Value* pThis,
return;
}
- FX_FLOAT nPrincipal = ValueToFloat(pThis, argOne.get());
- FX_FLOAT nRate = ValueToFloat(pThis, argTwo.get());
- FX_FLOAT nPeriods = ValueToFloat(pThis, argThree.get());
+ float nPrincipal = ValueToFloat(pThis, argOne.get());
+ float nRate = ValueToFloat(pThis, argTwo.get());
+ float nPeriods = ValueToFloat(pThis, argThree.get());
if ((nPrincipal <= 0) || (nRate <= 0) || (nPeriods <= 0)) {
pContext->ThrowArgumentMismatchException();
return;
}
- FX_FLOAT nTmp = 1 + nRate;
- FX_FLOAT nSum = nTmp;
+ float nTmp = 1 + nRate;
+ float nSum = nTmp;
for (int32_t i = 0; i < nPeriods - 1; ++i)
nSum *= nTmp;
@@ -2618,22 +2618,22 @@ void CXFA_FM2JSContext::PPmt(CFXJSE_Value* pThis,
return;
}
- FX_FLOAT nPrincipalAmount = ValueToFloat(pThis, argOne.get());
- FX_FLOAT nRate = ValueToFloat(pThis, argTwo.get());
- FX_FLOAT nPayment = ValueToFloat(pThis, argThree.get());
- FX_FLOAT nFirstMonth = ValueToFloat(pThis, argFour.get());
- FX_FLOAT nNumberOfMonths = ValueToFloat(pThis, argFive.get());
+ float nPrincipalAmount = ValueToFloat(pThis, argOne.get());
+ float nRate = ValueToFloat(pThis, argTwo.get());
+ float nPayment = ValueToFloat(pThis, argThree.get());
+ float nFirstMonth = ValueToFloat(pThis, argFour.get());
+ float nNumberOfMonths = ValueToFloat(pThis, argFive.get());
if ((nPrincipalAmount <= 0) || (nRate <= 0) || (nPayment <= 0) ||
(nFirstMonth < 0) || (nNumberOfMonths < 0)) {
pContext->ThrowArgumentMismatchException();
return;
}
- FX_FLOAT nRateOfMonth = nRate / 12;
+ float nRateOfMonth = nRate / 12;
int32_t iNums = (int32_t)(
- (FXSYS_log10((FX_FLOAT)(nPayment / nPrincipalAmount)) -
- FXSYS_log10((FX_FLOAT)(nPayment / nPrincipalAmount - nRateOfMonth))) /
- FXSYS_log10((FX_FLOAT)(1 + nRateOfMonth)));
+ (FXSYS_log10((float)(nPayment / nPrincipalAmount)) -
+ FXSYS_log10((float)(nPayment / nPrincipalAmount - nRateOfMonth))) /
+ FXSYS_log10((float)(1 + nRateOfMonth)));
int32_t iEnd = std::min((int32_t)(nFirstMonth + nNumberOfMonths - 1), iNums);
if (nPayment < nPrincipalAmount * nRateOfMonth) {
pContext->ThrowArgumentMismatchException();
@@ -2644,8 +2644,8 @@ void CXFA_FM2JSContext::PPmt(CFXJSE_Value* pThis,
for (i = 0; i < nFirstMonth - 1; ++i)
nPrincipalAmount -= nPayment - nPrincipalAmount * nRateOfMonth;
- FX_FLOAT nTemp = 0;
- FX_FLOAT nSum = 0;
+ float nTemp = 0;
+ float nSum = 0;
for (; i < iEnd; ++i) {
nTemp = nPayment - nPrincipalAmount * nRateOfMonth;
nSum += nTemp;
@@ -2708,17 +2708,16 @@ void CXFA_FM2JSContext::Rate(CFXJSE_Value* pThis,
return;
}
- FX_FLOAT nFuture = ValueToFloat(pThis, argOne.get());
- FX_FLOAT nPresent = ValueToFloat(pThis, argTwo.get());
- FX_FLOAT nTotalNumber = ValueToFloat(pThis, argThree.get());
+ float nFuture = ValueToFloat(pThis, argOne.get());
+ float nPresent = ValueToFloat(pThis, argTwo.get());
+ float nTotalNumber = ValueToFloat(pThis, argThree.get());
if ((nFuture <= 0) || (nPresent < 0) || (nTotalNumber <= 0)) {
pContext->ThrowArgumentMismatchException();
return;
}
args.GetReturnValue()->SetFloat(
- FXSYS_pow((FX_FLOAT)(nFuture / nPresent), (FX_FLOAT)(1 / nTotalNumber)) -
- 1);
+ FXSYS_pow((float)(nFuture / nPresent), (float)(1 / nTotalNumber)) - 1);
}
// static
@@ -2740,17 +2739,17 @@ void CXFA_FM2JSContext::Term(CFXJSE_Value* pThis,
return;
}
- FX_FLOAT nMount = ValueToFloat(pThis, argOne.get());
- FX_FLOAT nRate = ValueToFloat(pThis, argTwo.get());
- FX_FLOAT nFuture = ValueToFloat(pThis, argThree.get());
+ float nMount = ValueToFloat(pThis, argOne.get());
+ float nRate = ValueToFloat(pThis, argTwo.get());
+ float nFuture = ValueToFloat(pThis, argThree.get());
if ((nMount <= 0) || (nRate <= 0) || (nFuture <= 0)) {
pContext->ThrowArgumentMismatchException();
return;
}
args.GetReturnValue()->SetFloat(
- FXSYS_log((FX_FLOAT)(nFuture / nMount * nRate) + 1) /
- FXSYS_log((FX_FLOAT)(1 + nRate)));
+ FXSYS_log((float)(nFuture / nMount * nRate) + 1) /
+ FXSYS_log((float)(1 + nRate)));
}
// static
@@ -2897,9 +2896,9 @@ void CXFA_FM2JSContext::Within(CFXJSE_Value* pThis,
std::unique_ptr<CFXJSE_Value> argLow = GetSimpleValue(pThis, args, 1);
std::unique_ptr<CFXJSE_Value> argHigh = GetSimpleValue(pThis, args, 2);
if (argOne->IsNumber()) {
- FX_FLOAT oneNumber = ValueToFloat(pThis, argOne.get());
- FX_FLOAT lowNumber = ValueToFloat(pThis, argLow.get());
- FX_FLOAT heightNumber = ValueToFloat(pThis, argHigh.get());
+ float oneNumber = ValueToFloat(pThis, argOne.get());
+ float lowNumber = ValueToFloat(pThis, argLow.get());
+ float heightNumber = ValueToFloat(pThis, argHigh.get());
args.GetReturnValue()->SetInteger((oneNumber >= lowNumber) &&
(oneNumber <= heightNumber));
return;
@@ -4373,7 +4372,7 @@ void CXFA_FM2JSContext::Str(CFXJSE_Value* pThis,
args.GetReturnValue()->SetNull();
return;
}
- FX_FLOAT fNumber = ValueToFloat(pThis, numberValue.get());
+ float fNumber = ValueToFloat(pThis, numberValue.get());
int32_t iWidth = 10;
if (argc > 1) {
@@ -4640,7 +4639,7 @@ void CXFA_FM2JSContext::WordNum(CFXJSE_Value* pThis,
args.GetReturnValue()->SetNull();
return;
}
- FX_FLOAT fNumber = ValueToFloat(pThis, numberValue.get());
+ float fNumber = ValueToFloat(pThis, numberValue.get());
int32_t iIdentifier = 0;
if (argc > 1) {
@@ -5019,8 +5018,8 @@ void CXFA_FM2JSContext::logical_or_operator(CFXJSE_Value* pThis,
return;
}
- FX_FLOAT first = ValueToFloat(pThis, argFirst.get());
- FX_FLOAT second = ValueToFloat(pThis, argSecond.get());
+ float first = ValueToFloat(pThis, argFirst.get());
+ float second = ValueToFloat(pThis, argSecond.get());
args.GetReturnValue()->SetInteger((first || second) ? 1 : 0);
}
@@ -5040,8 +5039,8 @@ void CXFA_FM2JSContext::logical_and_operator(CFXJSE_Value* pThis,
return;
}
- FX_FLOAT first = ValueToFloat(pThis, argFirst.get());
- FX_FLOAT second = ValueToFloat(pThis, argSecond.get());
+ float first = ValueToFloat(pThis, argFirst.get());
+ float second = ValueToFloat(pThis, argSecond.get());
args.GetReturnValue()->SetInteger((first && second) ? 1 : 0);
}
@@ -5946,8 +5945,8 @@ bool CXFA_FM2JSContext::simpleValueCompare(CFXJSE_Value* pThis,
return firstString == secondString;
}
if (firstValue->IsNumber()) {
- FX_FLOAT first = ValueToFloat(pThis, firstValue);
- FX_FLOAT second = ValueToFloat(pThis, secondValue);
+ float first = ValueToFloat(pThis, firstValue);
+ float second = ValueToFloat(pThis, secondValue);
return (first == second);
}
if (firstValue->IsBoolean())
@@ -6222,8 +6221,7 @@ int32_t CXFA_FM2JSContext::ValueToInteger(CFXJSE_Value* pThis,
}
// static
-FX_FLOAT CXFA_FM2JSContext::ValueToFloat(CFXJSE_Value* pThis,
- CFXJSE_Value* arg) {
+float CXFA_FM2JSContext::ValueToFloat(CFXJSE_Value* pThis, CFXJSE_Value* arg) {
if (!arg)
return 0.0f;
@@ -6248,7 +6246,7 @@ FX_FLOAT CXFA_FM2JSContext::ValueToFloat(CFXJSE_Value* pThis,
return ValueToFloat(pThis, newPropertyValue.get());
}
if (arg->IsString())
- return (FX_FLOAT)XFA_ByteStringToDouble(arg->ToString().AsStringC());
+ return (float)XFA_ByteStringToDouble(arg->ToString().AsStringC());
if (arg->IsUndefined())
return 0;
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.h b/xfa/fxfa/fm2js/xfa_fm2jscontext.h
index 5008ceda6e..29591f4352 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.h
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.h
@@ -436,7 +436,7 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject {
uint32_t index);
static bool ValueIsNull(CFXJSE_Value* pThis, CFXJSE_Value* pValue);
static int32_t ValueToInteger(CFXJSE_Value* pThis, CFXJSE_Value* pValue);
- static FX_FLOAT ValueToFloat(CFXJSE_Value* pThis, CFXJSE_Value* pValue);
+ static float ValueToFloat(CFXJSE_Value* pThis, CFXJSE_Value* pValue);
static double ValueToDouble(CFXJSE_Value* pThis, CFXJSE_Value* pValue);
static void ValueToUTF8String(CFXJSE_Value* pValue,
CFX_ByteString& outputValue);
diff --git a/xfa/fxfa/fxfa.h b/xfa/fxfa/fxfa.h
index dd5fc0fcbc..8a268269e0 100644
--- a/xfa/fxfa/fxfa.h
+++ b/xfa/fxfa/fxfa.h
@@ -239,8 +239,8 @@ class IXFA_DocEnvironment {
bool bVisible,
const CFX_RectF* pRtAnchor) = 0;
virtual bool GetPopupPos(CXFA_FFWidget* hWidget,
- FX_FLOAT fMinPopup,
- FX_FLOAT fMaxPopup,
+ float fMinPopup,
+ float fMaxPopup,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) = 0;
virtual bool PopupMenu(CXFA_FFWidget* hWidget, CFX_PointF ptPopup) = 0;
diff --git a/xfa/fxfa/fxfa_widget.h b/xfa/fxfa/fxfa_widget.h
index 74c63c9d52..b71c622d74 100644
--- a/xfa/fxfa/fxfa_widget.h
+++ b/xfa/fxfa/fxfa_widget.h
@@ -59,8 +59,8 @@ class CXFA_WidgetAcc : public CXFA_WidgetData {
CFXJSE_Value** pRetValue = nullptr);
CXFA_FFWidget* GetNextWidget(CXFA_FFWidget* pWidget);
- void StartWidgetLayout(FX_FLOAT& fCalcWidth, FX_FLOAT& fCalcHeight);
- bool FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight);
+ void StartWidgetLayout(float& fCalcWidth, float& fCalcHeight);
+ bool FindSplitPos(int32_t iBlockIndex, float& fCalcHeight);
bool LoadCaption();
void LoadText();
bool LoadImageImage();
@@ -77,9 +77,9 @@ class CXFA_WidgetAcc : public CXFA_WidgetData {
CXFA_Node* GetDatasets();
CFX_RetainPtr<CFGAS_GEFont> GetFDEFont();
- FX_FLOAT GetFontSize();
+ float GetFontSize();
FX_ARGB GetTextColor();
- FX_FLOAT GetLineHeight();
+ float GetLineHeight();
CXFA_WidgetLayoutData* GetWidgetLayoutData();
protected:
@@ -102,16 +102,16 @@ class CXFA_WidgetAcc : public CXFA_WidgetData {
bool CalculateImageEditAutoSize(CFX_SizeF& size);
bool CalculateImageAutoSize(CFX_SizeF& size);
bool CalculateTextAutoSize(CFX_SizeF& size);
- FX_FLOAT CalculateWidgetAutoHeight(FX_FLOAT fHeightCalc);
- FX_FLOAT CalculateWidgetAutoWidth(FX_FLOAT fWidthCalc);
- FX_FLOAT GetWidthWithoutMargin(FX_FLOAT fWidthCalc);
- FX_FLOAT GetHeightWithoutMargin(FX_FLOAT fHeightCalc);
+ float CalculateWidgetAutoHeight(float fHeightCalc);
+ float CalculateWidgetAutoWidth(float fWidthCalc);
+ float GetWidthWithoutMargin(float fWidthCalc);
+ float GetHeightWithoutMargin(float fHeightCalc);
void CalculateTextContentSize(CFX_SizeF& size);
void CalculateAccWidthAndHeight(XFA_Element eUIType,
- FX_FLOAT& fWidth,
- FX_FLOAT& fCalcHeight);
+ float& fWidth,
+ float& fCalcHeight);
void InitLayoutData();
- void StartTextLayout(FX_FLOAT& fCalcWidth, FX_FLOAT& fCalcHeight);
+ void StartTextLayout(float& fCalcWidth, float& fCalcHeight);
CXFA_FFDocView* m_pDocView;
std::unique_ptr<CXFA_WidgetLayoutData> m_pLayoutData;
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;
}
diff --git a/xfa/fxfa/xfa_ffwidget.h b/xfa/fxfa/xfa_ffwidget.h
index 5345bc451e..7b923506ff 100644
--- a/xfa/fxfa/xfa_ffwidget.h
+++ b/xfa/fxfa/xfa_ffwidget.h
@@ -21,7 +21,7 @@ class CXFA_FFDoc;
class CXFA_FFApp;
enum class FWL_WidgetHit;
-inline FX_FLOAT XFA_UnitPx2Pt(FX_FLOAT fPx, FX_FLOAT fDpi) {
+inline float XFA_UnitPx2Pt(float fPx, float fDpi) {
return fPx * 72.0f / fDpi;
}
diff --git a/xfa/fxfa/xfa_ffwidgethandler.h b/xfa/fxfa/xfa_ffwidgethandler.h
index 66bda3e02a..01bdd66786 100644
--- a/xfa/fxfa/xfa_ffwidgethandler.h
+++ b/xfa/fxfa/xfa_ffwidgethandler.h
@@ -108,7 +108,7 @@ class CXFA_FFWidgetHandler {
CXFA_Node* CreateFontNode(CXFA_Node* pParent) const;
CXFA_Node* CreateMarginNode(CXFA_Node* pParent,
uint32_t dwFlags,
- FX_FLOAT fInsets[4]) const;
+ float fInsets[4]) const;
CXFA_Node* CreateValueNode(XFA_Element eValue, CXFA_Node* pParent) const;
CXFA_Document* GetObjFactory() const;
CXFA_Document* GetXFADoc() const;