summaryrefslogtreecommitdiff
path: root/xfa
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
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')
-rw-r--r--xfa/fde/cfde_path.cpp41
-rw-r--r--xfa/fde/cfde_path.h10
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp2
-rw-r--r--xfa/fde/cfde_txtedtengine.h2
-rw-r--r--xfa/fde/cfde_txtedtpage.cpp20
-rw-r--r--xfa/fde/cfde_txtedtpage.h2
-rw-r--r--xfa/fde/cfde_txtedttextset.cpp2
-rw-r--r--xfa/fde/cfde_txtedttextset.h2
-rw-r--r--xfa/fde/css/cfde_csscomputedstyle.cpp12
-rw-r--r--xfa/fde/css/cfde_csscomputedstyle.h18
-rw-r--r--xfa/fde/css/cfde_cssdeclaration.cpp12
-rw-r--r--xfa/fde/css/cfde_cssnumbervalue.cpp4
-rw-r--r--xfa/fde/css/cfde_cssnumbervalue.h8
-rw-r--r--xfa/fde/css/cfde_cssstyleselector.cpp12
-rw-r--r--xfa/fde/css/cfde_cssstyleselector.h8
-rw-r--r--xfa/fde/css/fde_css.h12
-rw-r--r--xfa/fde/fde_gedevice.cpp48
-rw-r--r--xfa/fde/fde_gedevice.h32
-rw-r--r--xfa/fde/fde_render.cpp6
-rw-r--r--xfa/fde/ifde_txtedtengine.h12
-rw-r--r--xfa/fde/tto/fde_textout.cpp69
-rw-r--r--xfa/fde/tto/fde_textout.h29
-rw-r--r--xfa/fde/xml/fde_xml_imp.cpp13
-rw-r--r--xfa/fde/xml/fde_xml_imp.h8
-rw-r--r--xfa/fgas/layout/fgas_rtfbreak.cpp28
-rw-r--r--xfa/fgas/layout/fgas_rtfbreak.h16
-rw-r--r--xfa/fgas/layout/fgas_textbreak.cpp48
-rw-r--r--xfa/fgas/layout/fgas_textbreak.h14
-rw-r--r--xfa/fgas/localization/fgas_locale.cpp28
-rw-r--r--xfa/fgas/localization/fgas_locale.h2
-rw-r--r--xfa/fgas/localization/fgas_localeimp.h4
-rw-r--r--xfa/fwl/cfwl_checkbox.cpp4
-rw-r--r--xfa/fwl/cfwl_checkbox.h4
-rw-r--r--xfa/fwl/cfwl_combobox.cpp14
-rw-r--r--xfa/fwl/cfwl_datetimepicker.cpp6
-rw-r--r--xfa/fwl/cfwl_datetimepicker.h2
-rw-r--r--xfa/fwl/cfwl_edit.cpp78
-rw-r--r--xfa/fwl/cfwl_edit.h18
-rw-r--r--xfa/fwl/cfwl_eventscroll.h2
-rw-r--r--xfa/fwl/cfwl_form.cpp4
-rw-r--r--xfa/fwl/cfwl_form.h4
-rw-r--r--xfa/fwl/cfwl_listbox.cpp39
-rw-r--r--xfa/fwl/cfwl_listbox.h18
-rw-r--r--xfa/fwl/cfwl_monthcalendar.cpp24
-rw-r--r--xfa/fwl/cfwl_scrollbar.cpp33
-rw-r--r--xfa/fwl/cfwl_scrollbar.h40
-rw-r--r--xfa/fwl/cfwl_widget.cpp37
-rw-r--r--xfa/fwl/cfwl_widget.h18
-rw-r--r--xfa/fwl/cfwl_widgetmgr.cpp8
-rw-r--r--xfa/fwl/cfwl_widgetmgr.h4
-rw-r--r--xfa/fwl/cfx_barcode.cpp2
-rw-r--r--xfa/fwl/cfx_barcode.h2
-rw-r--r--xfa/fwl/theme/cfwl_checkboxtp.cpp32
-rw-r--r--xfa/fwl/theme/cfwl_checkboxtp.h2
-rw-r--r--xfa/fwl/theme/cfwl_edittp.cpp4
-rw-r--r--xfa/fwl/theme/cfwl_pushbuttontp.cpp4
-rw-r--r--xfa/fwl/theme/cfwl_scrollbartp.cpp24
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.cpp22
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.h8
-rw-r--r--xfa/fxbarcode/BC_TwoDimWriter.cpp26
-rw-r--r--xfa/fxbarcode/cbc_onecode.cpp2
-rw-r--r--xfa/fxbarcode/cbc_onecode.h2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp10
-rw-r--r--xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h2
-rw-r--r--xfa/fxbarcode/oned/BC_OneDimWriter.cpp90
-rw-r--r--xfa/fxbarcode/oned/BC_OneDimWriter.h22
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp51
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp39
-rw-r--r--xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp63
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417.cpp4
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417.h6
-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
-rw-r--r--xfa/fxgraphics/cfx_graphics.cpp77
-rw-r--r--xfa/fxgraphics/cfx_graphics.h4
-rw-r--r--xfa/fxgraphics/cfx_path.cpp37
-rw-r--r--xfa/fxgraphics/cfx_path.h17
-rw-r--r--xfa/fxgraphics/cfx_shading.cpp14
-rw-r--r--xfa/fxgraphics/cfx_shading.h8
135 files changed, 1316 insertions, 1364 deletions
diff --git a/xfa/fde/cfde_path.cpp b/xfa/fde/cfde_path.cpp
index 5e6cf5cf56..32f67e31a0 100644
--- a/xfa/fde/cfde_path.cpp
+++ b/xfa/fde/cfde_path.cpp
@@ -36,16 +36,15 @@ void CFDE_Path::BezierTo(const CFX_PointF& p1,
void CFDE_Path::ArcTo(bool bStart,
const CFX_RectF& rect,
- FX_FLOAT startAngle,
- FX_FLOAT endAngle) {
- FX_FLOAT rx = rect.width / 2;
- FX_FLOAT ry = rect.height / 2;
- FX_FLOAT cx = rect.left + rx;
- FX_FLOAT cy = rect.top + ry;
- FX_FLOAT alpha =
+ float startAngle,
+ float endAngle) {
+ float rx = rect.width / 2;
+ float ry = rect.height / 2;
+ float cx = rect.left + rx;
+ float cy = rect.top + ry;
+ float alpha =
FXSYS_atan2(rx * FXSYS_sin(startAngle), ry * FXSYS_cos(startAngle));
- FX_FLOAT beta =
- FXSYS_atan2(rx * FXSYS_sin(endAngle), ry * FXSYS_cos(endAngle));
+ float beta = FXSYS_atan2(rx * FXSYS_sin(endAngle), ry * FXSYS_cos(endAngle));
if (FXSYS_fabs(beta - alpha) > FX_PI) {
if (beta > alpha)
beta -= 2 * FX_PI;
@@ -53,12 +52,12 @@ void CFDE_Path::ArcTo(bool bStart,
alpha -= 2 * FX_PI;
}
- FX_FLOAT half_delta = (beta - alpha) / 2;
- FX_FLOAT bcp = 4.0f / 3 * (1 - FXSYS_cos(half_delta)) / FXSYS_sin(half_delta);
- FX_FLOAT sin_alpha = FXSYS_sin(alpha);
- FX_FLOAT sin_beta = FXSYS_sin(beta);
- FX_FLOAT cos_alpha = FXSYS_cos(alpha);
- FX_FLOAT cos_beta = FXSYS_cos(beta);
+ float half_delta = (beta - alpha) / 2;
+ float bcp = 4.0f / 3 * (1 - FXSYS_cos(half_delta)) / FXSYS_sin(half_delta);
+ float sin_alpha = FXSYS_sin(alpha);
+ float sin_beta = FXSYS_sin(beta);
+ float cos_alpha = FXSYS_cos(alpha);
+ float cos_beta = FXSYS_cos(beta);
if (bStart)
MoveTo(CFX_PointF(cx + rx * cos_alpha, cy + ry * sin_alpha));
@@ -92,13 +91,13 @@ void CFDE_Path::AddBeziers(const std::vector<CFX_PointF>& points) {
void CFDE_Path::GetCurveTangents(const std::vector<CFX_PointF>& points,
std::vector<CFX_PointF>* tangents,
bool bClosed,
- FX_FLOAT fTension) const {
+ float fTension) const {
int32_t iCount = pdfium::CollectionSize<int32_t>(points);
tangents->resize(iCount);
if (iCount < 3)
return;
- FX_FLOAT fCoefficient = fTension / 3.0f;
+ float fCoefficient = fTension / 3.0f;
const CFX_PointF* pPoints = points.data();
CFX_PointF* pTangents = tangents->data();
for (int32_t i = 0; i < iCount; ++i) {
@@ -116,7 +115,7 @@ void CFDE_Path::GetCurveTangents(const std::vector<CFX_PointF>& points,
void CFDE_Path::AddCurve(const std::vector<CFX_PointF>& points,
bool bClosed,
- FX_FLOAT fTension) {
+ float fTension) {
int32_t iLast = pdfium::CollectionSize<int32_t>(points) - 1;
if (iLast < 1)
return;
@@ -144,8 +143,8 @@ void CFDE_Path::AddCurve(const std::vector<CFX_PointF>& points,
}
void CFDE_Path::AddEllipse(const CFX_RectF& rect) {
- FX_FLOAT fStartAngle = 0;
- FX_FLOAT fEndAngle = FX_PI / 2;
+ float fStartAngle = 0;
+ float fEndAngle = FX_PI / 2;
for (int32_t i = 0; i < 4; ++i) {
ArcTo(i == 0, rect, fStartAngle, fEndAngle);
fStartAngle += FX_PI / 2;
@@ -216,7 +215,7 @@ CFX_RectF CFDE_Path::GetBBox() const {
return bbox;
}
-CFX_RectF CFDE_Path::GetBBox(FX_FLOAT fLineWidth, FX_FLOAT fMiterLimit) const {
+CFX_RectF CFDE_Path::GetBBox(float fLineWidth, float fMiterLimit) const {
CFX_FloatRect rect = m_Path.GetBoundingBox(fLineWidth, fMiterLimit);
CFX_RectF bbox = CFX_RectF(rect.left, rect.top, rect.Width(), rect.Height());
bbox.Normalize();
diff --git a/xfa/fde/cfde_path.h b/xfa/fde/cfde_path.h
index 99ff4d3680..b0a229f172 100644
--- a/xfa/fde/cfde_path.h
+++ b/xfa/fde/cfde_path.h
@@ -20,7 +20,7 @@ class CFDE_Path {
void AddBeziers(const std::vector<CFX_PointF>& points);
void AddCurve(const std::vector<CFX_PointF>& points,
bool bClosed,
- FX_FLOAT fTension = 0.5f);
+ float fTension = 0.5f);
void AddEllipse(const CFX_RectF& rect);
void AddLines(const std::vector<CFX_PointF>& points);
void AddLine(const CFX_PointF& pt1, const CFX_PointF& pt2);
@@ -29,7 +29,7 @@ class CFDE_Path {
void AddRectangle(const CFX_RectF& rect);
CFX_RectF GetBBox() const;
- CFX_RectF GetBBox(FX_FLOAT fLineWidth, FX_FLOAT fMiterLimit) const;
+ CFX_RectF GetBBox(float fLineWidth, float fMiterLimit) const;
bool FigureClosed() const;
void BezierTo(const CFX_PointF& p1,
@@ -37,15 +37,15 @@ class CFDE_Path {
const CFX_PointF& p3);
void ArcTo(bool bStart,
const CFX_RectF& rect,
- FX_FLOAT startAngle,
- FX_FLOAT endAngle);
+ float startAngle,
+ float endAngle);
void MoveTo(const CFX_PointF& p);
void LineTo(const CFX_PointF& p);
void GetCurveTangents(const std::vector<CFX_PointF>& points,
std::vector<CFX_PointF>* tangents,
bool bClosed,
- FX_FLOAT fTension) const;
+ float fTension) const;
CFX_PathData m_Path;
};
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index 33efa2ddf0..380948e899 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -1029,7 +1029,7 @@ void CFDE_TxtEdtEngine::UpdateTxtBreak() {
m_nPageLineCount = m_Param.nLineCount;
if (m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_CombText) {
- FX_FLOAT fCombWidth = m_Param.fPlateWidth;
+ float fCombWidth = m_Param.fPlateWidth;
if (m_nLimit > 0)
fCombWidth /= m_nLimit;
diff --git a/xfa/fde/cfde_txtedtengine.h b/xfa/fde/cfde_txtedtengine.h
index 63d97d33a3..5499189295 100644
--- a/xfa/fde/cfde_txtedtengine.h
+++ b/xfa/fde/cfde_txtedtengine.h
@@ -157,7 +157,7 @@ class CFDE_TxtEdtEngine {
int32_t m_nLineCount;
int32_t m_nAnchorPos;
int32_t m_nLayoutPos;
- FX_FLOAT m_fCaretPosReserve;
+ float m_fCaretPosReserve;
int32_t m_nCaret;
bool m_bBefore;
int32_t m_nCaretPage;
diff --git a/xfa/fde/cfde_txtedtpage.cpp b/xfa/fde/cfde_txtedtpage.cpp
index f229a01fcb..4bf3e9fb5e 100644
--- a/xfa/fde/cfde_txtedtpage.cpp
+++ b/xfa/fde/cfde_txtedtpage.cpp
@@ -262,9 +262,9 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
m_pEndParag->GetLineRange(nEndLine - nEndLineInParag, nPageEnd, nTemp);
nPageEnd += (nTemp - 1);
- FX_FLOAT fLineStart = 0.0f;
- FX_FLOAT fLineStep = pParams->fLineSpace;
- FX_FLOAT fLinePos = fLineStart;
+ float fLineStart = 0.0f;
+ float fLineStep = pParams->fLineSpace;
+ float fLinePos = fLineStart;
if (!m_pTextSet)
m_pTextSet = pdfium::MakeUnique<CFDE_TxtEdtTextSet>(this);
@@ -278,7 +278,7 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
m_nPageStart = nPageStart;
m_nCharCount = nPageEnd - nPageStart + 1;
bool bReload = false;
- FX_FLOAT fDefCharWidth = 0;
+ float fDefCharWidth = 0;
std::unique_ptr<IFX_CharIter> pIter(m_pIter->Clone());
pIter->SetAt(nPageStart);
m_pIter->SetAt(nPageStart);
@@ -306,7 +306,7 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
if (FX_IsOdd(pPiece->m_iBidiLevel)) {
TxtEdtPiece.dwCharStyles |= FX_TXTCHARSTYLE_OddBidiLevel;
}
- FX_FLOAT fParaBreakWidth = 0.0f;
+ float fParaBreakWidth = 0.0f;
if (!CFX_BreakTypeNoneOrPiece(pPiece->m_dwStatus)) {
wchar_t wRtChar = pParams->wLineBreakChar;
if (TxtEdtPiece.nCount >= 2) {
@@ -329,10 +329,10 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
}
}
- TxtEdtPiece.rtPiece.left = (FX_FLOAT)pPiece->m_iStartPos / 20000.0f;
+ TxtEdtPiece.rtPiece.left = (float)pPiece->m_iStartPos / 20000.0f;
TxtEdtPiece.rtPiece.top = fLinePos;
TxtEdtPiece.rtPiece.width =
- (FX_FLOAT)pPiece->m_iWidth / 20000.0f + fParaBreakWidth;
+ (float)pPiece->m_iWidth / 20000.0f + fParaBreakWidth;
TxtEdtPiece.rtPiece.height = pParams->fLineSpace;
if (bFirstPiece) {
@@ -357,7 +357,7 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
}
} while (pIter->Next(false) && (pIter->GetAt() <= nPageEnd));
if (m_rtPageContents.left != 0) {
- FX_FLOAT fDelta = 0.0f;
+ float fDelta = 0.0f;
if (m_rtPageContents.width < pParams->fPlateWidth) {
if (pParams->dwAlignment & FDE_TEXTEDITALIGN_Right) {
fDelta = pParams->fPlateWidth - m_rtPageContents.width;
@@ -372,7 +372,7 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
}
}
}
- FX_FLOAT fOffset = m_rtPageContents.left - fDelta;
+ float fOffset = m_rtPageContents.left - fDelta;
for (auto& piece : m_Pieces)
piece.rtPiece.Offset(-fOffset, 0.0f);
@@ -453,7 +453,7 @@ int32_t CFDE_TxtEdtPage::GetWidth(const FDE_TEXTEDITPIECE* pIdentity,
void CFDE_TxtEdtPage::NormalizePt2Rect(CFX_PointF& ptF,
const CFX_RectF& rtF,
- FX_FLOAT fTolerance) const {
+ float fTolerance) const {
if (rtF.Contains(ptF))
return;
if (ptF.x < rtF.left)
diff --git a/xfa/fde/cfde_txtedtpage.h b/xfa/fde/cfde_txtedtpage.h
index 11c8050735..d2496195a5 100644
--- a/xfa/fde/cfde_txtedtpage.h
+++ b/xfa/fde/cfde_txtedtpage.h
@@ -55,7 +55,7 @@ class CFDE_TxtEdtPage : public IFDE_VisualSet {
private:
void NormalizePt2Rect(CFX_PointF& ptF,
const CFX_RectF& rtF,
- FX_FLOAT fTolerance) const;
+ float fTolerance) const;
std::unique_ptr<IFX_CharIter> m_pIter;
std::unique_ptr<CFDE_TxtEdtTextSet> m_pTextSet;
diff --git a/xfa/fde/cfde_txtedttextset.cpp b/xfa/fde/cfde_txtedttextset.cpp
index 78a7ec49d5..ff7b39bb9f 100644
--- a/xfa/fde/cfde_txtedttextset.cpp
+++ b/xfa/fde/cfde_txtedttextset.cpp
@@ -38,7 +38,7 @@ CFX_RetainPtr<CFGAS_GEFont> CFDE_TxtEdtTextSet::GetFont() {
return m_pPage->GetEngine()->GetEditParams()->pFont;
}
-FX_FLOAT CFDE_TxtEdtTextSet::GetFontSize() {
+float CFDE_TxtEdtTextSet::GetFontSize() {
return m_pPage->GetEngine()->GetEditParams()->fFontSize;
}
diff --git a/xfa/fde/cfde_txtedttextset.h b/xfa/fde/cfde_txtedttextset.h
index 8046d38d79..35f7472b1f 100644
--- a/xfa/fde/cfde_txtedttextset.h
+++ b/xfa/fde/cfde_txtedttextset.h
@@ -24,7 +24,7 @@ class CFDE_TxtEdtTextSet : public IFDE_VisualSet {
int32_t GetString(FDE_TEXTEDITPIECE* pPiece, CFX_WideString& wsText);
CFX_RetainPtr<CFGAS_GEFont> GetFont();
- FX_FLOAT GetFontSize();
+ float GetFontSize();
FX_ARGB GetFontColor();
int32_t GetDisplayPos(const FDE_TEXTEDITPIECE& pPiece,
FXTEXT_CHARPOS* pCharPos,
diff --git a/xfa/fde/css/cfde_csscomputedstyle.cpp b/xfa/fde/css/cfde_csscomputedstyle.cpp
index 01872d18fc..92184d4259 100644
--- a/xfa/fde/css/cfde_csscomputedstyle.cpp
+++ b/xfa/fde/css/cfde_csscomputedstyle.cpp
@@ -50,7 +50,7 @@ FDE_CSSFontStyle CFDE_CSSComputedStyle::GetFontStyle() const {
return m_InheritedData.m_eFontStyle;
}
-FX_FLOAT CFDE_CSSComputedStyle::GetFontSize() const {
+float CFDE_CSSComputedStyle::GetFontSize() const {
return m_InheritedData.m_fFontSize;
}
@@ -70,7 +70,7 @@ void CFDE_CSSComputedStyle::SetFontStyle(FDE_CSSFontStyle eFontStyle) {
m_InheritedData.m_eFontStyle = eFontStyle;
}
-void CFDE_CSSComputedStyle::SetFontSize(FX_FLOAT fFontSize) {
+void CFDE_CSSComputedStyle::SetFontSize(float fFontSize) {
m_InheritedData.m_fFontSize = fFontSize;
}
@@ -107,7 +107,7 @@ FDE_CSSDisplay CFDE_CSSComputedStyle::GetDisplay() const {
return m_NonInheritedData.m_eDisplay;
}
-FX_FLOAT CFDE_CSSComputedStyle::GetLineHeight() const {
+float CFDE_CSSComputedStyle::GetLineHeight() const {
return m_InheritedData.m_fLineHeight;
}
@@ -123,7 +123,7 @@ FDE_CSSVerticalAlign CFDE_CSSComputedStyle::GetVerticalAlign() const {
return m_NonInheritedData.m_eVerticalAlign;
}
-FX_FLOAT CFDE_CSSComputedStyle::GetNumberVerticalAlign() const {
+float CFDE_CSSComputedStyle::GetNumberVerticalAlign() const {
return m_NonInheritedData.m_fVerticalAlign;
}
@@ -135,7 +135,7 @@ const FDE_CSSLength& CFDE_CSSComputedStyle::GetLetterSpacing() const {
return m_InheritedData.m_LetterSpacing;
}
-void CFDE_CSSComputedStyle::SetLineHeight(FX_FLOAT fLineHeight) {
+void CFDE_CSSComputedStyle::SetLineHeight(float fLineHeight) {
m_InheritedData.m_fLineHeight = fLineHeight;
}
@@ -147,7 +147,7 @@ void CFDE_CSSComputedStyle::SetTextAlign(FDE_CSSTextAlign eTextAlign) {
m_InheritedData.m_eTextAlign = eTextAlign;
}
-void CFDE_CSSComputedStyle::SetNumberVerticalAlign(FX_FLOAT fAlign) {
+void CFDE_CSSComputedStyle::SetNumberVerticalAlign(float fAlign) {
m_NonInheritedData.m_eVerticalAlign = FDE_CSSVerticalAlign::Number,
m_NonInheritedData.m_fVerticalAlign = fAlign;
}
diff --git a/xfa/fde/css/cfde_csscomputedstyle.h b/xfa/fde/css/cfde_csscomputedstyle.h
index bba4ccbcd4..448d2467ab 100644
--- a/xfa/fde/css/cfde_csscomputedstyle.h
+++ b/xfa/fde/css/cfde_csscomputedstyle.h
@@ -27,8 +27,8 @@ class CFDE_CSSComputedStyle : public CFX_Retainable {
FDE_CSSLength m_WordSpacing;
FDE_CSSLength m_TextIndent;
CFX_RetainPtr<CFDE_CSSValueList> m_pFontFamily;
- FX_FLOAT m_fFontSize;
- FX_FLOAT m_fLineHeight;
+ float m_fFontSize;
+ float m_fLineHeight;
FX_ARGB m_dwFontColor;
uint16_t m_wFontWeight;
FDE_CSSFontVariant m_eFontVariant;
@@ -47,7 +47,7 @@ class CFDE_CSSComputedStyle : public CFX_Retainable {
FDE_CSSLength m_Bottom;
FDE_CSSLength m_Left;
FDE_CSSLength m_Right;
- FX_FLOAT m_fVerticalAlign;
+ float m_fVerticalAlign;
FDE_CSSDisplay m_eDisplay;
FDE_CSSVerticalAlign m_eVerticalAlign;
uint8_t m_dwTextDecoration;
@@ -61,12 +61,12 @@ class CFDE_CSSComputedStyle : public CFX_Retainable {
uint16_t GetFontWeight() const;
FDE_CSSFontVariant GetFontVariant() const;
FDE_CSSFontStyle GetFontStyle() const;
- FX_FLOAT GetFontSize() const;
+ float GetFontSize() const;
FX_ARGB GetColor() const;
void SetFontWeight(uint16_t wFontWeight);
void SetFontVariant(FDE_CSSFontVariant eFontVariant);
void SetFontStyle(FDE_CSSFontStyle eFontStyle);
- void SetFontSize(FX_FLOAT fFontSize);
+ void SetFontSize(float fFontSize);
void SetColor(FX_ARGB dwFontColor);
const FDE_CSSRect* GetBorderWidth() const;
@@ -77,17 +77,17 @@ class CFDE_CSSComputedStyle : public CFX_Retainable {
FDE_CSSDisplay GetDisplay() const;
- FX_FLOAT GetLineHeight() const;
+ float GetLineHeight() const;
const FDE_CSSLength& GetTextIndent() const;
FDE_CSSTextAlign GetTextAlign() const;
FDE_CSSVerticalAlign GetVerticalAlign() const;
- FX_FLOAT GetNumberVerticalAlign() const;
+ float GetNumberVerticalAlign() const;
uint32_t GetTextDecoration() const;
const FDE_CSSLength& GetLetterSpacing() const;
- void SetLineHeight(FX_FLOAT fLineHeight);
+ void SetLineHeight(float fLineHeight);
void SetTextIndent(const FDE_CSSLength& textIndent);
void SetTextAlign(FDE_CSSTextAlign eTextAlign);
- void SetNumberVerticalAlign(FX_FLOAT fAlign);
+ void SetNumberVerticalAlign(float fAlign);
void SetTextDecoration(uint32_t dwTextDecoration);
void SetLetterSpacing(const FDE_CSSLength& letterSpacing);
void AddCustomStyle(const CFDE_CSSCustomProperty& prop);
diff --git a/xfa/fde/css/cfde_cssdeclaration.cpp b/xfa/fde/css/cfde_cssdeclaration.cpp
index 2d1e707caa..8983059220 100644
--- a/xfa/fde/css/cfde_cssdeclaration.cpp
+++ b/xfa/fde/css/cfde_cssdeclaration.cpp
@@ -25,7 +25,7 @@ uint8_t Hex2Dec(uint8_t hexHigh, uint8_t hexLow) {
bool ParseCSSNumber(const wchar_t* pszValue,
int32_t iValueLen,
- FX_FLOAT& fValue,
+ float& fValue,
FDE_CSSNumberType& eUnit) {
ASSERT(pszValue && iValueLen > 0);
int32_t iUsedLen = 0;
@@ -100,7 +100,7 @@ bool CFDE_CSSDeclaration::ParseCSSColor(const wchar_t* pszValue,
return false;
uint8_t rgb[3] = {0};
- FX_FLOAT fValue;
+ float fValue;
FDE_CSSPrimitiveType eType;
CFDE_CSSValueListParser list(pszValue + 4, iValueLen - 5, ',');
for (int32_t i = 0; i < 3; ++i) {
@@ -279,7 +279,7 @@ void CFDE_CSSDeclaration::AddProperty(const CFX_WideString& prop,
CFX_RetainPtr<CFDE_CSSValue> CFDE_CSSDeclaration::ParseNumber(
const wchar_t* pszValue,
int32_t iValueLen) {
- FX_FLOAT fValue;
+ float fValue;
FDE_CSSNumberType eUnit;
if (!ParseCSSNumber(pszValue, iValueLen, fValue, eUnit))
return nullptr;
@@ -334,7 +334,7 @@ void CFDE_CSSDeclaration::ParseValueListProperty(
switch (eType) {
case FDE_CSSPrimitiveType::Number:
if (dwType & FDE_CSSVALUETYPE_MaybeNumber) {
- FX_FLOAT fValue;
+ float fValue;
FDE_CSSNumberType eNumType;
if (ParseCSSNumber(pszValue, iValueLen, fValue, eNumType))
list.push_back(
@@ -457,7 +457,7 @@ bool CFDE_CSSDeclaration::ParseBorderProperty(
if (pWidth)
continue;
- FX_FLOAT fValue;
+ float fValue;
FDE_CSSNumberType eNumType;
if (ParseCSSNumber(pszValue, iValueLen, fValue, eNumType))
pWidth = pdfium::MakeRetain<CFDE_CSSNumberValue>(eNumType, fValue);
@@ -569,7 +569,7 @@ void CFDE_CSSDeclaration::ParseFontProperty(const wchar_t* pszValue,
break;
}
case FDE_CSSPrimitiveType::Number: {
- FX_FLOAT fValue;
+ float fValue;
FDE_CSSNumberType eNumType;
if (!ParseCSSNumber(pszValue, iValueLen, fValue, eNumType))
break;
diff --git a/xfa/fde/css/cfde_cssnumbervalue.cpp b/xfa/fde/css/cfde_cssnumbervalue.cpp
index 71566ca5a3..e74ca5b859 100644
--- a/xfa/fde/css/cfde_cssnumbervalue.cpp
+++ b/xfa/fde/css/cfde_cssnumbervalue.cpp
@@ -6,7 +6,7 @@
#include "xfa/fde/css/cfde_cssnumbervalue.h"
-CFDE_CSSNumberValue::CFDE_CSSNumberValue(FDE_CSSNumberType type, FX_FLOAT value)
+CFDE_CSSNumberValue::CFDE_CSSNumberValue(FDE_CSSNumberType type, float value)
: CFDE_CSSValue(FDE_CSSPrimitiveType::Number), type_(type), value_(value) {
if (type_ == FDE_CSSNumberType::Number && FXSYS_fabs(value_) < 0.001f)
value_ = 0.0f;
@@ -14,7 +14,7 @@ CFDE_CSSNumberValue::CFDE_CSSNumberValue(FDE_CSSNumberType type, FX_FLOAT value)
CFDE_CSSNumberValue::~CFDE_CSSNumberValue() {}
-FX_FLOAT CFDE_CSSNumberValue::Apply(FX_FLOAT percentBase) const {
+float CFDE_CSSNumberValue::Apply(float percentBase) const {
switch (type_) {
case FDE_CSSNumberType::Pixels:
case FDE_CSSNumberType::Number:
diff --git a/xfa/fde/css/cfde_cssnumbervalue.h b/xfa/fde/css/cfde_cssnumbervalue.h
index 29e562e1e3..c4d0bd25f0 100644
--- a/xfa/fde/css/cfde_cssnumbervalue.h
+++ b/xfa/fde/css/cfde_cssnumbervalue.h
@@ -25,17 +25,17 @@ enum class FDE_CSSNumberType {
class CFDE_CSSNumberValue : public CFDE_CSSValue {
public:
- CFDE_CSSNumberValue(FDE_CSSNumberType type, FX_FLOAT value);
+ CFDE_CSSNumberValue(FDE_CSSNumberType type, float value);
~CFDE_CSSNumberValue() override;
- FX_FLOAT Value() const { return value_; }
+ float Value() const { return value_; }
FDE_CSSNumberType Kind() const { return type_; }
- FX_FLOAT Apply(FX_FLOAT percentBase) const;
+ float Apply(float percentBase) const;
private:
FDE_CSSNumberType type_;
- FX_FLOAT value_;
+ float value_;
};
#endif // XFA_FDE_CSS_CFDE_CSSNUMBERVALUE_H_
diff --git a/xfa/fde/css/cfde_cssstyleselector.cpp b/xfa/fde/css/cfde_cssstyleselector.cpp
index 08cd0e9251..42cc7afc23 100644
--- a/xfa/fde/css/cfde_cssstyleselector.cpp
+++ b/xfa/fde/css/cfde_cssstyleselector.cpp
@@ -27,7 +27,7 @@ CFDE_CSSStyleSelector::CFDE_CSSStyleSelector(CFGAS_FontMgr* pFontMgr)
CFDE_CSSStyleSelector::~CFDE_CSSStyleSelector() {}
-void CFDE_CSSStyleSelector::SetDefFontSize(FX_FLOAT fFontSize) {
+void CFDE_CSSStyleSelector::SetDefFontSize(float fFontSize) {
ASSERT(fFontSize > 0);
m_fDefFontSize = fFontSize;
}
@@ -185,7 +185,7 @@ void CFDE_CSSStyleSelector::ApplyProperty(
}
break;
case FDE_CSSProperty::FontSize: {
- FX_FLOAT& fFontSize = pComputedStyle->m_InheritedData.m_fFontSize;
+ float& fFontSize = pComputedStyle->m_InheritedData.m_fFontSize;
if (eType == FDE_CSSPrimitiveType::Number) {
fFontSize = pValue.As<CFDE_CSSNumberValue>()->Apply(fFontSize);
} else if (eType == FDE_CSSPrimitiveType::Enum) {
@@ -478,7 +478,7 @@ bool CFDE_CSSStyleSelector::SetLengthWithPercent(
FDE_CSSLength& width,
FDE_CSSPrimitiveType eType,
const CFX_RetainPtr<CFDE_CSSValue>& pValue,
- FX_FLOAT fFontSize) {
+ float fFontSize) {
if (eType == FDE_CSSPrimitiveType::Number) {
CFX_RetainPtr<CFDE_CSSNumberValue> v = pValue.As<CFDE_CSSNumberValue>();
if (v->Kind() == FDE_CSSNumberType::Percent) {
@@ -487,7 +487,7 @@ bool CFDE_CSSStyleSelector::SetLengthWithPercent(
return width.NonZero();
}
- FX_FLOAT fValue = v->Apply(fFontSize);
+ float fValue = v->Apply(fFontSize);
width.Set(FDE_CSSLengthUnit::Point, fValue);
return width.NonZero();
} else if (eType == FDE_CSSPrimitiveType::Enum) {
@@ -514,8 +514,8 @@ bool CFDE_CSSStyleSelector::SetLengthWithPercent(
return false;
}
-FX_FLOAT CFDE_CSSStyleSelector::ToFontSize(FDE_CSSPropertyValue eValue,
- FX_FLOAT fCurFontSize) {
+float CFDE_CSSStyleSelector::ToFontSize(FDE_CSSPropertyValue eValue,
+ float fCurFontSize) {
switch (eValue) {
case FDE_CSSPropertyValue::XxSmall:
return m_fDefFontSize / 1.2f / 1.2f / 1.2f;
diff --git a/xfa/fde/css/cfde_cssstyleselector.h b/xfa/fde/css/cfde_cssstyleselector.h
index c7b6b4164a..0783e72541 100644
--- a/xfa/fde/css/cfde_cssstyleselector.h
+++ b/xfa/fde/css/cfde_cssstyleselector.h
@@ -30,7 +30,7 @@ class CFDE_CSSStyleSelector {
explicit CFDE_CSSStyleSelector(CFGAS_FontMgr* pFontMgr);
~CFDE_CSSStyleSelector();
- void SetDefFontSize(FX_FLOAT fFontSize);
+ void SetDefFontSize(float fFontSize);
void SetUAStyleSheet(std::unique_ptr<CFDE_CSSStyleSheet> pSheet);
void UpdateStyleIndex();
@@ -68,8 +68,8 @@ class CFDE_CSSStyleSelector {
bool SetLengthWithPercent(FDE_CSSLength& width,
FDE_CSSPrimitiveType eType,
const CFX_RetainPtr<CFDE_CSSValue>& pValue,
- FX_FLOAT fFontSize);
- FX_FLOAT ToFontSize(FDE_CSSPropertyValue eValue, FX_FLOAT fCurFontSize);
+ float fFontSize);
+ float ToFontSize(FDE_CSSPropertyValue eValue, float fCurFontSize);
FDE_CSSDisplay ToDisplay(FDE_CSSPropertyValue eValue);
FDE_CSSTextAlign ToTextAlign(FDE_CSSPropertyValue eValue);
uint16_t ToFontWeight(FDE_CSSPropertyValue eValue);
@@ -79,7 +79,7 @@ class CFDE_CSSStyleSelector {
FDE_CSSFontVariant ToFontVariant(FDE_CSSPropertyValue eValue);
CFGAS_FontMgr* const m_pFontMgr;
- FX_FLOAT m_fDefFontSize;
+ float m_fDefFontSize;
std::unique_ptr<CFDE_CSSStyleSheet> m_UAStyles;
CFDE_CSSRuleCollection m_UARules;
};
diff --git a/xfa/fde/css/fde_css.h b/xfa/fde/css/fde_css.h
index 344b709487..58a6778732 100644
--- a/xfa/fde/css/fde_css.h
+++ b/xfa/fde/css/fde_css.h
@@ -188,7 +188,7 @@ class FDE_CSSLength {
explicit FDE_CSSLength(FDE_CSSLengthUnit eUnit) : m_unit(eUnit) {}
- FDE_CSSLength(FDE_CSSLengthUnit eUnit, FX_FLOAT fValue)
+ FDE_CSSLength(FDE_CSSLengthUnit eUnit, float fValue)
: m_unit(eUnit), m_fValue(fValue) {}
FDE_CSSLength& Set(FDE_CSSLengthUnit eUnit) {
@@ -196,7 +196,7 @@ class FDE_CSSLength {
return *this;
}
- FDE_CSSLength& Set(FDE_CSSLengthUnit eUnit, FX_FLOAT fValue) {
+ FDE_CSSLength& Set(FDE_CSSLengthUnit eUnit, float fValue) {
m_unit = eUnit;
m_fValue = fValue;
return *this;
@@ -204,19 +204,19 @@ class FDE_CSSLength {
FDE_CSSLengthUnit GetUnit() const { return m_unit; }
- FX_FLOAT GetValue() const { return m_fValue; }
+ float GetValue() const { return m_fValue; }
bool NonZero() const { return static_cast<int>(m_fValue) != 0; }
private:
FDE_CSSLengthUnit m_unit;
- FX_FLOAT m_fValue;
+ float m_fValue;
};
class FDE_CSSRect {
public:
FDE_CSSRect() {}
- FDE_CSSRect(FDE_CSSLengthUnit eUnit, FX_FLOAT val)
+ FDE_CSSRect(FDE_CSSLengthUnit eUnit, float val)
: left(eUnit, val),
top(eUnit, val),
right(eUnit, val),
@@ -229,7 +229,7 @@ class FDE_CSSRect {
bottom.Set(eUnit);
return *this;
}
- FDE_CSSRect& Set(FDE_CSSLengthUnit eUnit, FX_FLOAT fValue) {
+ FDE_CSSRect& Set(FDE_CSSLengthUnit eUnit, float fValue) {
left.Set(eUnit, fValue);
top.Set(eUnit, fValue);
right.Set(eUnit, fValue);
diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp
index db05f76241..3c6ca9b37e 100644
--- a/xfa/fde/fde_gedevice.cpp
+++ b/xfa/fde/fde_gedevice.cpp
@@ -24,9 +24,9 @@ CFDE_RenderDevice::CFDE_RenderDevice(CFX_RenderDevice* pDevice,
ASSERT(pDevice);
FX_RECT rt = m_pDevice->GetClipBox();
- m_rtClip = CFX_RectF(
- static_cast<FX_FLOAT>(rt.left), static_cast<FX_FLOAT>(rt.top),
- static_cast<FX_FLOAT>(rt.Width()), static_cast<FX_FLOAT>(rt.Height()));
+ m_rtClip = CFX_RectF(static_cast<float>(rt.left), static_cast<float>(rt.top),
+ static_cast<float>(rt.Width()),
+ static_cast<float>(rt.Height()));
}
CFDE_RenderDevice::~CFDE_RenderDevice() {
@@ -49,9 +49,9 @@ void CFDE_RenderDevice::SaveState() {
void CFDE_RenderDevice::RestoreState() {
m_pDevice->RestoreState(false);
const FX_RECT& rt = m_pDevice->GetClipBox();
- m_rtClip = CFX_RectF(
- static_cast<FX_FLOAT>(rt.left), static_cast<FX_FLOAT>(rt.top),
- static_cast<FX_FLOAT>(rt.Width()), static_cast<FX_FLOAT>(rt.Height()));
+ m_rtClip = CFX_RectF(static_cast<float>(rt.left), static_cast<float>(rt.top),
+ static_cast<float>(rt.Width()),
+ static_cast<float>(rt.Height()));
}
bool CFDE_RenderDevice::SetClipRect(const CFX_RectF& rtClip) {
@@ -74,11 +74,11 @@ CFDE_Path* CFDE_RenderDevice::GetClipPath() const {
return nullptr;
}
-FX_FLOAT CFDE_RenderDevice::GetDpiX() const {
+float CFDE_RenderDevice::GetDpiX() const {
return 96;
}
-FX_FLOAT CFDE_RenderDevice::GetDpiY() const {
+float CFDE_RenderDevice::GetDpiY() const {
return 96;
}
@@ -91,8 +91,8 @@ bool CFDE_RenderDevice::DrawImage(CFX_DIBSource* pDib,
if (pSrcRect) {
srcRect = *pSrcRect;
} else {
- srcRect = CFX_RectF(0, 0, static_cast<FX_FLOAT>(pDib->GetWidth()),
- static_cast<FX_FLOAT>(pDib->GetHeight()));
+ srcRect = CFX_RectF(0, 0, static_cast<float>(pDib->GetWidth()),
+ static_cast<float>(pDib->GetHeight()));
}
if (srcRect.IsEmpty())
@@ -124,7 +124,7 @@ bool CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush,
const CFX_RetainPtr<CFGAS_GEFont>& pFont,
const FXTEXT_CHARPOS* pCharPos,
int32_t iCount,
- FX_FLOAT fFontSize,
+ float fFontSize,
const CFX_Matrix* pMatrix) {
ASSERT(pBrush && pFont && pCharPos && iCount > 0);
CFX_Font* pFxFont = pFont->GetDevFont();
@@ -132,9 +132,9 @@ bool CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush,
if ((pFont->GetFontStyles() & FX_FONTSTYLE_Italic) != 0 &&
!pFxFont->IsItalic()) {
FXTEXT_CHARPOS* pCP = (FXTEXT_CHARPOS*)pCharPos;
- FX_FLOAT* pAM;
+ float* pAM;
for (int32_t i = 0; i < iCount; ++i) {
- static const FX_FLOAT mc = 0.267949f;
+ static const float mc = 0.267949f;
pAM = pCP->m_AdjustMatrix;
pAM[2] = mc * pAM[0] + pAM[2];
pAM[3] = mc * pAM[1] + pAM[3];
@@ -205,7 +205,7 @@ bool CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush,
}
bool CFDE_RenderDevice::DrawBezier(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const CFX_PointF& pt1,
const CFX_PointF& pt2,
const CFX_PointF& pt3,
@@ -222,10 +222,10 @@ bool CFDE_RenderDevice::DrawBezier(CFDE_Pen* pPen,
}
bool CFDE_RenderDevice::DrawCurve(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const std::vector<CFX_PointF>& points,
bool bClosed,
- FX_FLOAT fTension,
+ float fTension,
const CFX_Matrix* pMatrix) {
CFDE_Path path;
path.AddCurve(points, bClosed, fTension);
@@ -233,7 +233,7 @@ bool CFDE_RenderDevice::DrawCurve(CFDE_Pen* pPen,
}
bool CFDE_RenderDevice::DrawEllipse(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const CFX_RectF& rect,
const CFX_Matrix* pMatrix) {
CFDE_Path path;
@@ -242,7 +242,7 @@ bool CFDE_RenderDevice::DrawEllipse(CFDE_Pen* pPen,
}
bool CFDE_RenderDevice::DrawLines(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const std::vector<CFX_PointF>& points,
const CFX_Matrix* pMatrix) {
CFDE_Path path;
@@ -251,7 +251,7 @@ bool CFDE_RenderDevice::DrawLines(CFDE_Pen* pPen,
}
bool CFDE_RenderDevice::DrawLine(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const CFX_PointF& pt1,
const CFX_PointF& pt2,
const CFX_Matrix* pMatrix) {
@@ -261,7 +261,7 @@ bool CFDE_RenderDevice::DrawLine(CFDE_Pen* pPen,
}
bool CFDE_RenderDevice::DrawPath(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const CFDE_Path* pPath,
const CFX_Matrix* pMatrix) {
CFDE_Path* pGePath = (CFDE_Path*)pPath;
@@ -277,7 +277,7 @@ bool CFDE_RenderDevice::DrawPath(CFDE_Pen* pPen,
}
bool CFDE_RenderDevice::DrawPolygon(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const std::vector<CFX_PointF>& points,
const CFX_Matrix* pMatrix) {
CFDE_Path path;
@@ -286,7 +286,7 @@ bool CFDE_RenderDevice::DrawPolygon(CFDE_Pen* pPen,
}
bool CFDE_RenderDevice::DrawRectangle(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const CFX_RectF& rect,
const CFX_Matrix* pMatrix) {
CFDE_Path path;
@@ -296,7 +296,7 @@ bool CFDE_RenderDevice::DrawRectangle(CFDE_Pen* pPen,
bool CFDE_RenderDevice::FillClosedCurve(CFDE_Brush* pBrush,
const std::vector<CFX_PointF>& points,
- FX_FLOAT fTension,
+ float fTension,
const CFX_Matrix* pMatrix) {
CFDE_Path path;
path.AddCurve(points, true, fTension);
@@ -328,7 +328,7 @@ bool CFDE_RenderDevice::FillRectangle(CFDE_Brush* pBrush,
}
bool CFDE_RenderDevice::CreatePen(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
CFX_GraphStateData& graphState) {
if (!pPen)
return false;
diff --git a/xfa/fde/fde_gedevice.h b/xfa/fde/fde_gedevice.h
index 7c772cfd03..976e1bde6f 100644
--- a/xfa/fde/fde_gedevice.h
+++ b/xfa/fde/fde_gedevice.h
@@ -31,8 +31,8 @@ class CFDE_RenderDevice {
bool SetClipRect(const CFX_RectF& rtClip);
const CFX_RectF& GetClipRect();
- FX_FLOAT GetDpiX() const;
- FX_FLOAT GetDpiY() const;
+ float GetDpiX() const;
+ float GetDpiY() const;
bool DrawImage(CFX_DIBSource* pDib,
const CFX_RectF* pSrcRect,
@@ -43,49 +43,49 @@ class CFDE_RenderDevice {
const CFX_RetainPtr<CFGAS_GEFont>& pFont,
const FXTEXT_CHARPOS* pCharPos,
int32_t iCount,
- FX_FLOAT fFontSize,
+ float fFontSize,
const CFX_Matrix* pMatrix = nullptr);
bool DrawBezier(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const CFX_PointF& pt1,
const CFX_PointF& pt2,
const CFX_PointF& pt3,
const CFX_PointF& pt4,
const CFX_Matrix* pMatrix = nullptr);
bool DrawCurve(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const std::vector<CFX_PointF>& points,
bool bClosed,
- FX_FLOAT fTension = 0.5f,
+ float fTension = 0.5f,
const CFX_Matrix* pMatrix = nullptr);
bool DrawEllipse(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const CFX_RectF& rect,
const CFX_Matrix* pMatrix = nullptr);
bool DrawLines(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const std::vector<CFX_PointF>& points,
const CFX_Matrix* pMatrix = nullptr);
bool DrawLine(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const CFX_PointF& pt1,
const CFX_PointF& pt2,
const CFX_Matrix* pMatrix = nullptr);
bool DrawPath(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const CFDE_Path* pPath,
const CFX_Matrix* pMatrix = nullptr);
bool DrawPolygon(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const std::vector<CFX_PointF>& points,
const CFX_Matrix* pMatrix = nullptr);
bool DrawRectangle(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
const CFX_RectF& rect,
const CFX_Matrix* pMatrix = nullptr);
bool FillClosedCurve(CFDE_Brush* pBrush,
const std::vector<CFX_PointF>& points,
- FX_FLOAT fTension = 0.5f,
+ float fTension = 0.5f,
const CFX_Matrix* pMatrix = nullptr);
bool FillEllipse(CFDE_Brush* pBrush,
const CFX_RectF& rect,
@@ -104,18 +104,18 @@ class CFDE_RenderDevice {
const CFX_RetainPtr<CFGAS_GEFont>& pFont,
const FXTEXT_CHARPOS* pCharPos,
int32_t iCount,
- FX_FLOAT fFontSize,
+ float fFontSize,
const CFX_Matrix* pMatrix);
bool DrawStringPath(CFDE_Brush* pBrush,
const CFX_RetainPtr<CFGAS_GEFont>& pFont,
const FXTEXT_CHARPOS* pCharPos,
int32_t iCount,
- FX_FLOAT fFontSize,
+ float fFontSize,
const CFX_Matrix* pMatrix);
protected:
bool CreatePen(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
+ float fPenWidth,
CFX_GraphStateData& graphState);
CFX_RenderDevice* const m_pDevice;
diff --git a/xfa/fde/fde_render.cpp b/xfa/fde/fde_render.cpp
index 371f9ca9e2..a502c7b6d8 100644
--- a/xfa/fde/fde_render.cpp
+++ b/xfa/fde/fde_render.cpp
@@ -56,8 +56,8 @@ FDE_RENDERSTATUS CFDE_RenderContext::DoRender(IFX_Pause* pPause) {
CFX_RectF rtDocClip = m_pRenderDevice->GetClipRect();
if (rtDocClip.IsEmpty()) {
rtDocClip.left = rtDocClip.top = 0;
- rtDocClip.width = (FX_FLOAT)m_pRenderDevice->GetWidth();
- rtDocClip.height = (FX_FLOAT)m_pRenderDevice->GetHeight();
+ rtDocClip.width = (float)m_pRenderDevice->GetWidth();
+ rtDocClip.height = (float)m_pRenderDevice->GetHeight();
}
rm.TransformRect(rtDocClip);
IFDE_VisualSet* pVisualSet;
@@ -120,7 +120,7 @@ void CFDE_RenderContext::RenderText(CFDE_TxtEdtTextSet* pTextSet,
m_CharPos.resize(iCount, FXTEXT_CHARPOS());
iCount = pTextSet->GetDisplayPos(*pText, m_CharPos.data(), false);
- FX_FLOAT fFontSize = pTextSet->GetFontSize();
+ float fFontSize = pTextSet->GetFontSize();
FX_ARGB dwColor = pTextSet->GetFontColor();
m_pBrush->SetColor(dwColor);
m_pRenderDevice->DrawString(m_pBrush.get(), pFont, m_CharPos.data(), iCount,
diff --git a/xfa/fde/ifde_txtedtengine.h b/xfa/fde/ifde_txtedtengine.h
index f803eff079..488e8ea271 100644
--- a/xfa/fde/ifde_txtedtengine.h
+++ b/xfa/fde/ifde_txtedtengine.h
@@ -73,23 +73,23 @@ struct FDE_TXTEDTPARAMS {
FDE_TXTEDTPARAMS();
~FDE_TXTEDTPARAMS();
- FX_FLOAT fPlateWidth;
- FX_FLOAT fPlateHeight;
+ float fPlateWidth;
+ float fPlateHeight;
int32_t nLineCount;
uint32_t dwLayoutStyles;
uint32_t dwAlignment;
uint32_t dwMode;
CFX_RetainPtr<CFGAS_GEFont> pFont;
- FX_FLOAT fFontSize;
+ float fFontSize;
FX_ARGB dwFontColor;
- FX_FLOAT fLineSpace;
- FX_FLOAT fTabWidth;
+ float fLineSpace;
+ float fTabWidth;
bool bTabEquidistant;
wchar_t wDefChar;
wchar_t wLineBreakChar;
int32_t nLineEnd;
int32_t nHorzScale;
- FX_FLOAT fCharSpace;
+ float fCharSpace;
CFWL_Edit* pEventSink;
};
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp
index 36f341b39c..c9f5ec84ef 100644
--- a/xfa/fde/tto/fde_textout.cpp
+++ b/xfa/fde/tto/fde_textout.cpp
@@ -53,7 +53,7 @@ void CFDE_TextOut::SetFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont) {
m_pTxtBreak->SetFont(pFont);
}
-void CFDE_TextOut::SetFontSize(FX_FLOAT fFontSize) {
+void CFDE_TextOut::SetFontSize(float fFontSize) {
ASSERT(fFontSize > 0);
m_fFontSize = fFontSize;
m_pTxtBreak->SetFontSize(fFontSize);
@@ -72,7 +72,7 @@ void CFDE_TextOut::SetStyles(uint32_t dwStyles) {
m_pTxtBreak->SetLayoutStyles(m_dwTxtBkStyles);
}
-void CFDE_TextOut::SetTabWidth(FX_FLOAT fTabWidth) {
+void CFDE_TextOut::SetTabWidth(float fTabWidth) {
ASSERT(fTabWidth > 1.0f);
m_pTxtBreak->SetTabWidth(fTabWidth, false);
}
@@ -107,7 +107,7 @@ void CFDE_TextOut::SetAlignment(int32_t iAlignment) {
m_pTxtBreak->SetAlignment(m_iTxtBkAlignment);
}
-void CFDE_TextOut::SetLineSpace(FX_FLOAT fLineSpace) {
+void CFDE_TextOut::SetLineSpace(float fLineSpace) {
ASSERT(fLineSpace > 1.0f);
m_fLineSpace = fLineSpace;
}
@@ -127,7 +127,7 @@ void CFDE_TextOut::SetRenderDevice(CFX_RenderDevice* pDevice) {
}
void CFDE_TextOut::SetClipRect(const CFX_Rect& rtClip) {
- m_rtClip = rtClip.As<FX_FLOAT>();
+ m_rtClip = rtClip.As<float>();
}
void CFDE_TextOut::SetClipRect(const CFX_RectF& rtClip) {
@@ -142,7 +142,7 @@ void CFDE_TextOut::SetMatrix(const CFX_Matrix& matrix) {
m_Matrix = matrix;
}
-void CFDE_TextOut::SetLineBreakTolerance(FX_FLOAT fTolerance) {
+void CFDE_TextOut::SetLineBreakTolerance(float fTolerance) {
m_fTolerance = fTolerance;
m_pTxtBreak->SetLineBreakTolerance(m_fTolerance);
}
@@ -178,9 +178,9 @@ void CFDE_TextOut::CalcTextSize(const wchar_t* pwsStr,
m_iTotalLines = 0;
const wchar_t* pStr = pwsStr;
bool bHotKey = !!(m_dwStyles & FDE_TTOSTYLE_HotKey);
- FX_FLOAT fWidth = 0.0f;
- FX_FLOAT fHeight = 0.0f;
- FX_FLOAT fStartPos = rect.right();
+ float fWidth = 0.0f;
+ float fHeight = 0.0f;
+ float fStartPos = rect.right();
CFX_BreakType dwBreakStatus = CFX_BreakType::None;
wchar_t wPreChar = 0;
wchar_t wch;
@@ -206,7 +206,7 @@ void CFDE_TextOut::CalcTextSize(const wchar_t* pwsStr,
RetrieveLineWidth(dwBreakStatus, fStartPos, fWidth, fHeight);
m_pTxtBreak->Reset();
- FX_FLOAT fInc = rect.Height() - fHeight;
+ float fInc = rect.Height() - fHeight;
if (m_iAlignment >= FDE_TTOALIGNMENT_CenterLeft &&
m_iAlignment < FDE_TTOALIGNMENT_BottomLeft) {
fInc /= 2.0f;
@@ -223,7 +223,7 @@ void CFDE_TextOut::CalcTextSize(const wchar_t* pwsStr,
void CFDE_TextOut::SetLineWidth(CFX_RectF& rect) {
if ((m_dwStyles & FDE_TTOSTYLE_SingleLine) == 0) {
- FX_FLOAT fLineWidth = 0.0f;
+ float fLineWidth = 0.0f;
if (rect.Width() < 1.0f)
rect.width = m_fFontSize * 1000.0f;
@@ -233,22 +233,21 @@ void CFDE_TextOut::SetLineWidth(CFX_RectF& rect) {
}
bool CFDE_TextOut::RetrieveLineWidth(CFX_BreakType dwBreakStatus,
- FX_FLOAT& fStartPos,
- FX_FLOAT& fWidth,
- FX_FLOAT& fHeight) {
+ float& fStartPos,
+ float& fWidth,
+ float& fHeight) {
if (CFX_BreakTypeNoneOrPiece(dwBreakStatus))
return false;
- FX_FLOAT fLineStep =
- (m_fLineSpace > m_fFontSize) ? m_fLineSpace : m_fFontSize;
+ float fLineStep = (m_fLineSpace > m_fFontSize) ? m_fLineSpace : m_fFontSize;
bool bLineWrap = !!(m_dwStyles & FDE_TTOSTYLE_LineWrap);
- FX_FLOAT fLineWidth = 0.0f;
+ float fLineWidth = 0.0f;
int32_t iCount = m_pTxtBreak->CountBreakPieces();
for (int32_t i = 0; i < iCount; i++) {
const CFX_BreakPiece* pPiece = m_pTxtBreak->GetBreakPiece(i);
- fLineWidth += static_cast<FX_FLOAT>(pPiece->m_iWidth) / 20000.0f;
- fStartPos = std::min(fStartPos,
- static_cast<FX_FLOAT>(pPiece->m_iStartPos) / 20000.0f);
+ fLineWidth += static_cast<float>(pPiece->m_iWidth) / 20000.0f;
+ fStartPos =
+ std::min(fStartPos, static_cast<float>(pPiece->m_iStartPos) / 20000.0f);
}
m_pTxtBreak->ClearBreakPieces();
if (dwBreakStatus == CFX_BreakType::Paragraph) {
@@ -268,15 +267,15 @@ void CFDE_TextOut::DrawText(const wchar_t* pwsStr,
int32_t iLength,
int32_t x,
int32_t y) {
- CFX_RectF rtText(static_cast<FX_FLOAT>(x), static_cast<FX_FLOAT>(y),
+ CFX_RectF rtText(static_cast<float>(x), static_cast<float>(y),
m_fFontSize * 1000.0f, m_fFontSize * 1000.0f);
DrawText(pwsStr, iLength, rtText);
}
void CFDE_TextOut::DrawText(const wchar_t* pwsStr,
int32_t iLength,
- FX_FLOAT x,
- FX_FLOAT y) {
+ float x,
+ float y) {
DrawText(pwsStr, iLength,
CFX_RectF(x, y, m_fFontSize * 1000.0f, m_fFontSize * 1000.0f));
}
@@ -284,7 +283,7 @@ void CFDE_TextOut::DrawText(const wchar_t* pwsStr,
void CFDE_TextOut::DrawText(const wchar_t* pwsStr,
int32_t iLength,
const CFX_Rect& rect) {
- DrawText(pwsStr, iLength, rect.As<FX_FLOAT>());
+ DrawText(pwsStr, iLength, rect.As<float>());
}
void CFDE_TextOut::DrawText(const wchar_t* pwsStr,
@@ -299,8 +298,8 @@ void CFDE_TextOut::DrawText(const wchar_t* pwsStr,
void CFDE_TextOut::DrawLogicText(const wchar_t* pwsStr,
int32_t iLength,
- FX_FLOAT x,
- FX_FLOAT y) {
+ float x,
+ float y) {
CFX_RectF rtText(x, y, m_fFontSize * 1000.0f, m_fFontSize * 1000.0f);
DrawLogicText(pwsStr, iLength, rtText);
}
@@ -324,7 +323,7 @@ void CFDE_TextOut::DrawText(const wchar_t* pwsStr,
if (rect.width < m_fFontSize || rect.height < m_fFontSize)
return;
- FX_FLOAT fLineWidth = rect.width;
+ float fLineWidth = rect.width;
m_pTxtBreak->SetLineWidth(fLineWidth);
m_ttoLines.clear();
m_wsText.clear();
@@ -407,9 +406,8 @@ void CFDE_TextOut::LoadText(const wchar_t* pwsStr,
ExpandBuffer(iTxtLength, 0);
bool bHotKey = !!(m_dwStyles & FDE_TTOSTYLE_HotKey);
bool bLineWrap = !!(m_dwStyles & FDE_TTOSTYLE_LineWrap);
- FX_FLOAT fLineStep =
- (m_fLineSpace > m_fFontSize) ? m_fLineSpace : m_fFontSize;
- FX_FLOAT fLineStop = rect.bottom();
+ float fLineStep = (m_fLineSpace > m_fFontSize) ? m_fLineSpace : m_fFontSize;
+ float fLineStop = rect.bottom();
m_fLinePos = rect.top;
m_hotKeys.RemoveAll();
int32_t iStartChar = 0;
@@ -462,10 +460,9 @@ bool CFDE_TextOut::RetrievePieces(CFX_BreakType dwBreakStatus,
const CFX_RectF& rect) {
bool bSingleLine = !!(m_dwStyles & FDE_TTOSTYLE_SingleLine);
bool bLineWrap = !!(m_dwStyles & FDE_TTOSTYLE_LineWrap);
- FX_FLOAT fLineStep =
- (m_fLineSpace > m_fFontSize) ? m_fLineSpace : m_fFontSize;
+ float fLineStep = (m_fLineSpace > m_fFontSize) ? m_fLineSpace : m_fFontSize;
bool bNeedReload = false;
- FX_FLOAT fLineWidth = rect.Width();
+ float fLineWidth = rect.Width();
int32_t iLineWidth = FXSYS_round(fLineWidth * 20000.0f);
int32_t iCount = m_pTxtBreak->CountBreakPieces();
for (int32_t i = 0; i < iCount; i++) {
@@ -490,7 +487,7 @@ bool CFDE_TextOut::RetrievePieces(CFX_BreakType dwBreakStatus,
m_ttoLines[m_iCurLine].SetNewReload(true);
} else if (j > 0) {
CFX_RectF rtPiece;
- rtPiece.left = rect.left + (FX_FLOAT)pPiece->m_iStartPos / 20000.0f;
+ rtPiece.left = rect.left + (float)pPiece->m_iStartPos / 20000.0f;
rtPiece.top = m_fLinePos;
rtPiece.width = iWidth / 20000.0f;
rtPiece.height = fLineStep;
@@ -624,13 +621,13 @@ void CFDE_TextOut::DoAlignment(const CFX_RectF& rect) {
if (m_ttoLines.empty())
return;
- FX_FLOAT fLineStopS = rect.bottom();
+ float fLineStopS = rect.bottom();
FDE_TTOPIECE* pFirstPiece = m_ttoLines.back().GetPtrAt(0);
if (!pFirstPiece)
return;
- FX_FLOAT fLineStopD = pFirstPiece->rtPiece.bottom();
- FX_FLOAT fInc = fLineStopS - fLineStopD;
+ float fLineStopD = pFirstPiece->rtPiece.bottom();
+ float fInc = fLineStopS - fLineStopD;
if (m_iAlignment >= FDE_TTOALIGNMENT_CenterLeft &&
m_iAlignment < FDE_TTOALIGNMENT_BottomLeft) {
fInc /= 2.0f;
diff --git a/xfa/fde/tto/fde_textout.h b/xfa/fde/tto/fde_textout.h
index 224a584a4e..bbc796d7ac 100644
--- a/xfa/fde/tto/fde_textout.h
+++ b/xfa/fde/tto/fde_textout.h
@@ -79,33 +79,30 @@ class CFDE_TextOut {
~CFDE_TextOut();
void SetFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont);
- void SetFontSize(FX_FLOAT fFontSize);
+ void SetFontSize(float fFontSize);
void SetTextColor(FX_ARGB color);
void SetStyles(uint32_t dwStyles);
- void SetTabWidth(FX_FLOAT fTabWidth);
+ void SetTabWidth(float fTabWidth);
void SetEllipsisString(const CFX_WideString& wsEllipsis);
void SetParagraphBreakChar(wchar_t wch);
void SetAlignment(int32_t iAlignment);
- void SetLineSpace(FX_FLOAT fLineSpace);
+ void SetLineSpace(float fLineSpace);
void SetDIBitmap(CFX_DIBitmap* pDIB);
void SetRenderDevice(CFX_RenderDevice* pDevice);
void SetClipRect(const CFX_Rect& rtClip);
void SetClipRect(const CFX_RectF& rtClip);
void SetMatrix(const CFX_Matrix& matrix);
- void SetLineBreakTolerance(FX_FLOAT fTolerance);
+ void SetLineBreakTolerance(float fTolerance);
void DrawText(const wchar_t* pwsStr, int32_t iLength, int32_t x, int32_t y);
- void DrawText(const wchar_t* pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y);
+ void DrawText(const wchar_t* pwsStr, int32_t iLength, float x, float y);
void DrawText(const wchar_t* pwsStr, int32_t iLength, const CFX_Rect& rect);
void DrawText(const wchar_t* pwsStr, int32_t iLength, const CFX_RectF& rect);
void SetLogicClipRect(const CFX_RectF& rtClip);
void CalcLogicSize(const wchar_t* pwsStr, int32_t iLength, CFX_SizeF& size);
void CalcLogicSize(const wchar_t* pwsStr, int32_t iLength, CFX_RectF& rect);
- void DrawLogicText(const wchar_t* pwsStr,
- int32_t iLength,
- FX_FLOAT x,
- FX_FLOAT y);
+ void DrawLogicText(const wchar_t* pwsStr, int32_t iLength, float x, float y);
void DrawLogicText(const wchar_t* pwsStr,
int32_t iLength,
const CFX_RectF& rect);
@@ -114,9 +111,9 @@ class CFDE_TextOut {
protected:
void CalcTextSize(const wchar_t* pwsStr, int32_t iLength, CFX_RectF& rect);
bool RetrieveLineWidth(CFX_BreakType dwBreakStatus,
- FX_FLOAT& fStartPos,
- FX_FLOAT& fWidth,
- FX_FLOAT& fHeight);
+ float& fStartPos,
+ float& fWidth,
+ float& fHeight);
void SetLineWidth(CFX_RectF& rect);
void DrawText(const wchar_t* pwsStr,
int32_t iLength,
@@ -146,10 +143,10 @@ class CFDE_TextOut {
std::unique_ptr<CFX_TxtBreak> m_pTxtBreak;
CFX_RetainPtr<CFGAS_GEFont> m_pFont;
- FX_FLOAT m_fFontSize;
- FX_FLOAT m_fLineSpace;
- FX_FLOAT m_fLinePos;
- FX_FLOAT m_fTolerance;
+ float m_fFontSize;
+ float m_fLineSpace;
+ float m_fLinePos;
+ float m_fTolerance;
int32_t m_iAlignment;
int32_t m_iTxtBkAlignment;
std::vector<int32_t> m_CharWidths;
diff --git a/xfa/fde/xml/fde_xml_imp.cpp b/xfa/fde/xml/fde_xml_imp.cpp
index 541fd98a00..0959661b26 100644
--- a/xfa/fde/xml/fde_xml_imp.cpp
+++ b/xfa/fde/xml/fde_xml_imp.cpp
@@ -618,8 +618,8 @@ void CFDE_XMLInstruction::SetInteger(const wchar_t* pwsAttriName,
SetString(pwsAttriName, wsValue);
}
-FX_FLOAT CFDE_XMLInstruction::GetFloat(const wchar_t* pwsAttriName,
- FX_FLOAT fDefValue) const {
+float CFDE_XMLInstruction::GetFloat(const wchar_t* pwsAttriName,
+ float fDefValue) const {
int32_t iCount = pdfium::CollectionSize<int32_t>(m_Attributes);
for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
@@ -630,7 +630,7 @@ FX_FLOAT CFDE_XMLInstruction::GetFloat(const wchar_t* pwsAttriName,
}
void CFDE_XMLInstruction::SetFloat(const wchar_t* pwsAttriName,
- FX_FLOAT fAttriValue) {
+ float fAttriValue) {
CFX_WideString wsValue;
wsValue.Format(L"%f", fAttriValue);
SetString(pwsAttriName, wsValue);
@@ -829,8 +829,8 @@ void CFDE_XMLElement::SetInteger(const wchar_t* pwsAttriName,
SetString(pwsAttriName, wsValue);
}
-FX_FLOAT CFDE_XMLElement::GetFloat(const wchar_t* pwsAttriName,
- FX_FLOAT fDefValue) const {
+float CFDE_XMLElement::GetFloat(const wchar_t* pwsAttriName,
+ float fDefValue) const {
int32_t iCount = pdfium::CollectionSize<int32_t>(m_Attributes);
for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
@@ -840,8 +840,7 @@ FX_FLOAT CFDE_XMLElement::GetFloat(const wchar_t* pwsAttriName,
return fDefValue;
}
-void CFDE_XMLElement::SetFloat(const wchar_t* pwsAttriName,
- FX_FLOAT fAttriValue) {
+void CFDE_XMLElement::SetFloat(const wchar_t* pwsAttriName, float fAttriValue) {
CFX_WideString wsValue;
wsValue.Format(L"%f", fAttriValue);
SetString(pwsAttriName, wsValue);
diff --git a/xfa/fde/xml/fde_xml_imp.h b/xfa/fde/xml/fde_xml_imp.h
index 7ae05a4936..ab5ab9be24 100644
--- a/xfa/fde/xml/fde_xml_imp.h
+++ b/xfa/fde/xml/fde_xml_imp.h
@@ -95,8 +95,8 @@ class CFDE_XMLInstruction : public CFDE_XMLNode {
const CFX_WideString& wsAttriValue);
int32_t GetInteger(const wchar_t* pwsAttriName, int32_t iDefValue = 0) const;
void SetInteger(const wchar_t* pwsAttriName, int32_t iAttriValue);
- FX_FLOAT GetFloat(const wchar_t* pwsAttriName, FX_FLOAT fDefValue = 0) const;
- void SetFloat(const wchar_t* pwsAttriName, FX_FLOAT fAttriValue);
+ float GetFloat(const wchar_t* pwsAttriName, float fDefValue = 0) const;
+ void SetFloat(const wchar_t* pwsAttriName, float fAttriValue);
void RemoveAttribute(const wchar_t* pwsAttriName);
int32_t CountData() const;
bool GetData(int32_t index, CFX_WideString& wsData) const;
@@ -139,8 +139,8 @@ class CFDE_XMLElement : public CFDE_XMLNode {
int32_t GetInteger(const wchar_t* pwsAttriName, int32_t iDefValue = 0) const;
void SetInteger(const wchar_t* pwsAttriName, int32_t iAttriValue);
- FX_FLOAT GetFloat(const wchar_t* pwsAttriName, FX_FLOAT fDefValue = 0) const;
- void SetFloat(const wchar_t* pwsAttriName, FX_FLOAT fAttriValue);
+ float GetFloat(const wchar_t* pwsAttriName, float fDefValue = 0) const;
+ void SetFloat(const wchar_t* pwsAttriName, float fAttriValue);
void GetTextData(CFX_WideString& wsText) const;
void SetTextData(const CFX_WideString& wsText);
diff --git a/xfa/fgas/layout/fgas_rtfbreak.cpp b/xfa/fgas/layout/fgas_rtfbreak.cpp
index 1e0cc9c25e..37822140c3 100644
--- a/xfa/fgas/layout/fgas_rtfbreak.cpp
+++ b/xfa/fgas/layout/fgas_rtfbreak.cpp
@@ -43,7 +43,7 @@ CFX_RTFBreak::CFX_RTFBreak(uint32_t dwLayoutStyles)
CFX_RTFBreak::~CFX_RTFBreak() {}
-void CFX_RTFBreak::SetLineBoundary(FX_FLOAT fLineStart, FX_FLOAT fLineEnd) {
+void CFX_RTFBreak::SetLineBoundary(float fLineStart, float fLineEnd) {
if (fLineStart > fLineEnd)
return;
@@ -53,7 +53,7 @@ void CFX_RTFBreak::SetLineBoundary(FX_FLOAT fLineStart, FX_FLOAT fLineEnd) {
m_pCurLine->m_iStart = std::max(m_pCurLine->m_iStart, m_iBoundaryStart);
}
-void CFX_RTFBreak::SetLineStartPos(FX_FLOAT fLinePos) {
+void CFX_RTFBreak::SetLineStartPos(float fLinePos) {
int32_t iLinePos = FXSYS_round(fLinePos * 20000.0f);
iLinePos = std::min(iLinePos, m_iBoundaryEnd);
iLinePos = std::max(iLinePos, m_iBoundaryStart);
@@ -69,7 +69,7 @@ void CFX_RTFBreak::SetFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont) {
FontChanged();
}
-void CFX_RTFBreak::SetFontSize(FX_FLOAT fFontSize) {
+void CFX_RTFBreak::SetFontSize(float fFontSize) {
int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
if (m_iFontSize == iFontSize)
return;
@@ -92,11 +92,11 @@ void CFX_RTFBreak::FontChanged() {
m_iDefChar *= m_iFontSize;
}
-void CFX_RTFBreak::SetTabWidth(FX_FLOAT fTabWidth) {
+void CFX_RTFBreak::SetTabWidth(float fTabWidth) {
m_iTabWidth = FXSYS_round(fTabWidth * 20000.0f);
}
-void CFX_RTFBreak::AddPositionedTab(FX_FLOAT fTabPos) {
+void CFX_RTFBreak::AddPositionedTab(float fTabPos) {
int32_t iTabPos = std::min(FXSYS_round(fTabPos * 20000.0f) + m_iBoundaryStart,
m_iBoundaryEnd);
auto it = std::lower_bound(m_PositionedTabs.begin(), m_PositionedTabs.end(),
@@ -106,7 +106,7 @@ void CFX_RTFBreak::AddPositionedTab(FX_FLOAT fTabPos) {
m_PositionedTabs.insert(it, iTabPos);
}
-void CFX_RTFBreak::SetLineBreakTolerance(FX_FLOAT fTolerance) {
+void CFX_RTFBreak::SetLineBreakTolerance(float fTolerance) {
m_iTolerance = FXSYS_round(fTolerance * 20000.0f);
}
@@ -130,7 +130,7 @@ void CFX_RTFBreak::SetVerticalScale(int32_t iScale) {
m_iVerticalScale = iScale;
}
-void CFX_RTFBreak::SetCharSpace(FX_FLOAT fCharSpace) {
+void CFX_RTFBreak::SetCharSpace(float fCharSpace) {
m_iCharSpace = FXSYS_round(fCharSpace * 20000.0f);
}
@@ -834,23 +834,23 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
CFX_RetainPtr<CFGAS_GEFont> pFont = pText->pFont;
CFX_RectF rtText(*pText->pRect);
bool bRTLPiece = FX_IsOdd(pText->iBidiLevel);
- FX_FLOAT fFontSize = pText->fFontSize;
+ float fFontSize = pText->fFontSize;
int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
int32_t iAscent = pFont->GetAscent();
int32_t iDescent = pFont->GetDescent();
int32_t iMaxHeight = iAscent - iDescent;
- FX_FLOAT fFontHeight = fFontSize;
- FX_FLOAT fAscent = fFontHeight * static_cast<FX_FLOAT>(iAscent) /
- static_cast<FX_FLOAT>(iMaxHeight);
+ float fFontHeight = fFontSize;
+ float fAscent = fFontHeight * static_cast<float>(iAscent) /
+ static_cast<float>(iMaxHeight);
wchar_t wPrev = 0xFEFF;
wchar_t wNext;
- FX_FLOAT fX = rtText.left;
+ float fX = rtText.left;
int32_t iHorScale = pText->iHorizontalScale;
int32_t iVerScale = pText->iVerticalScale;
if (bRTLPiece)
fX = rtText.right();
- FX_FLOAT fY = rtText.top + fAscent;
+ float fY = rtText.top + fAscent;
int32_t iCount = 0;
for (int32_t i = 0; i < pText->iLength; ++i) {
wchar_t wch = pText->pStr[i];
@@ -900,7 +900,7 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
pCharPos->m_FontCharWidth = iCharWidth;
}
- FX_FLOAT fCharWidth = fFontSize * iCharWidth / 1000.0f;
+ float fCharWidth = fFontSize * iCharWidth / 1000.0f;
if (bRTLPiece && dwCharType != FX_CHARTYPE_Combination)
fX -= fCharWidth;
diff --git a/xfa/fgas/layout/fgas_rtfbreak.h b/xfa/fgas/layout/fgas_rtfbreak.h
index 339d2f4bcd..978634d1c8 100644
--- a/xfa/fgas/layout/fgas_rtfbreak.h
+++ b/xfa/fgas/layout/fgas_rtfbreak.h
@@ -37,7 +37,7 @@ struct FX_RTFTEXTOBJ {
CFX_RetainPtr<CFGAS_GEFont> pFont;
const CFX_RectF* pRect;
wchar_t wLineBreakChar;
- FX_FLOAT fFontSize;
+ float fFontSize;
int32_t iLength;
int32_t iBidiLevel;
int32_t iHorizontalScale;
@@ -49,19 +49,19 @@ class CFX_RTFBreak {
explicit CFX_RTFBreak(uint32_t dwLayoutStyles);
~CFX_RTFBreak();
- void SetLineBoundary(FX_FLOAT fLineStart, FX_FLOAT fLineEnd);
- void SetLineStartPos(FX_FLOAT fLinePos);
+ void SetLineBoundary(float fLineStart, float fLineEnd);
+ void SetLineStartPos(float fLinePos);
void SetFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont);
- void SetFontSize(FX_FLOAT fFontSize);
- void SetTabWidth(FX_FLOAT fTabWidth);
- void SetLineBreakTolerance(FX_FLOAT fTolerance);
+ void SetFontSize(float fFontSize);
+ void SetTabWidth(float fTabWidth);
+ void SetLineBreakTolerance(float fTolerance);
void SetHorizontalScale(int32_t iScale);
void SetVerticalScale(int32_t iScale);
- void SetCharSpace(FX_FLOAT fCharSpace);
+ void SetCharSpace(float fCharSpace);
void SetAlignment(CFX_RTFLineAlignment align) { m_iAlignment = align; }
void SetUserData(const CFX_RetainPtr<CFX_Retainable>& pUserData);
- void AddPositionedTab(FX_FLOAT fTabPos);
+ void AddPositionedTab(float fTabPos);
CFX_BreakType EndBreak(CFX_BreakType dwStatus);
int32_t CountBreakPieces() const;
diff --git a/xfa/fgas/layout/fgas_textbreak.cpp b/xfa/fgas/layout/fgas_textbreak.cpp
index eabe381621..8bba780382 100644
--- a/xfa/fgas/layout/fgas_textbreak.cpp
+++ b/xfa/fgas/layout/fgas_textbreak.cpp
@@ -67,7 +67,7 @@ CFX_TxtBreak::CFX_TxtBreak()
CFX_TxtBreak::~CFX_TxtBreak() {}
-void CFX_TxtBreak::SetLineWidth(FX_FLOAT fLineWidth) {
+void CFX_TxtBreak::SetLineWidth(float fLineWidth) {
m_iLineWidth = FXSYS_round(fLineWidth * 20000.0f);
ASSERT(m_iLineWidth >= 20000);
}
@@ -88,7 +88,7 @@ void CFX_TxtBreak::SetFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont) {
FontChanged();
}
-void CFX_TxtBreak::SetFontSize(FX_FLOAT fFontSize) {
+void CFX_TxtBreak::SetFontSize(float fFontSize) {
int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
if (m_iFontSize == iFontSize)
return;
@@ -107,7 +107,7 @@ void CFX_TxtBreak::FontChanged() {
m_iDefChar *= m_iFontSize;
}
-void CFX_TxtBreak::SetTabWidth(FX_FLOAT fTabWidth, bool bEquidistant) {
+void CFX_TxtBreak::SetTabWidth(float fTabWidth, bool bEquidistant) {
m_iTabWidth = std::max(FXSYS_round(fTabWidth * 20000.0f), kMinimumTabWidth);
m_bEquidistant = bEquidistant;
}
@@ -131,7 +131,7 @@ void CFX_TxtBreak::SetParagraphBreakChar(wchar_t wch) {
m_wParagBreakChar = wch;
}
-void CFX_TxtBreak::SetLineBreakTolerance(FX_FLOAT fTolerance) {
+void CFX_TxtBreak::SetLineBreakTolerance(float fTolerance) {
m_iTolerance = FXSYS_round(fTolerance * 20000.0f);
}
@@ -147,7 +147,7 @@ void CFX_TxtBreak::ResetContextCharStyles() {
m_dwContextCharStyles |= (m_iArabicContext << 8);
}
-void CFX_TxtBreak::SetCombWidth(FX_FLOAT fCombWidth) {
+void CFX_TxtBreak::SetCombWidth(float fCombWidth) {
m_iCombWidth = FXSYS_round(fCombWidth * 20000.0f);
}
@@ -171,7 +171,7 @@ void CFX_TxtBreak::SetHorizontalScale(int32_t iScale) {
m_iHorScale = iScale;
}
-void CFX_TxtBreak::SetCharSpace(FX_FLOAT fCharSpace) {
+void CFX_TxtBreak::SetCharSpace(float fCharSpace) {
m_iCharSpace = FXSYS_round(fCharSpace * 20000.0f);
}
@@ -841,22 +841,22 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
uint32_t dwStyles = pTxtRun->dwStyles;
CFX_RectF rtText(*pTxtRun->pRect);
bool bRTLPiece = (pTxtRun->dwCharStyles & FX_TXTCHARSTYLE_OddBidiLevel) != 0;
- FX_FLOAT fFontSize = pTxtRun->fFontSize;
+ float fFontSize = pTxtRun->fFontSize;
int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
int32_t iAscent = pFont->GetAscent();
int32_t iDescent = pFont->GetDescent();
int32_t iMaxHeight = iAscent - iDescent;
- FX_FLOAT fFontHeight = fFontSize;
- FX_FLOAT fAscent = fFontHeight * (FX_FLOAT)iAscent / (FX_FLOAT)iMaxHeight;
- FX_FLOAT fX = rtText.left;
- FX_FLOAT fY;
- FX_FLOAT fCharWidth;
- FX_FLOAT fCharHeight;
+ float fFontHeight = fFontSize;
+ float fAscent = fFontHeight * (float)iAscent / (float)iMaxHeight;
+ float fX = rtText.left;
+ float fY;
+ float fCharWidth;
+ float fCharHeight;
int32_t iHorScale = pTxtRun->iHorizontalScale;
int32_t iVerScale = pTxtRun->iVerticalScale;
bool bSkipSpace = pTxtRun->bSkipSpace;
FX_FORMCHAR formChars[3];
- FX_FLOAT fYBase;
+ float fYBase;
if (bRTLPiece)
fX = rtText.right();
@@ -1036,7 +1036,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
if ((dwStyles & FX_TXTLAYOUTSTYLE_CombText) != 0) {
int32_t iFormWidth = iCharWidth;
pFont->GetCharWidth(wForm, iFormWidth, false);
- FX_FLOAT fOffset = fFontSize * (iCharWidth - iFormWidth) / 2000.0f;
+ float fOffset = fFontSize * (iCharWidth - iFormWidth) / 2000.0f;
pCharPos->m_Origin.x += fOffset;
}
@@ -1045,7 +1045,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
if (pFont->GetCharBBox(wForm, &rtBBox, false)) {
pCharPos->m_Origin.y =
fYBase + fFontSize -
- fFontSize * (FX_FLOAT)rtBBox.height / (FX_FLOAT)iMaxHeight;
+ fFontSize * (float)rtBBox.height / (float)iMaxHeight;
}
if (wForm == wch && wLast != 0xFEFF) {
uint32_t dwLastProps = FX_GetUnicodeProperties(wLast);
@@ -1102,9 +1102,9 @@ std::vector<CFX_RectF> CFX_TxtBreak::GetCharRects(const FX_TXTRUN* pTxtRun,
int32_t* pWidths = pTxtRun->pWidths;
int32_t iLength = pTxtRun->iLength;
CFX_RectF rect(*pTxtRun->pRect);
- FX_FLOAT fFontSize = pTxtRun->fFontSize;
+ float fFontSize = pTxtRun->fFontSize;
int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
- FX_FLOAT fScale = fFontSize / 1000.0f;
+ float fScale = fFontSize / 1000.0f;
CFX_RetainPtr<CFGAS_GEFont> pFont = pTxtRun->pFont;
if (!pFont)
bCharBBox = false;
@@ -1113,16 +1113,16 @@ std::vector<CFX_RectF> CFX_TxtBreak::GetCharRects(const FX_TXTRUN* pTxtRun,
if (bCharBBox)
bCharBBox = pFont->GetBBox(&bbox);
- FX_FLOAT fLeft = std::max(0.0f, bbox.left * fScale);
- FX_FLOAT fHeight = FXSYS_fabs(bbox.height * fScale);
+ float fLeft = std::max(0.0f, bbox.left * fScale);
+ float fHeight = FXSYS_fabs(bbox.height * fScale);
bool bRTLPiece = !!(pTxtRun->dwCharStyles & FX_TXTCHARSTYLE_OddBidiLevel);
bool bSingleLine = !!(pTxtRun->dwStyles & FX_TXTLAYOUTSTYLE_SingleLine);
bool bCombText = !!(pTxtRun->dwStyles & FX_TXTLAYOUTSTYLE_CombText);
wchar_t wch;
wchar_t wLineBreakChar = pTxtRun->wLineBreakChar;
int32_t iCharSize;
- FX_FLOAT fCharSize;
- FX_FLOAT fStart = bRTLPiece ? rect.right() : rect.left;
+ float fCharSize;
+ float fStart = bRTLPiece ? rect.right() : rect.left;
std::vector<CFX_RectF> rtArray(iLength);
for (int32_t i = 0; i < iLength; i++) {
@@ -1133,7 +1133,7 @@ std::vector<CFX_RectF> CFX_TxtBreak::GetCharRects(const FX_TXTRUN* pTxtRun,
wch = *pStr++;
iCharSize = *pWidths++;
}
- fCharSize = static_cast<FX_FLOAT>(iCharSize) / 20000.0f;
+ fCharSize = static_cast<float>(iCharSize) / 20000.0f;
bool bRet = (!bSingleLine && IsCtrlCode(wch));
if (!(wch == L'\v' || wch == L'\f' || wch == 0x2028 || wch == 0x2029 ||
(wLineBreakChar != 0xFEFF && wch == wLineBreakChar))) {
@@ -1155,7 +1155,7 @@ std::vector<CFX_RectF> CFX_TxtBreak::GetCharRects(const FX_TXTRUN* pTxtRun,
if (bCharBBox && !bRet) {
int32_t iCharWidth = 1000;
pFont->GetCharWidth(wch, iCharWidth, false);
- FX_FLOAT fRTLeft = 0, fCharWidth = 0;
+ float fRTLeft = 0, fCharWidth = 0;
if (iCharWidth > 0) {
fCharWidth = iCharWidth * fScale;
fRTLeft = fLeft;
diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h
index fd864f1296..d4aa1418e7 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -55,7 +55,7 @@ struct FX_TXTRUN {
int32_t* pWidths;
int32_t iLength;
CFX_RetainPtr<CFGAS_GEFont> pFont;
- FX_FLOAT fFontSize;
+ float fFontSize;
uint32_t dwStyles;
int32_t iHorizontalScale;
int32_t iVerticalScale;
@@ -70,19 +70,19 @@ class CFX_TxtBreak {
CFX_TxtBreak();
~CFX_TxtBreak();
- void SetLineWidth(FX_FLOAT fLineWidth);
+ void SetLineWidth(float fLineWidth);
uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; }
void SetLayoutStyles(uint32_t dwLayoutStyles);
void SetFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont);
- void SetFontSize(FX_FLOAT fFontSize);
- void SetTabWidth(FX_FLOAT fTabWidth, bool bEquidistant);
+ void SetFontSize(float fFontSize);
+ void SetTabWidth(float fTabWidth, bool bEquidistant);
void SetDefaultChar(wchar_t wch);
void SetParagraphBreakChar(wchar_t wch);
- void SetLineBreakTolerance(FX_FLOAT fTolerance);
+ void SetLineBreakTolerance(float fTolerance);
void SetHorizontalScale(int32_t iScale);
- void SetCharSpace(FX_FLOAT fCharSpace);
+ void SetCharSpace(float fCharSpace);
void SetAlignment(int32_t iAlignment);
- void SetCombWidth(FX_FLOAT fCombWidth);
+ void SetCombWidth(float fCombWidth);
CFX_BreakType EndBreak(CFX_BreakType dwStatus);
int32_t CountBreakPieces() const;
const CFX_BreakPiece* GetBreakPiece(int32_t index) const;
diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp
index 430215662e..b2c848fed9 100644
--- a/xfa/fgas/localization/fgas_locale.cpp
+++ b/xfa/fgas/localization/fgas_locale.cpp
@@ -95,11 +95,11 @@ class CFX_LCNumeric {
CFX_LCNumeric(int64_t integral,
uint32_t fractional = 0,
int32_t exponent = 0);
- explicit CFX_LCNumeric(FX_FLOAT dbRetValue);
+ explicit CFX_LCNumeric(float dbRetValue);
explicit CFX_LCNumeric(double dbvalue);
explicit CFX_LCNumeric(CFX_WideString& wsNumeric);
- FX_FLOAT GetFloat() const;
+ float GetFloat() const;
double GetDouble() const;
CFX_WideString ToString() const;
CFX_WideString ToString(int32_t nTreading, bool bTrimTailZeros) const;
@@ -210,7 +210,7 @@ CFX_LCNumeric::CFX_LCNumeric(int64_t integral,
m_Fractional = fractional;
m_Exponent = exponent;
}
-CFX_LCNumeric::CFX_LCNumeric(FX_FLOAT dbRetValue) {
+CFX_LCNumeric::CFX_LCNumeric(float dbRetValue) {
m_Integral = (int64_t)dbRetValue;
m_Fractional = (uint32_t)(((dbRetValue > 0) ? (dbRetValue - m_Integral)
: (m_Integral - dbRetValue)) *
@@ -227,11 +227,11 @@ CFX_LCNumeric::CFX_LCNumeric(double dbvalue) {
CFX_LCNumeric::CFX_LCNumeric(CFX_WideString& wsNumeric) {
FX_WStringToNumeric(wsNumeric, *this);
}
-FX_FLOAT CFX_LCNumeric::GetFloat() const {
- FX_FLOAT dbRetValue = m_Fractional / 4294967296.0f;
+float CFX_LCNumeric::GetFloat() const {
+ float dbRetValue = m_Fractional / 4294967296.0f;
dbRetValue = m_Integral + (m_Integral >= 0 ? dbRetValue : -dbRetValue);
if (m_Exponent != 0) {
- dbRetValue *= FXSYS_pow(10, (FX_FLOAT)m_Exponent);
+ dbRetValue *= FXSYS_pow(10, (float)m_Exponent);
}
return dbRetValue;
}
@@ -239,7 +239,7 @@ double CFX_LCNumeric::GetDouble() const {
double value = m_Fractional / 4294967296.0;
value = m_Integral + (m_Integral >= 0 ? value : -value);
if (m_Exponent != 0) {
- value *= FXSYS_pow(10, (FX_FLOAT)m_Exponent);
+ value *= FXSYS_pow(10, (float)m_Exponent);
}
return value;
}
@@ -718,7 +718,7 @@ bool CFX_FormatString::ParseText(const CFX_WideString& wsSrcText,
}
bool CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum,
const CFX_WideString& wsPattern,
- FX_FLOAT& fValue) {
+ float& fValue) {
fValue = 0.0f;
if (wsSrcNum.IsEmpty() || wsPattern.IsEmpty()) {
return false;
@@ -1412,7 +1412,7 @@ bool CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum,
}
}
if (iExponent) {
- dbRetValue *= FXSYS_pow(10, (FX_FLOAT)iExponent);
+ dbRetValue *= FXSYS_pow(10, (float)iExponent);
}
if (bHavePercentSymbol) {
dbRetValue /= 100.0;
@@ -1420,7 +1420,7 @@ bool CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum,
if (bNeg) {
dbRetValue = -dbRetValue;
}
- fValue = (FX_FLOAT)dbRetValue;
+ fValue = (float)dbRetValue;
return true;
}
@@ -1893,7 +1893,7 @@ bool CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum,
if (iExponent || bHavePercentSymbol) {
CFX_Decimal decimal = CFX_Decimal(wsValue.AsStringC());
if (iExponent) {
- decimal = decimal * CFX_Decimal(FXSYS_pow(10, (FX_FLOAT)iExponent));
+ decimal = decimal * CFX_Decimal(FXSYS_pow(10, (float)iExponent));
}
if (bHavePercentSymbol) {
decimal = decimal / CFX_Decimal(100);
@@ -3492,7 +3492,7 @@ bool CFX_FormatString::FormatNum(const CFX_WideString& wsSrcNum,
}
return FormatStrNum(wsSrcNum.AsStringC(), wsPattern, wsOutput);
}
-bool CFX_FormatString::FormatNum(FX_FLOAT fNum,
+bool CFX_FormatString::FormatNum(float fNum,
const CFX_WideString& wsPattern,
CFX_WideString& wsOutput) {
if (wsPattern.IsEmpty()) {
@@ -4412,8 +4412,8 @@ CFX_Decimal::CFX_Decimal(int64_t val) {
SetNegate();
}
}
-CFX_Decimal::CFX_Decimal(FX_FLOAT val, uint8_t scale) {
- FX_FLOAT newval = fabs(val);
+CFX_Decimal::CFX_Decimal(float val, uint8_t scale) {
+ float newval = fabs(val);
uint64_t phi, pmid, plo;
plo = (uint64_t)newval;
pmid = (uint64_t)(newval / 1e32);
diff --git a/xfa/fgas/localization/fgas_locale.h b/xfa/fgas/localization/fgas_locale.h
index f15766d2dd..42f20f1c0f 100644
--- a/xfa/fgas/localization/fgas_locale.h
+++ b/xfa/fgas/localization/fgas_locale.h
@@ -103,7 +103,7 @@ class CFX_Decimal {
explicit CFX_Decimal(uint64_t val);
explicit CFX_Decimal(int32_t val);
explicit CFX_Decimal(int64_t val);
- explicit CFX_Decimal(FX_FLOAT val, uint8_t scale = 3);
+ explicit CFX_Decimal(float val, uint8_t scale = 3);
explicit CFX_Decimal(const CFX_WideStringC& str);
explicit CFX_Decimal(const CFX_ByteStringC& str);
operator CFX_WideString() const;
diff --git a/xfa/fgas/localization/fgas_localeimp.h b/xfa/fgas/localization/fgas_localeimp.h
index a66921b61c..684dfee20b 100644
--- a/xfa/fgas/localization/fgas_localeimp.h
+++ b/xfa/fgas/localization/fgas_localeimp.h
@@ -28,7 +28,7 @@ class CFX_FormatString {
CFX_WideString& wsValue);
bool ParseNum(const CFX_WideString& wsSrcNum,
const CFX_WideString& wsPattern,
- FX_FLOAT& fValue);
+ float& fValue);
bool ParseNum(const CFX_WideString& wsSrcNum,
const CFX_WideString& wsPattern,
CFX_WideString& wsValue);
@@ -46,7 +46,7 @@ class CFX_FormatString {
bool FormatNum(const CFX_WideString& wsSrcNum,
const CFX_WideString& wsPattern,
CFX_WideString& wsOutput);
- bool FormatNum(FX_FLOAT fNum,
+ bool FormatNum(float fNum,
const CFX_WideString& wsPattern,
CFX_WideString& wsOutput);
bool FormatDateTime(const CFX_WideString& wsSrcDateTime,
diff --git a/xfa/fwl/cfwl_checkbox.cpp b/xfa/fwl/cfwl_checkbox.cpp
index ca31094fe6..c1ca3296b9 100644
--- a/xfa/fwl/cfwl_checkbox.cpp
+++ b/xfa/fwl/cfwl_checkbox.cpp
@@ -47,7 +47,7 @@ FWL_Type CFWL_CheckBox::GetClassID() const {
return FWL_Type::CheckBox;
}
-void CFWL_CheckBox::SetBoxSize(FX_FLOAT fHeight) {
+void CFWL_CheckBox::SetBoxSize(float fHeight) {
m_fBoxHeight = fHeight;
}
@@ -129,7 +129,7 @@ void CFWL_CheckBox::Layout() {
FXSYS_round(m_pProperties->m_rtWidget.height);
m_rtClient = GetClientRect();
- FX_FLOAT fTextLeft = m_rtClient.left + m_fBoxHeight;
+ float fTextLeft = m_rtClient.left + m_fBoxHeight;
m_rtBox = CFX_RectF(m_rtClient.TopLeft(), m_fBoxHeight, m_fBoxHeight);
m_rtCaption = CFX_RectF(fTextLeft, m_rtClient.top,
m_rtClient.right() - fTextLeft, m_rtClient.height);
diff --git a/xfa/fwl/cfwl_checkbox.h b/xfa/fwl/cfwl_checkbox.h
index 6df7440894..2f434f23cf 100644
--- a/xfa/fwl/cfwl_checkbox.h
+++ b/xfa/fwl/cfwl_checkbox.h
@@ -47,7 +47,7 @@ class CFWL_CheckBox : public CFWL_Widget {
void OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) override;
- void SetBoxSize(FX_FLOAT fHeight);
+ void SetBoxSize(float fHeight);
private:
void SetCheckState(int32_t iCheck);
@@ -69,7 +69,7 @@ class CFWL_CheckBox : public CFWL_Widget {
uint32_t m_dwTTOStyles;
int32_t m_iTTOAlign;
bool m_bBtnDown;
- FX_FLOAT m_fBoxHeight;
+ float m_fBoxHeight;
};
#endif // XFA_FWL_CFWL_CHECKBOX_H_
diff --git a/xfa/fwl/cfwl_combobox.cpp b/xfa/fwl/cfwl_combobox.cpp
index 6083943f94..61c363c95b 100644
--- a/xfa/fwl/cfwl_combobox.cpp
+++ b/xfa/fwl/cfwl_combobox.cpp
@@ -376,7 +376,7 @@ void CFWL_ComboBox::Layout() {
if (!theme)
return;
- FX_FLOAT fBtn = theme->GetScrollBarWidth();
+ float fBtn = theme->GetScrollBarWidth();
m_rtBtn = CFX_RectF(m_rtClient.right() - fBtn, m_rtClient.top, fBtn,
m_rtClient.height);
if (!IsDropDownStyle() || !m_pEdit)
@@ -543,13 +543,13 @@ void CFWL_ComboBox::DisForm_ShowDropList(bool bActivate) {
ResetListItemAlignment();
pComboList->ChangeSelected(m_iCurSel);
- FX_FLOAT fItemHeight = pComboList->CalcItemHeight();
- FX_FLOAT fBorder = GetBorderSize(true);
- FX_FLOAT fPopupMin = 0.0f;
+ float fItemHeight = pComboList->CalcItemHeight();
+ float fBorder = GetBorderSize(true);
+ float fPopupMin = 0.0f;
if (iItems > 3)
fPopupMin = fItemHeight * 3 + fBorder * 2;
- FX_FLOAT fPopupMax = fItemHeight * iItems + fBorder * 2;
+ float fPopupMax = fItemHeight * iItems + fBorder * 2;
CFX_RectF rtList(m_rtClient.left, 0, m_pProperties->m_rtWidget.width, 0);
GetPopupPos(fPopupMin, fPopupMax, m_pProperties->m_rtWidget, rtList);
@@ -666,8 +666,8 @@ void CFWL_ComboBox::DisForm_Layout() {
if (!theme)
return;
- FX_FLOAT borderWidth = 1;
- FX_FLOAT fBtn = theme->GetScrollBarWidth();
+ float borderWidth = 1;
+ float fBtn = theme->GetScrollBarWidth();
if (!(GetStylesEx() & FWL_STYLEEXT_CMB_ReadOnly)) {
m_rtBtn =
CFX_RectF(m_rtClient.right() - fBtn, m_rtClient.top + borderWidth,
diff --git a/xfa/fwl/cfwl_datetimepicker.cpp b/xfa/fwl/cfwl_datetimepicker.cpp
index a6ba65a3b2..e1d3a748d6 100644
--- a/xfa/fwl/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/cfwl_datetimepicker.cpp
@@ -81,7 +81,7 @@ void CFWL_DateTimePicker::Update() {
if (!theme)
return;
- FX_FLOAT fBtn = theme->GetScrollBarWidth();
+ float fBtn = theme->GetScrollBarWidth();
m_rtBtn = CFX_RectF(m_rtClient.right() - fBtn, m_rtClient.top, fBtn - 1,
m_rtClient.height - 1);
@@ -349,8 +349,8 @@ void CFWL_DateTimePicker::DisForm_ShowMonthCalendar(bool bActivate) {
if (bActivate) {
CFX_RectF rtMonthCal = m_pMonthCal->GetAutosizedWidgetRect();
- FX_FLOAT fPopupMin = rtMonthCal.height;
- FX_FLOAT fPopupMax = rtMonthCal.height;
+ float fPopupMin = rtMonthCal.height;
+ float fPopupMax = rtMonthCal.height;
CFX_RectF rtAnchor(m_pProperties->m_rtWidget);
rtAnchor.width = rtMonthCal.width;
rtMonthCal.left = m_rtClient.left;
diff --git a/xfa/fwl/cfwl_datetimepicker.h b/xfa/fwl/cfwl_datetimepicker.h
index 2935ee8b1c..0f086d6b32 100644
--- a/xfa/fwl/cfwl_datetimepicker.h
+++ b/xfa/fwl/cfwl_datetimepicker.h
@@ -101,7 +101,7 @@ class CFWL_DateTimePicker : public CFWL_Widget {
std::unique_ptr<CFWL_DateTimeEdit> m_pEdit;
std::unique_ptr<CFWL_MonthCalendar> m_pMonthCal;
std::unique_ptr<CFWL_FormProxy> m_pForm;
- FX_FLOAT m_fBtn;
+ float m_fBtn;
};
#endif // XFA_FWL_CFWL_DATETIMEPICKER_H_
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index b3b05a52d0..4ddc3a624b 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -45,13 +45,13 @@ bool FX_EDIT_ISLATINWORD(wchar_t c) {
}
void AddSquigglyPath(CFX_Path* pPathData,
- FX_FLOAT fStartX,
- FX_FLOAT fEndX,
- FX_FLOAT fY,
- FX_FLOAT fStep) {
+ float fStartX,
+ float fEndX,
+ float fY,
+ float fStep) {
pPathData->MoveTo(CFX_PointF(fStartX, fY));
int i = 1;
- for (FX_FLOAT fx = fStartX + fStep; fx < fEndX; fx += fStep, ++i)
+ for (float fx = fStartX + fStep; fx < fEndX; fx += fStep, ++i)
pPathData->LineTo(CFX_PointF(fx, fY + (i & 1) * fStep));
}
@@ -161,16 +161,16 @@ FWL_WidgetHit CFWL_Edit::HitTest(const CFX_PointF& point) {
void CFWL_Edit::AddSpellCheckObj(CFX_Path& PathData,
int32_t nStart,
int32_t nCount,
- FX_FLOAT fOffSetX,
- FX_FLOAT fOffSetY) {
- FX_FLOAT fStartX = 0.0f;
- FX_FLOAT fEndX = 0.0f;
- FX_FLOAT fY = 0.0f;
- FX_FLOAT fStep = 0.0f;
+ float fOffSetX,
+ float fOffSetY) {
+ float fStartX = 0.0f;
+ float fEndX = 0.0f;
+ float fY = 0.0f;
+ float fStep = 0.0f;
CFDE_TxtEdtPage* pPage = m_EdtEngine.GetPage(0);
const FDE_TXTEDTPARAMS* txtEdtParams = m_EdtEngine.GetEditParams();
- FX_FLOAT fAsent = static_cast<FX_FLOAT>(txtEdtParams->pFont->GetAscent()) *
- txtEdtParams->fFontSize / 1000;
+ float fAsent = static_cast<float>(txtEdtParams->pFont->GetAscent()) *
+ txtEdtParams->fFontSize / 1000;
std::vector<CFX_RectF> rectArray;
pPage->CalcRangeRectArray(nStart, nCount, &rectArray);
@@ -195,8 +195,8 @@ void CFWL_Edit::DrawSpellCheck(CFX_Graphics* pGraphics,
CFX_ByteString sLatinWord;
CFX_Path pathSpell;
int32_t nStart = 0;
- FX_FLOAT fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
- FX_FLOAT fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
+ float fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
+ float fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
CFX_WideString wsSpell = GetText();
int32_t nContentLen = wsSpell.GetLength();
for (int i = 0; i < nContentLen; i++) {
@@ -468,7 +468,7 @@ bool CFWL_Edit::OnValidate(const CFX_WideString& wsText) {
return event.bValidate;
}
-void CFWL_Edit::SetScrollOffset(FX_FLOAT fScrollOffset) {
+void CFWL_Edit::SetScrollOffset(float fScrollOffset) {
m_fScrollOffsetY = fScrollOffset;
}
@@ -516,8 +516,8 @@ void CFWL_Edit::DrawContent(CFX_Graphics* pGraphics,
pGraphics->SaveGraphState();
CFX_RectF rtClip = m_rtEngine;
- FX_FLOAT fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
- FX_FLOAT fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
+ float fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
+ float fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
CFX_Matrix mt(1, 0, 0, 1, fOffSetX, fOffSetY);
if (pMatrix) {
pMatrix->TransformRect(rtClip);
@@ -577,8 +577,8 @@ void CFWL_Edit::DrawContent(CFX_Graphics* pGraphics,
pGraphics->RestoreGraphState();
CFX_Path path;
int32_t iLimit = m_nLimit > 0 ? m_nLimit : 1;
- FX_FLOAT fStep = m_rtEngine.width / iLimit;
- FX_FLOAT fLeft = m_rtEngine.left + 1;
+ float fStep = m_rtEngine.width / iLimit;
+ float fLeft = m_rtEngine.left + 1;
for (int32_t i = 1; i < iLimit; i++) {
fLeft += fStep;
path.AddLine(CFX_PointF(fLeft, m_rtClient.top),
@@ -710,8 +710,8 @@ void CFWL_Edit::UpdateEditLayout() {
bool CFWL_Edit::UpdateOffset() {
CFX_RectF rtCaret;
m_EdtEngine.GetCaretRect(rtCaret);
- FX_FLOAT fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
- FX_FLOAT fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
+ float fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
+ float fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
rtCaret.Offset(fOffSetX, fOffSetY);
const CFX_RectF& rtEidt = m_rtEngine;
if (rtEidt.Contains(rtCaret)) {
@@ -732,8 +732,8 @@ bool CFWL_Edit::UpdateOffset() {
return false;
}
- FX_FLOAT offsetX = 0.0;
- FX_FLOAT offsetY = 0.0;
+ float offsetX = 0.0;
+ float offsetY = 0.0;
if (rtCaret.left < rtEidt.left)
offsetX = rtCaret.left - rtEidt.left;
if (rtCaret.right() > rtEidt.right())
@@ -749,7 +749,7 @@ bool CFWL_Edit::UpdateOffset() {
return true;
}
-bool CFWL_Edit::UpdateOffset(CFWL_ScrollBar* pScrollBar, FX_FLOAT fPosChanged) {
+bool CFWL_Edit::UpdateOffset(CFWL_ScrollBar* pScrollBar, float fPosChanged) {
if (pScrollBar == m_pHorzScrollBar.get())
m_fScrollOffsetX += fPosChanged;
else
@@ -763,9 +763,9 @@ void CFWL_Edit::UpdateVAlignment() {
return;
const CFX_RectF& rtFDE = pPage->GetContentsBox();
- FX_FLOAT fOffsetY = 0.0f;
- FX_FLOAT fSpaceAbove = 0.0f;
- FX_FLOAT fSpaceBelow = 0.0f;
+ float fOffsetY = 0.0f;
+ float fSpaceAbove = 0.0f;
+ float fSpaceBelow = 0.0f;
IFWL_ThemeProvider* theme = GetAvailableTheme();
if (theme) {
CFWL_ThemePart part;
@@ -807,7 +807,7 @@ void CFWL_Edit::UpdateCaret() {
CFX_RectF rtClient = GetClientRect();
rtCaret.Intersect(rtClient);
if (rtCaret.left > rtClient.right()) {
- FX_FLOAT right = rtCaret.right();
+ float right = rtCaret.right();
rtCaret.left = rtClient.right() - 1;
rtCaret.width = right - rtCaret.left;
}
@@ -838,10 +838,10 @@ CFWL_ScrollBar* CFWL_Edit::UpdateScroll() {
CFX_RectF rtScroll = m_pHorzScrollBar->GetWidgetRect();
if (rtScroll.width < rtFDE.width) {
m_pHorzScrollBar->LockUpdate();
- FX_FLOAT fRange = rtFDE.width - rtScroll.width;
+ float fRange = rtFDE.width - rtScroll.width;
m_pHorzScrollBar->SetRange(0.0f, fRange);
- FX_FLOAT fPos = std::min(std::max(m_fScrollOffsetX, 0.0f), fRange);
+ float fPos = std::min(std::max(m_fScrollOffsetX, 0.0f), fRange);
m_pHorzScrollBar->SetPos(fPos);
m_pHorzScrollBar->SetTrackPos(fPos);
m_pHorzScrollBar->SetPageSize(rtScroll.width);
@@ -864,11 +864,11 @@ CFWL_ScrollBar* CFWL_Edit::UpdateScroll() {
CFX_RectF rtScroll = m_pVertScrollBar->GetWidgetRect();
if (rtScroll.height < rtFDE.height) {
m_pVertScrollBar->LockUpdate();
- FX_FLOAT fStep = m_EdtEngine.GetEditParams()->fLineSpace;
- FX_FLOAT fRange = std::max(rtFDE.height - m_rtEngine.height, fStep);
+ float fStep = m_EdtEngine.GetEditParams()->fLineSpace;
+ float fRange = std::max(rtFDE.height - m_rtEngine.height, fStep);
m_pVertScrollBar->SetRange(0.0f, fRange);
- FX_FLOAT fPos = std::min(std::max(m_fScrollOffsetY, 0.0f), fRange);
+ float fPos = std::min(std::max(m_fScrollOffsetY, 0.0f), fRange);
m_pVertScrollBar->SetPos(fPos);
m_pVertScrollBar->SetTrackPos(fPos);
m_pVertScrollBar->SetPageSize(rtScroll.height);
@@ -934,7 +934,7 @@ void CFWL_Edit::Layout() {
if (!theme)
return;
- FX_FLOAT fWidth = theme->GetScrollBarWidth();
+ float fWidth = theme->GetScrollBarWidth();
CFWL_ThemePart part;
if (!m_pOuter) {
part.m_pWidget = this;
@@ -1004,7 +1004,7 @@ void CFWL_Edit::LayoutScrollBar() {
bool bShowHorzScrollbar = IsShowScrollBar(false);
IFWL_ThemeProvider* theme = GetAvailableTheme();
- FX_FLOAT fWidth = theme ? theme->GetScrollBarWidth() : 0;
+ float fWidth = theme ? theme->GetScrollBarWidth() : 0;
if (bShowVertScrollbar) {
if (!m_pVertScrollBar) {
InitVerticalScrollBar();
@@ -1483,11 +1483,11 @@ void CFWL_Edit::OnChar(CFWL_MessageKey* pMsg) {
bool CFWL_Edit::OnScroll(CFWL_ScrollBar* pScrollBar,
CFWL_EventScroll::Code dwCode,
- FX_FLOAT fPos) {
+ float fPos) {
CFX_SizeF fs;
pScrollBar->GetRange(&fs.width, &fs.height);
- FX_FLOAT iCurPos = pScrollBar->GetPos();
- FX_FLOAT fStep = pScrollBar->GetStepSize();
+ float iCurPos = pScrollBar->GetPos();
+ float fStep = pScrollBar->GetStepSize();
switch (dwCode) {
case CFWL_EventScroll::Code::Min: {
fPos = fs.width;
diff --git a/xfa/fwl/cfwl_edit.h b/xfa/fwl/cfwl_edit.h
index 13e4be2c68..0dbbcd6eef 100644
--- a/xfa/fwl/cfwl_edit.h
+++ b/xfa/fwl/cfwl_edit.h
@@ -100,7 +100,7 @@ class CFWL_Edit : public CFWL_Widget {
bool OnPageUnload(int32_t nPageIndex);
void OnAddDoRecord(std::unique_ptr<IFDE_TxtEdtDoRecord> pRecord);
bool OnValidate(const CFX_WideString& wsText);
- void SetScrollOffset(FX_FLOAT fScrollOffset);
+ void SetScrollOffset(float fScrollOffset);
protected:
void ShowCaret(CFX_RectF* pRect);
@@ -121,7 +121,7 @@ class CFWL_Edit : public CFWL_Widget {
void UpdateEditParams();
void UpdateEditLayout();
bool UpdateOffset();
- bool UpdateOffset(CFWL_ScrollBar* pScrollBar, FX_FLOAT fPosChanged);
+ bool UpdateOffset(CFWL_ScrollBar* pScrollBar, float fPosChanged);
void UpdateVAlignment();
void UpdateCaret();
CFWL_ScrollBar* UpdateScroll();
@@ -141,8 +141,8 @@ class CFWL_Edit : public CFWL_Widget {
void AddSpellCheckObj(CFX_Path& PathData,
int32_t nStart,
int32_t nCount,
- FX_FLOAT fOffSetX,
- FX_FLOAT fOffSetY);
+ float fOffSetX,
+ float fOffSetY);
void DoButtonDown(CFWL_MessageMouse* pMsg);
void OnFocusChanged(CFWL_Message* pMsg, bool bSet);
@@ -154,19 +154,19 @@ class CFWL_Edit : public CFWL_Widget {
void OnChar(CFWL_MessageKey* pMsg);
bool OnScroll(CFWL_ScrollBar* pScrollBar,
CFWL_EventScroll::Code dwCode,
- FX_FLOAT fPos);
+ float fPos);
CFX_RectF m_rtClient;
CFX_RectF m_rtEngine;
CFX_RectF m_rtStatic;
- FX_FLOAT m_fVAlignOffset;
- FX_FLOAT m_fScrollOffsetX;
- FX_FLOAT m_fScrollOffsetY;
+ float m_fVAlignOffset;
+ float m_fScrollOffsetX;
+ float m_fScrollOffsetY;
CFDE_TxtEdtEngine m_EdtEngine;
bool m_bLButtonDown;
int32_t m_nSelStart;
int32_t m_nLimit;
- FX_FLOAT m_fFontSize;
+ float m_fFontSize;
bool m_bSetRange;
int32_t m_iMax;
std::unique_ptr<CFWL_ScrollBar> m_pVertScrollBar;
diff --git a/xfa/fwl/cfwl_eventscroll.h b/xfa/fwl/cfwl_eventscroll.h
index 2fdef9e7b1..a13eeef020 100644
--- a/xfa/fwl/cfwl_eventscroll.h
+++ b/xfa/fwl/cfwl_eventscroll.h
@@ -28,7 +28,7 @@ class CFWL_EventScroll : public CFWL_Event {
~CFWL_EventScroll() override;
Code m_iScrollCode;
- FX_FLOAT m_fPos;
+ float m_fPos;
};
#endif // XFA_FWL_CFWL_EVENTSCROLL_H_
diff --git a/xfa/fwl/cfwl_form.cpp b/xfa/fwl/cfwl_form.cpp
index 5e956ade2d..1b2d668e5a 100644
--- a/xfa/fwl/cfwl_form.cpp
+++ b/xfa/fwl/cfwl_form.cpp
@@ -161,8 +161,8 @@ void CFWL_Form::DrawBackground(CFX_Graphics* pGraphics,
CFX_RectF CFWL_Form::GetEdgeRect() {
CFX_RectF rtEdge = m_rtRelative;
if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_Border) {
- FX_FLOAT fCX = GetBorderSize(true);
- FX_FLOAT fCY = GetBorderSize(false);
+ float fCX = GetBorderSize(true);
+ float fCY = GetBorderSize(false);
rtEdge.Deflate(fCX, fCY, fCX, fCY);
}
return rtEdge;
diff --git a/xfa/fwl/cfwl_form.h b/xfa/fwl/cfwl_form.h
index 7202cb279b..ec7fc137be 100644
--- a/xfa/fwl/cfwl_form.h
+++ b/xfa/fwl/cfwl_form.h
@@ -63,8 +63,8 @@ class CFWL_Form : public CFWL_Widget {
CFX_RectF m_rtRelative;
std::unique_ptr<CFWL_NoteLoop> m_pNoteLoop;
CFWL_Widget* m_pSubFocus;
- FX_FLOAT m_fCXBorder;
- FX_FLOAT m_fCYBorder;
+ float m_fCXBorder;
+ float m_fCYBorder;
};
#endif // XFA_FWL_CFWL_FORM_H_
diff --git a/xfa/fwl/cfwl_listbox.cpp b/xfa/fwl/cfwl_listbox.cpp
index 0b82709972..925c6f1f72 100644
--- a/xfa/fwl/cfwl_listbox.cpp
+++ b/xfa/fwl/cfwl_listbox.cpp
@@ -306,11 +306,11 @@ void CFWL_ListBox::SetFocusItem(CFWL_ListItem* pItem) {
CFWL_ListItem* CFWL_ListBox::GetItemAtPoint(const CFX_PointF& point) {
CFX_PointF pos = point - m_rtConent.TopLeft();
- FX_FLOAT fPosX = 0.0f;
+ float fPosX = 0.0f;
if (m_pHorzScrollBar)
fPosX = m_pHorzScrollBar->GetPos();
- FX_FLOAT fPosY = 0.0;
+ float fPosY = 0.0;
if (m_pVertScrollBar)
fPosY = m_pVertScrollBar->GetPos();
@@ -334,7 +334,7 @@ bool CFWL_ListBox::ScrollToVisible(CFWL_ListItem* pItem) {
CFX_RectF rtItem = pItem ? pItem->GetRect() : CFX_RectF();
bool bScroll = false;
- FX_FLOAT fPosY = m_pVertScrollBar->GetPos();
+ float fPosY = m_pVertScrollBar->GetPos();
rtItem.Offset(0, -fPosY + m_rtConent.top);
if (rtItem.top < m_rtConent.top) {
fPosY += rtItem.top - m_rtConent.top;
@@ -378,11 +378,11 @@ void CFWL_ListBox::DrawBkground(CFX_Graphics* pGraphics,
void CFWL_ListBox::DrawItems(CFX_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme,
const CFX_Matrix* pMatrix) {
- FX_FLOAT fPosX = 0.0f;
+ float fPosX = 0.0f;
if (m_pHorzScrollBar)
fPosX = m_pHorzScrollBar->GetPos();
- FX_FLOAT fPosY = 0.0f;
+ float fPosY = 0.0f;
if (m_pVertScrollBar)
fPosY = m_pVertScrollBar->GetPos();
@@ -484,11 +484,10 @@ CFX_SizeF CFWL_ListBox::CalcSize(bool bAutoSize) {
pUIMargin.height);
}
- FX_FLOAT fWidth = GetMaxTextWidth();
+ float fWidth = GetMaxTextWidth();
fWidth += 2 * kItemTextMargin;
if (!bAutoSize) {
- FX_FLOAT fActualWidth =
- m_rtClient.width - rtUIMargin.left - rtUIMargin.width;
+ float fActualWidth = m_rtClient.width - rtUIMargin.left - rtUIMargin.width;
fWidth = std::max(fWidth, fActualWidth);
}
m_fItemHeight = CalcItemHeight();
@@ -502,7 +501,7 @@ CFX_SizeF CFWL_ListBox::CalcSize(bool bAutoSize) {
if (bAutoSize)
return fs;
- FX_FLOAT iHeight = m_rtClient.height;
+ float iHeight = m_rtClient.height;
bool bShowVertScr = false;
bool bShowHorzScr = false;
if (!bShowVertScr && (m_pProperties->m_dwStyles & FWL_WGTSTYLE_VScroll))
@@ -527,7 +526,7 @@ CFX_SizeF CFWL_ListBox::CalcSize(bool bAutoSize) {
m_pVertScrollBar->SetPageSize(rtScrollBar.height * 9 / 10);
m_pVertScrollBar->SetStepSize(m_fItemHeight);
- FX_FLOAT fPos =
+ float fPos =
std::min(std::max(m_pVertScrollBar->GetPos(), 0.f), szRange.height);
m_pVertScrollBar->SetPos(fPos);
m_pVertScrollBar->SetTrackPos(fPos);
@@ -559,7 +558,7 @@ CFX_SizeF CFWL_ListBox::CalcSize(bool bAutoSize) {
m_pHorzScrollBar->SetPageSize(fWidth * 9 / 10);
m_pHorzScrollBar->SetStepSize(fWidth / 10);
- FX_FLOAT fPos =
+ float fPos =
std::min(std::max(m_pHorzScrollBar->GetPos(), 0.f), szRange.height);
m_pHorzScrollBar->SetPos(fPos);
m_pHorzScrollBar->SetTrackPos(fPos);
@@ -584,8 +583,8 @@ CFX_SizeF CFWL_ListBox::CalcSize(bool bAutoSize) {
void CFWL_ListBox::UpdateItemSize(CFWL_ListItem* pItem,
CFX_SizeF& size,
- FX_FLOAT fWidth,
- FX_FLOAT fItemHeight,
+ float fWidth,
+ float fItemHeight,
bool bAutoSize) const {
if (!bAutoSize && pItem) {
CFX_RectF rtItem(0, size.height, fWidth, fItemHeight);
@@ -595,8 +594,8 @@ void CFWL_ListBox::UpdateItemSize(CFWL_ListItem* pItem,
size.height += fItemHeight;
}
-FX_FLOAT CFWL_ListBox::GetMaxTextWidth() {
- FX_FLOAT fRet = 0.0f;
+float CFWL_ListBox::GetMaxTextWidth() {
+ float fRet = 0.0f;
int32_t iCount = CountItems(this);
for (int32_t i = 0; i < iCount; i++) {
CFWL_ListItem* pItem = GetItem(this, i);
@@ -610,12 +609,12 @@ FX_FLOAT CFWL_ListBox::GetMaxTextWidth() {
return fRet;
}
-FX_FLOAT CFWL_ListBox::GetScrollWidth() {
+float CFWL_ListBox::GetScrollWidth() {
IFWL_ThemeProvider* theme = GetAvailableTheme();
return theme ? theme->GetScrollBarWidth() : 0.0f;
}
-FX_FLOAT CFWL_ListBox::CalcItemHeight() {
+float CFWL_ListBox::CalcItemHeight() {
IFWL_ThemeProvider* theme = GetAvailableTheme();
CFWL_ThemePart part;
part.m_pWidget = this;
@@ -838,11 +837,11 @@ void CFWL_ListBox::OnVK(CFWL_ListItem* pItem, bool bShift, bool bCtrl) {
bool CFWL_ListBox::OnScroll(CFWL_ScrollBar* pScrollBar,
CFWL_EventScroll::Code dwCode,
- FX_FLOAT fPos) {
+ float fPos) {
CFX_SizeF fs;
pScrollBar->GetRange(&fs.width, &fs.height);
- FX_FLOAT iCurPos = pScrollBar->GetPos();
- FX_FLOAT fStep = pScrollBar->GetStepSize();
+ float iCurPos = pScrollBar->GetPos();
+ float fStep = pScrollBar->GetStepSize();
switch (dwCode) {
case CFWL_EventScroll::Code::Min: {
fPos = fs.width;
diff --git a/xfa/fwl/cfwl_listbox.h b/xfa/fwl/cfwl_listbox.h
index caa4f509f8..18aaf4cbd5 100644
--- a/xfa/fwl/cfwl_listbox.h
+++ b/xfa/fwl/cfwl_listbox.h
@@ -63,8 +63,8 @@ class CFWL_ListBox : public CFWL_Widget {
int32_t GetSelIndex(int32_t nIndex);
void SetSelItem(CFWL_ListItem* hItem, bool bSelect);
- FX_FLOAT GetItemHeight() const { return m_fItemHeight; }
- FX_FLOAT CalcItemHeight();
+ float GetItemHeight() const { return m_fItemHeight; }
+ float CalcItemHeight();
protected:
CFWL_ListItem* GetListItem(CFWL_ListItem* hItem, uint32_t dwKeyCode);
@@ -101,11 +101,11 @@ class CFWL_ListBox : public CFWL_Widget {
CFX_SizeF CalcSize(bool bAutoSize);
void UpdateItemSize(CFWL_ListItem* hItem,
CFX_SizeF& size,
- FX_FLOAT fWidth,
- FX_FLOAT fHeight,
+ float fWidth,
+ float fHeight,
bool bAutoSize) const;
- FX_FLOAT GetMaxTextWidth();
- FX_FLOAT GetScrollWidth();
+ float GetMaxTextWidth();
+ float GetScrollWidth();
void OnFocusChanged(CFWL_Message* pMsg, bool bSet);
void OnLButtonDown(CFWL_MessageMouse* pMsg);
@@ -115,7 +115,7 @@ class CFWL_ListBox : public CFWL_Widget {
void OnVK(CFWL_ListItem* hItem, bool bShift, bool bCtrl);
bool OnScroll(CFWL_ScrollBar* pScrollBar,
CFWL_EventScroll::Code dwCode,
- FX_FLOAT fPos);
+ float fPos);
CFX_RectF m_rtClient;
CFX_RectF m_rtStatic;
@@ -125,8 +125,8 @@ class CFWL_ListBox : public CFWL_Widget {
uint32_t m_dwTTOStyles;
int32_t m_iTTOAligns;
CFWL_ListItem* m_hAnchor;
- FX_FLOAT m_fItemHeight;
- FX_FLOAT m_fScorllBarWidth;
+ float m_fItemHeight;
+ float m_fScorllBarWidth;
bool m_bLButtonDown;
IFWL_ThemeProvider* m_pScrollBarTP;
std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray;
diff --git a/xfa/fwl/cfwl_monthcalendar.cpp b/xfa/fwl/cfwl_monthcalendar.cpp
index 2dcac03731..6d6066370d 100644
--- a/xfa/fwl/cfwl_monthcalendar.cpp
+++ b/xfa/fwl/cfwl_monthcalendar.cpp
@@ -415,8 +415,8 @@ CFX_SizeF CFWL_MonthCalendar::CalcSize() {
CFWL_ThemePart params;
params.m_pWidget = this;
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
- FX_FLOAT fMaxWeekW = 0.0f;
- FX_FLOAT fMaxWeekH = 0.0f;
+ float fMaxWeekW = 0.0f;
+ float fMaxWeekH = 0.0f;
for (uint32_t i = 0; i < 7; ++i) {
CFX_SizeF sz = CalcTextSize(GetCapacityForDay(pTheme, params, i),
@@ -425,8 +425,8 @@ CFX_SizeF CFWL_MonthCalendar::CalcSize() {
fMaxWeekH = (fMaxWeekH >= sz.height) ? fMaxWeekH : sz.height;
}
- FX_FLOAT fDayMaxW = 0.0f;
- FX_FLOAT fDayMaxH = 0.0f;
+ float fDayMaxW = 0.0f;
+ float fDayMaxH = 0.0f;
for (int day = 10; day <= 31; day++) {
CFX_WideString wsDay;
wsDay.Format(L"%d", day);
@@ -434,16 +434,16 @@ CFX_SizeF CFWL_MonthCalendar::CalcSize() {
fDayMaxW = (fDayMaxW >= sz.width) ? fDayMaxW : sz.width;
fDayMaxH = (fDayMaxH >= sz.height) ? fDayMaxH : sz.height;
}
- m_szCell.width = FX_FLOAT((fMaxWeekW >= fDayMaxW) ? (int)(fMaxWeekW + 0.5)
- : (int)(fDayMaxW + 0.5));
+ m_szCell.width = float((fMaxWeekW >= fDayMaxW) ? (int)(fMaxWeekW + 0.5)
+ : (int)(fDayMaxW + 0.5));
m_szCell.height = (fMaxWeekH >= fDayMaxH) ? fMaxWeekH : fDayMaxH;
CFX_SizeF fs;
fs.width = m_szCell.width * MONTHCAL_COLUMNS +
MONTHCAL_HMARGIN * MONTHCAL_COLUMNS * 2 +
MONTHCAL_HEADER_BTN_HMARGIN * 2;
- FX_FLOAT fMonthMaxW = 0.0f;
- FX_FLOAT fMonthMaxH = 0.0f;
+ float fMonthMaxW = 0.0f;
+ float fMonthMaxH = 0.0f;
for (uint32_t i = 0; i < 12; ++i) {
CFX_SizeF sz = CalcTextSize(GetCapacityForMonth(pTheme, params, i),
@@ -472,8 +472,8 @@ CFX_SizeF CFWL_MonthCalendar::CalcSize() {
}
void CFWL_MonthCalendar::CalcHeadSize() {
- FX_FLOAT fHeadHMargin = (m_rtClient.width - m_szHead.width) / 2;
- FX_FLOAT fHeadVMargin = (m_szCell.width - m_szHead.height) / 2;
+ float fHeadHMargin = (m_rtClient.width - m_szHead.width) / 2;
+ float fHeadVMargin = (m_szCell.width - m_szHead.height) / 2;
m_rtHeadText = CFX_RectF(m_rtClient.left + fHeadHMargin,
m_rtClient.top + MONTHCAL_HEADER_BTN_VMARGIN +
MONTHCAL_VMARGIN + fHeadVMargin,
@@ -527,8 +527,8 @@ void CFWL_MonthCalendar::Layout() {
void CFWL_MonthCalendar::CalDateItem() {
bool bNewWeek = false;
int32_t iWeekOfMonth = 0;
- FX_FLOAT fLeft = m_rtDates.left;
- FX_FLOAT fTop = m_rtDates.top;
+ float fLeft = m_rtDates.left;
+ float fTop = m_rtDates.top;
for (const auto& pDateInfo : m_arrDates) {
if (bNewWeek) {
iWeekOfMonth++;
diff --git a/xfa/fwl/cfwl_scrollbar.cpp b/xfa/fwl/cfwl_scrollbar.cpp
index 1da2674550..abe99dacce 100644
--- a/xfa/fwl/cfwl_scrollbar.cpp
+++ b/xfa/fwl/cfwl_scrollbar.cpp
@@ -90,14 +90,14 @@ void CFWL_ScrollBar::DrawWidget(CFX_Graphics* pGraphics,
DrawThumb(pGraphics, pTheme, pMatrix);
}
-void CFWL_ScrollBar::SetTrackPos(FX_FLOAT fTrackPos) {
+void CFWL_ScrollBar::SetTrackPos(float fTrackPos) {
m_fTrackPos = fTrackPos;
m_rtThumb = CalcThumbButtonRect(m_rtThumb);
m_rtMinTrack = CalcMinTrackRect(m_rtMinTrack);
m_rtMaxTrack = CalcMaxTrackRect(m_rtMaxTrack);
}
-bool CFWL_ScrollBar::DoScroll(CFWL_EventScroll::Code dwCode, FX_FLOAT fPos) {
+bool CFWL_ScrollBar::DoScroll(CFWL_EventScroll::Code dwCode, float fPos) {
if (dwCode == CFWL_EventScroll::Code::None)
return false;
return OnScroll(dwCode, fPos);
@@ -164,7 +164,7 @@ void CFWL_ScrollBar::Layout() {
void CFWL_ScrollBar::CalcButtonLen() {
m_fButtonLen = IsVertical() ? m_rtClient.width : m_rtClient.height;
- FX_FLOAT fLength = IsVertical() ? m_rtClient.height : m_rtClient.width;
+ float fLength = IsVertical() ? m_rtClient.height : m_rtClient.width;
if (fLength < m_fButtonLen * 2) {
m_fButtonLen = fLength / 2;
m_bMinSize = true;
@@ -199,7 +199,7 @@ CFX_RectF CFWL_ScrollBar::CalcThumbButtonRect(const CFX_RectF& rtThumb) {
return rect;
}
- FX_FLOAT fRange = m_fRangeMax - m_fRangeMin;
+ float fRange = m_fRangeMax - m_fRangeMin;
if (fRange < 0) {
if (IsVertical()) {
return CFX_RectF(m_rtClient.left, m_rtMaxBtn.bottom(), m_rtClient.width,
@@ -209,22 +209,21 @@ CFX_RectF CFWL_ScrollBar::CalcThumbButtonRect(const CFX_RectF& rtThumb) {
}
CFX_RectF rtClient = m_rtClient;
- FX_FLOAT fLength = IsVertical() ? rtClient.height : rtClient.width;
- FX_FLOAT fSize = m_fButtonLen;
+ float fLength = IsVertical() ? rtClient.height : rtClient.width;
+ float fSize = m_fButtonLen;
fLength -= fSize * 2.0f;
if (fLength < fSize)
fLength = 0.0f;
- FX_FLOAT fThumbSize = fLength * fLength / (fRange + fLength);
+ float fThumbSize = fLength * fLength / (fRange + fLength);
fThumbSize = std::max(fThumbSize, kMinThumbSize);
- FX_FLOAT fDiff = std::max(fLength - fThumbSize, 0.0f);
- FX_FLOAT fTrackPos =
- std::max(std::min(m_fTrackPos, m_fRangeMax), m_fRangeMin);
+ float fDiff = std::max(fLength - fThumbSize, 0.0f);
+ float fTrackPos = std::max(std::min(m_fTrackPos, m_fRangeMax), m_fRangeMin);
if (!fRange)
return rect;
- FX_FLOAT iPos = fSize + fDiff * (fTrackPos - m_fRangeMin) / fRange;
+ float iPos = fSize + fDiff * (fTrackPos - m_fRangeMin) / fRange;
rect.left = rtClient.left;
rect.top = rtClient.top;
if (IsVertical()) {
@@ -264,20 +263,20 @@ CFX_RectF CFWL_ScrollBar::CalcMaxTrackRect(const CFX_RectF& rtMaxRect) {
return CFX_RectF(rtMaxRect.TopLeft(), 0, 0);
if (IsVertical()) {
- FX_FLOAT iy = (m_rtThumb.top + m_rtThumb.bottom()) / 2;
+ float iy = (m_rtThumb.top + m_rtThumb.bottom()) / 2;
return CFX_RectF(m_rtClient.left, iy, m_rtClient.width,
m_rtClient.bottom() - iy);
}
- FX_FLOAT ix = (m_rtThumb.left + m_rtThumb.right()) / 2;
+ float ix = (m_rtThumb.left + m_rtThumb.right()) / 2;
return CFX_RectF(ix, m_rtClient.top, m_rtClient.height - ix,
m_rtClient.height);
}
-FX_FLOAT CFWL_ScrollBar::GetTrackPointPos(const CFX_PointF& point) {
+float CFWL_ScrollBar::GetTrackPointPos(const CFX_PointF& point) {
CFX_PointF diff = point - m_cpTrackPoint;
- FX_FLOAT fRange = m_fRangeMax - m_fRangeMin;
- FX_FLOAT fPos;
+ float fRange = m_fRangeMax - m_fRangeMin;
+ float fPos;
if (IsVertical()) {
fPos = fRange * diff.y /
@@ -317,7 +316,7 @@ bool CFWL_ScrollBar::SendEvent() {
return true;
}
-bool CFWL_ScrollBar::OnScroll(CFWL_EventScroll::Code dwCode, FX_FLOAT fPos) {
+bool CFWL_ScrollBar::OnScroll(CFWL_EventScroll::Code dwCode, float fPos) {
CFWL_EventScroll ev(this);
ev.m_iScrollCode = dwCode;
ev.m_fPos = fPos;
diff --git a/xfa/fwl/cfwl_scrollbar.h b/xfa/fwl/cfwl_scrollbar.h
index 6a67fa8687..262d0794d8 100644
--- a/xfa/fwl/cfwl_scrollbar.h
+++ b/xfa/fwl/cfwl_scrollbar.h
@@ -35,23 +35,23 @@ class CFWL_ScrollBar : public CFWL_Widget {
void OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) override;
- void GetRange(FX_FLOAT* fMin, FX_FLOAT* fMax) const {
+ void GetRange(float* fMin, float* fMax) const {
ASSERT(fMin);
ASSERT(fMax);
*fMin = m_fRangeMin;
*fMax = m_fRangeMax;
}
- void SetRange(FX_FLOAT fMin, FX_FLOAT fMax) {
+ void SetRange(float fMin, float fMax) {
m_fRangeMin = fMin;
m_fRangeMax = fMax;
}
- FX_FLOAT GetPageSize() const { return m_fPageSize; }
- void SetPageSize(FX_FLOAT fPageSize) { m_fPageSize = fPageSize; }
- FX_FLOAT GetStepSize() const { return m_fStepSize; }
- void SetStepSize(FX_FLOAT fStepSize) { m_fStepSize = fStepSize; }
- FX_FLOAT GetPos() const { return m_fPos; }
- void SetPos(FX_FLOAT fPos) { m_fPos = fPos; }
- void SetTrackPos(FX_FLOAT fTrackPos);
+ float GetPageSize() const { return m_fPageSize; }
+ void SetPageSize(float fPageSize) { m_fPageSize = fPageSize; }
+ float GetStepSize() const { return m_fStepSize; }
+ void SetStepSize(float fStepSize) { m_fStepSize = fStepSize; }
+ float GetPos() const { return m_fPos; }
+ void SetPos(float fPos) { m_fPos = fPos; }
+ void SetTrackPos(float fTrackPos);
private:
class Timer : public CFWL_Timer {
@@ -84,16 +84,16 @@ class CFWL_ScrollBar : public CFWL_Widget {
CFX_RectF CalcThumbButtonRect(const CFX_RectF& rtThumbRect);
CFX_RectF CalcMinTrackRect(const CFX_RectF& rtMinRect);
CFX_RectF CalcMaxTrackRect(const CFX_RectF& rtMaxRect);
- FX_FLOAT GetTrackPointPos(const CFX_PointF& point);
+ float GetTrackPointPos(const CFX_PointF& point);
bool SendEvent();
- bool OnScroll(CFWL_EventScroll::Code dwCode, FX_FLOAT fPos);
+ bool OnScroll(CFWL_EventScroll::Code dwCode, float fPos);
void OnLButtonDown(const CFX_PointF& point);
void OnLButtonUp(const CFX_PointF& point);
void OnMouseMove(const CFX_PointF& point);
void OnMouseLeave();
void OnMouseWheel(const CFX_PointF& delta);
- bool DoScroll(CFWL_EventScroll::Code dwCode, FX_FLOAT fPos);
+ bool DoScroll(CFWL_EventScroll::Code dwCode, float fPos);
void DoMouseDown(int32_t iItem,
const CFX_RectF& rtItem,
int32_t& iState,
@@ -110,22 +110,22 @@ class CFWL_ScrollBar : public CFWL_Widget {
void DoMouseHover(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState);
CFWL_TimerInfo* m_pTimerInfo;
- FX_FLOAT m_fRangeMin;
- FX_FLOAT m_fRangeMax;
- FX_FLOAT m_fPageSize;
- FX_FLOAT m_fStepSize;
- FX_FLOAT m_fPos;
- FX_FLOAT m_fTrackPos;
+ float m_fRangeMin;
+ float m_fRangeMax;
+ float m_fPageSize;
+ float m_fStepSize;
+ float m_fPos;
+ float m_fTrackPos;
int32_t m_iMinButtonState;
int32_t m_iMaxButtonState;
int32_t m_iThumbButtonState;
int32_t m_iMinTrackState;
int32_t m_iMaxTrackState;
- FX_FLOAT m_fLastTrackPos;
+ float m_fLastTrackPos;
CFX_PointF m_cpTrackPoint;
int32_t m_iMouseWheel;
bool m_bMouseDown;
- FX_FLOAT m_fButtonLen;
+ float m_fButtonLen;
bool m_bMinSize;
CFX_RectF m_rtClient;
CFX_RectF m_rtThumb;
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp
index b5b8bf4c7d..f3ca6c012a 100644
--- a/xfa/fwl/cfwl_widget.cpp
+++ b/xfa/fwl/cfwl_widget.cpp
@@ -77,7 +77,7 @@ CFX_RectF CFWL_Widget::GetWidgetRect() {
void CFWL_Widget::InflateWidgetRect(CFX_RectF& rect) {
if (HasBorder()) {
- FX_FLOAT fBorder = GetBorderSize(true);
+ float fBorder = GetBorderSize(true);
rect.Inflate(fBorder, fBorder);
}
}
@@ -269,14 +269,14 @@ CFX_RectF CFWL_Widget::GetEdgeRect() {
CFX_RectF rtEdge(0, 0, m_pProperties->m_rtWidget.width,
m_pProperties->m_rtWidget.height);
if (HasBorder()) {
- FX_FLOAT fCX = GetBorderSize(true);
- FX_FLOAT fCY = GetBorderSize(false);
+ float fCX = GetBorderSize(true);
+ float fCY = GetBorderSize(false);
rtEdge.Deflate(fCX, fCY);
}
return rtEdge;
}
-FX_FLOAT CFWL_Widget::GetBorderSize(bool bCX) {
+float CFWL_Widget::GetBorderSize(bool bCX) {
IFWL_ThemeProvider* theme = GetAvailableTheme();
if (!theme)
return 0.0f;
@@ -328,8 +328,7 @@ CFX_SizeF CFWL_Widget::CalcTextSize(const CFX_WideString& wsText,
calPart.m_dwTTOStyles =
bMultiLine ? FDE_TTOSTYLE_LineWrap : FDE_TTOSTYLE_SingleLine;
calPart.m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft;
- FX_FLOAT fWidth =
- bMultiLine ? FWL_WGT_CalcMultiLineDefWidth : FWL_WGT_CalcWidth;
+ float fWidth = bMultiLine ? FWL_WGT_CalcMultiLineDefWidth : FWL_WGT_CalcWidth;
CFX_RectF rect(0, 0, fWidth, FWL_WGT_CalcHeight);
pTheme->CalcTextRect(&calPart, rect);
return CFX_SizeF(rect.width, rect.height);
@@ -378,8 +377,8 @@ void CFWL_Widget::SetGrab(bool bSet) {
pDriver->SetGrab(this, bSet);
}
-void CFWL_Widget::GetPopupPos(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+void CFWL_Widget::GetPopupPos(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) {
if (GetClassID() == FWL_Type::ComboBox) {
@@ -400,13 +399,13 @@ void CFWL_Widget::GetPopupPos(FX_FLOAT fMinHeight,
GetPopupPosGeneral(fMinHeight, fMaxHeight, rtAnchor, rtPopup);
}
-bool CFWL_Widget::GetPopupPosMenu(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+bool CFWL_Widget::GetPopupPosMenu(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) {
if (GetStylesEx() & FWL_STYLEEXT_MNU_Vert) {
bool bLeft = m_pProperties->m_rtWidget.left < 0;
- FX_FLOAT fRight = rtAnchor.right() + rtPopup.width;
+ float fRight = rtAnchor.right() + rtPopup.width;
CFX_PointF point = TransformTo(nullptr, CFX_PointF());
if (fRight + point.x > 0.0f || bLeft) {
rtPopup = CFX_RectF(rtAnchor.left - rtPopup.width, rtAnchor.top,
@@ -419,7 +418,7 @@ bool CFWL_Widget::GetPopupPosMenu(FX_FLOAT fMinHeight,
return true;
}
- FX_FLOAT fBottom = rtAnchor.bottom() + rtPopup.height;
+ float fBottom = rtAnchor.bottom() + rtPopup.height;
CFX_PointF point = TransformTo(nullptr, point);
if (fBottom + point.y > 0.0f) {
rtPopup = CFX_RectF(rtAnchor.left, rtAnchor.top - rtPopup.height,
@@ -432,18 +431,18 @@ bool CFWL_Widget::GetPopupPosMenu(FX_FLOAT fMinHeight,
return true;
}
-bool CFWL_Widget::GetPopupPosComboBox(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+bool CFWL_Widget::GetPopupPosComboBox(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) {
- FX_FLOAT fPopHeight = rtPopup.height;
+ float fPopHeight = rtPopup.height;
if (rtPopup.height > fMaxHeight)
fPopHeight = fMaxHeight;
else if (rtPopup.height < fMinHeight)
fPopHeight = fMinHeight;
- FX_FLOAT fWidth = std::max(rtAnchor.width, rtPopup.width);
- FX_FLOAT fBottom = rtAnchor.bottom() + fPopHeight;
+ float fWidth = std::max(rtAnchor.width, rtPopup.width);
+ float fBottom = rtAnchor.bottom() + fPopHeight;
CFX_PointF point = TransformTo(nullptr, CFX_PointF());
if (fBottom + point.y > 0.0f) {
rtPopup =
@@ -456,8 +455,8 @@ bool CFWL_Widget::GetPopupPosComboBox(FX_FLOAT fMinHeight,
return true;
}
-bool CFWL_Widget::GetPopupPosGeneral(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+bool CFWL_Widget::GetPopupPosGeneral(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) {
CFX_PointF point = TransformTo(nullptr, CFX_PointF());
diff --git a/xfa/fwl/cfwl_widget.h b/xfa/fwl/cfwl_widget.h
index 2387b753e5..b556e7a424 100644
--- a/xfa/fwl/cfwl_widget.h
+++ b/xfa/fwl/cfwl_widget.h
@@ -122,7 +122,7 @@ class CFWL_Widget : public IFWL_WidgetDelegate {
bool IsLocked() const { return m_iLock > 0; }
bool HasBorder() const;
CFX_RectF GetEdgeRect();
- FX_FLOAT GetBorderSize(bool bCX);
+ float GetBorderSize(bool bCX);
CFX_RectF GetRelativeRect();
IFWL_ThemeProvider* GetAvailableTheme();
CFX_SizeF CalcTextSize(const CFX_WideString& wsText,
@@ -134,8 +134,8 @@ class CFWL_Widget : public IFWL_WidgetDelegate {
int32_t iTTOAlign,
CFX_RectF& rect);
void SetGrab(bool bSet);
- void GetPopupPos(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ void GetPopupPos(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup);
void RegisterEventTarget(CFWL_Widget* pEventSource);
@@ -161,16 +161,16 @@ class CFWL_Widget : public IFWL_WidgetDelegate {
bool IsPopup() const;
bool IsChild() const;
CFWL_Widget* GetRootOuter();
- bool GetPopupPosMenu(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ bool GetPopupPosMenu(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup);
- bool GetPopupPosComboBox(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ bool GetPopupPosComboBox(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup);
- bool GetPopupPosGeneral(FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ bool GetPopupPosGeneral(float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup);
void DrawBackground(CFX_Graphics* pGraphics,
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp
index 7c0fddd419..d87556e158 100644
--- a/xfa/fwl/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/cfwl_widgetmgr.cpp
@@ -383,8 +383,8 @@ bool CFWL_WidgetMgr::IsAbleNative(CFWL_Widget* pWidget) const {
}
void CFWL_WidgetMgr::GetAdapterPopupPos(CFWL_Widget* pWidget,
- FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) const {
m_pAdapter->GetPopupPos(pWidget, fMinHeight, fMaxHeight, rtAnchor, rtPopup);
@@ -533,8 +533,8 @@ bool CFWL_WidgetMgr::IsNeedRepaint(CFWL_Widget* pWidget,
bool bOrginPtIntersectWidthDirty = rtDirty.Contains(rtWidget.TopLeft());
static FWL_NEEDREPAINTHITDATA hitPoint[kNeedRepaintHitPoints];
FXSYS_memset(hitPoint, 0, sizeof(hitPoint));
- FX_FLOAT fxPiece = rtWidget.width / kNeedRepaintHitPiece;
- FX_FLOAT fyPiece = rtWidget.height / kNeedRepaintHitPiece;
+ float fxPiece = rtWidget.width / kNeedRepaintHitPiece;
+ float fyPiece = rtWidget.height / kNeedRepaintHitPiece;
hitPoint[2].hitPoint.x = hitPoint[6].hitPoint.x = rtWidget.left;
hitPoint[0].hitPoint.x = hitPoint[3].hitPoint.x = hitPoint[7].hitPoint.x =
hitPoint[10].hitPoint.x = fxPiece + rtWidget.left;
diff --git a/xfa/fwl/cfwl_widgetmgr.h b/xfa/fwl/cfwl_widgetmgr.h
index 2d436bd8e2..c3dca31d76 100644
--- a/xfa/fwl/cfwl_widgetmgr.h
+++ b/xfa/fwl/cfwl_widgetmgr.h
@@ -64,8 +64,8 @@ class CFWL_WidgetMgr : public CFWL_WidgetMgrDelegate {
}
void GetAdapterPopupPos(CFWL_Widget* pWidget,
- FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
+ float fMinHeight,
+ float fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) const;
diff --git a/xfa/fwl/cfx_barcode.cpp b/xfa/fwl/cfx_barcode.cpp
index 1c22367901..cbd6b09975 100644
--- a/xfa/fwl/cfx_barcode.cpp
+++ b/xfa/fwl/cfx_barcode.cpp
@@ -160,7 +160,7 @@ bool CFX_Barcode::SetFont(CFX_Font* pFont) {
}
}
-bool CFX_Barcode::SetFontSize(FX_FLOAT size) {
+bool CFX_Barcode::SetFontSize(float size) {
switch (GetType()) {
case BC_CODE39:
case BC_CODABAR:
diff --git a/xfa/fwl/cfx_barcode.h b/xfa/fwl/cfx_barcode.h
index 3f4b340d95..d3df216977 100644
--- a/xfa/fwl/cfx_barcode.h
+++ b/xfa/fwl/cfx_barcode.h
@@ -46,7 +46,7 @@ class CFX_Barcode {
bool SetCalChecksum(bool state);
bool SetFont(CFX_Font* pFont);
- bool SetFontSize(FX_FLOAT size);
+ bool SetFontSize(float size);
bool SetFontColor(FX_ARGB color);
bool SetTextLocation(BC_TEXT_LOC location);
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.cpp b/xfa/fwl/theme/cfwl_checkboxtp.cpp
index 1d185b4c33..76a20fe14a 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_checkboxtp.cpp
@@ -92,8 +92,8 @@ void CFWL_CheckBoxTP::DrawSignCross(CFX_Graphics* pGraphics,
FX_ARGB argbFill,
CFX_Matrix* pMatrix) {
CFX_Path path;
- FX_FLOAT fRight = pRtSign->right();
- FX_FLOAT fBottom = pRtSign->bottom();
+ float fRight = pRtSign->right();
+ float fBottom = pRtSign->bottom();
path.AddLine(pRtSign->TopLeft(), CFX_PointF(fRight, fBottom));
path.AddLine(CFX_PointF(pRtSign->left, fBottom),
CFX_PointF(fRight, pRtSign->top));
@@ -111,9 +111,9 @@ void CFWL_CheckBoxTP::DrawSignDiamond(CFX_Graphics* pGraphics,
FX_ARGB argbFill,
CFX_Matrix* pMatrix) {
CFX_Path path;
- FX_FLOAT fWidth = pRtSign->width;
- FX_FLOAT fHeight = pRtSign->height;
- FX_FLOAT fBottom = pRtSign->bottom();
+ float fWidth = pRtSign->width;
+ float fHeight = pRtSign->height;
+ float fBottom = pRtSign->bottom();
path.MoveTo(CFX_PointF(pRtSign->left + fWidth / 2, pRtSign->top));
path.LineTo(CFX_PointF(pRtSign->left, pRtSign->top + fHeight / 2));
path.LineTo(CFX_PointF(pRtSign->left + fWidth / 2, fBottom));
@@ -146,18 +146,18 @@ void CFWL_CheckBoxTP::DrawSignStar(CFX_Graphics* pGraphics,
FX_ARGB argbFill,
CFX_Matrix* pMatrix) {
CFX_Path path;
- FX_FLOAT fBottom = pRtSign->bottom();
- FX_FLOAT fRadius =
- (pRtSign->top - fBottom) / (1 + static_cast<FX_FLOAT>(cos(FX_PI / 5.0f)));
+ float fBottom = pRtSign->bottom();
+ float fRadius =
+ (pRtSign->top - fBottom) / (1 + static_cast<float>(cos(FX_PI / 5.0f)));
CFX_PointF ptCenter((pRtSign->left + pRtSign->right()) / 2.0f,
(pRtSign->top + fBottom) / 2.0f);
CFX_PointF points[5];
- FX_FLOAT fAngel = FX_PI / 10.0f;
+ float fAngel = FX_PI / 10.0f;
for (int32_t i = 0; i < 5; i++) {
points[i] =
- ptCenter + CFX_PointF(fRadius * static_cast<FX_FLOAT>(cos(fAngel)),
- fRadius * static_cast<FX_FLOAT>(sin(fAngel)));
+ ptCenter + CFX_PointF(fRadius * static_cast<float>(cos(fAngel)),
+ fRadius * static_cast<float>(sin(fAngel)));
fAngel += FX_PI * 2 / 5.0f;
}
@@ -216,13 +216,13 @@ void CFWL_CheckBoxTP::SetThemeData() {
m_pThemeData->clrSignNeutralPressed = ArgbEncode(255, 28, 134, 26);
}
-void CFWL_CheckBoxTP::InitCheckPath(FX_FLOAT fCheckLen) {
+void CFWL_CheckBoxTP::InitCheckPath(float fCheckLen) {
if (!m_pCheckPath) {
m_pCheckPath = pdfium::MakeUnique<CFX_Path>();
- FX_FLOAT fWidth = kSignPath;
- FX_FLOAT fHeight = -kSignPath;
- FX_FLOAT fBottom = kSignPath;
+ float fWidth = kSignPath;
+ float fHeight = -kSignPath;
+ float fBottom = kSignPath;
CFX_PointF pt1(fWidth / 15.0f, fBottom + fHeight * 2 / 5.0f);
CFX_PointF pt2(fWidth / 4.5f, fBottom + fHeight / 16.0f);
CFX_PointF pt3(fWidth / 3.0f, fBottom);
@@ -262,7 +262,7 @@ void CFWL_CheckBoxTP::InitCheckPath(FX_FLOAT fCheckLen) {
p2 = CFX_PointF(pt15.x - pt1.x, pt15.y - pt1.y) * FX_BEZIER;
m_pCheckPath->BezierTo(pt5 + p1, pt1 + p2, pt1);
- FX_FLOAT fScale = fCheckLen / kSignPath;
+ float fScale = fCheckLen / kSignPath;
CFX_Matrix mt(1, 0, 0, 1, 0, 0);
mt.Scale(fScale, fScale);
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.h b/xfa/fwl/theme/cfwl_checkboxtp.h
index 979b970b39..1070b12598 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.h
+++ b/xfa/fwl/theme/cfwl_checkboxtp.h
@@ -65,7 +65,7 @@ class CFWL_CheckBoxTP : public CFWL_WidgetTP {
FX_ARGB argbFill,
CFX_Matrix* pMatrix);
- void InitCheckPath(FX_FLOAT fCheckLen);
+ void InitCheckPath(float fCheckLen);
std::unique_ptr<CKBThemeData> m_pThemeData;
std::unique_ptr<CFX_Path> m_pCheckPath;
diff --git a/xfa/fwl/theme/cfwl_edittp.cpp b/xfa/fwl/theme/cfwl_edittp.cpp
index 43160177d7..ebc23bf129 100644
--- a/xfa/fwl/theme/cfwl_edittp.cpp
+++ b/xfa/fwl/theme/cfwl_edittp.cpp
@@ -22,7 +22,7 @@ void CFWL_EditTP::DrawBackground(CFWL_ThemeBackground* pParams) {
if (CFWL_Part::CombTextLine == pParams->m_iPart) {
CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pParams->m_pWidget);
FX_ARGB cr = 0xFF000000;
- FX_FLOAT fWidth = 1.0f;
+ float fWidth = 1.0f;
if (CXFA_Border borderUI = pWidget->GetDataAcc()->GetUIBorder()) {
CXFA_Edge edge = borderUI.GetEdge(0);
if (edge) {
@@ -74,7 +74,7 @@ void CFWL_EditTP::DrawBackground(CFWL_ThemeBackground* pParams) {
}
case CFWL_Part::CombTextLine: {
FX_ARGB cr = 0xFF000000;
- FX_FLOAT fWidth = 1.0f;
+ float fWidth = 1.0f;
CFX_Color crLine(cr);
pParams->m_pGraphics->SetStrokeColor(&crLine);
pParams->m_pGraphics->SetLineWidth(fWidth);
diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.cpp b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
index 56268a8507..6bb34d0657 100644
--- a/xfa/fwl/theme/cfwl_pushbuttontp.cpp
+++ b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
@@ -29,8 +29,8 @@ void CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground* pParams) {
}
case CFWL_Part::Background: {
CFX_RectF& rect = pParams->m_rtPart;
- FX_FLOAT fRight = rect.right();
- FX_FLOAT fBottom = rect.bottom();
+ float fRight = rect.right();
+ float fBottom = rect.bottom();
CFX_Path strokePath;
strokePath.MoveTo(
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp
index 121d4dea34..bab9a3f3be 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.cpp
+++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp
@@ -124,13 +124,13 @@ void CFWL_ScrollBarTP::DrawPaw(CFX_Graphics* pGraphics,
CFX_Matrix* pMatrix) {
CFX_Path path;
if (bVert) {
- FX_FLOAT fPawLen = kPawLength;
+ float fPawLen = kPawLength;
if (pRect->width / 2 <= fPawLen) {
fPawLen = (pRect->width - 6) / 2;
}
- FX_FLOAT fX = pRect->left + pRect->width / 4;
- FX_FLOAT fY = pRect->top + pRect->height / 2;
+ float fX = pRect->left + pRect->width / 4;
+ float fY = pRect->top + pRect->height / 2;
path.MoveTo(CFX_PointF(fX, fY - 4));
path.LineTo(CFX_PointF(fX + fPawLen, fY - 4));
path.MoveTo(CFX_PointF(fX, fY - 2));
@@ -161,13 +161,13 @@ void CFWL_ScrollBarTP::DrawPaw(CFX_Graphics* pGraphics,
pGraphics->SetStrokeColor(&clrDark);
pGraphics->StrokePath(&path, pMatrix);
} else {
- FX_FLOAT fPawLen = kPawLength;
+ float fPawLen = kPawLength;
if (pRect->height / 2 <= fPawLen) {
fPawLen = (pRect->height - 6) / 2;
}
- FX_FLOAT fX = pRect->left + pRect->width / 2;
- FX_FLOAT fY = pRect->top + pRect->height / 4;
+ float fX = pRect->left + pRect->width / 2;
+ float fY = pRect->top + pRect->height / 4;
path.MoveTo(CFX_PointF(fX - 4, fY));
path.LineTo(CFX_PointF(fX - 4, fY + fPawLen));
path.MoveTo(CFX_PointF(fX - 2, fY));
@@ -212,8 +212,8 @@ void CFWL_ScrollBarTP::DrawTrack(CFX_Graphics* pGraphics,
pGraphics->SaveGraphState();
CFX_Color colorLine(ArgbEncode(255, 238, 237, 229));
CFX_Path path;
- FX_FLOAT fRight = pRect->right();
- FX_FLOAT fBottom = pRect->bottom();
+ float fRight = pRect->right();
+ float fBottom = pRect->bottom();
if (bVert) {
path.AddRectangle(pRect->left, pRect->top, 1, pRect->height);
path.AddRectangle(fRight - 1, pRect->top, 1, pRect->height);
@@ -226,10 +226,10 @@ void CFWL_ScrollBarTP::DrawTrack(CFX_Graphics* pGraphics,
path.Clear();
path.AddRectangle(pRect->left + 1, pRect->top, pRect->width - 2,
pRect->height);
- FX_FLOAT x1 = bVert ? pRect->left + 1 : pRect->left;
- FX_FLOAT y1 = bVert ? pRect->top : pRect->top + 1;
- FX_FLOAT x2 = bVert ? fRight - 1 : pRect->left;
- FX_FLOAT y2 = bVert ? pRect->top : fBottom - 1;
+ float x1 = bVert ? pRect->left + 1 : pRect->left;
+ float y1 = bVert ? pRect->top : pRect->top + 1;
+ float x2 = bVert ? fRight - 1 : pRect->left;
+ float y2 = bVert ? pRect->top : fBottom - 1;
pGraphics->RestoreGraphState();
DrawAxialShading(pGraphics, x1, y1, x2, y2, m_pThemeData->clrTrackBKStart,
m_pThemeData->clrTrackBKEnd, &path, FXFILL_WINDING, pMatrix);
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index fbcbcffb85..6ce86fb269 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -138,10 +138,10 @@ void CFWL_WidgetTP::FillSoildRect(CFX_Graphics* pGraphics,
}
void CFWL_WidgetTP::DrawAxialShading(CFX_Graphics* pGraphics,
- FX_FLOAT fx1,
- FX_FLOAT fy1,
- FX_FLOAT fx2,
- FX_FLOAT fy2,
+ float fx1,
+ float fy1,
+ float fx2,
+ float fy2,
FX_ARGB beginColor,
FX_ARGB endColor,
CFX_Path* path,
@@ -170,7 +170,7 @@ void CFWL_WidgetTP::DrawFocus(CFX_Graphics* pGraphics,
pGraphics->SaveGraphState();
CFX_Color cr(0xFF000000);
pGraphics->SetStrokeColor(&cr);
- FX_FLOAT DashPattern[2] = {1, 1};
+ float DashPattern[2] = {1, 1};
pGraphics->SetLineDash(0.0f, DashPattern, 2);
CFX_Path path;
path.AddRectangle(pRect->left, pRect->top, pRect->width, pRect->height);
@@ -185,10 +185,10 @@ void CFWL_WidgetTP::DrawArrow(CFX_Graphics* pGraphics,
CFX_Matrix* pMatrix) {
bool bVert =
(eDict == FWLTHEME_DIRECTION_Up || eDict == FWLTHEME_DIRECTION_Down);
- FX_FLOAT fLeft =
- (FX_FLOAT)(((pRect->width - (bVert ? 9 : 6)) / 2 + pRect->left) + 0.5);
- FX_FLOAT fTop =
- (FX_FLOAT)(((pRect->height - (bVert ? 6 : 9)) / 2 + pRect->top) + 0.5);
+ float fLeft =
+ (float)(((pRect->width - (bVert ? 9 : 6)) / 2 + pRect->left) + 0.5);
+ float fTop =
+ (float)(((pRect->height - (bVert ? 6 : 9)) / 2 + pRect->top) + 0.5);
CFX_Path path;
switch (eDict) {
case FWLTHEME_DIRECTION_Down: {
@@ -240,8 +240,8 @@ void CFWL_WidgetTP::DrawBtn(CFX_Graphics* pGraphics,
CFX_Path path;
InitializeArrowColorData();
- FX_FLOAT fRight = pRect->right();
- FX_FLOAT fBottom = pRect->bottom();
+ float fRight = pRect->right();
+ float fBottom = pRect->bottom();
path.AddRectangle(pRect->left, pRect->top, pRect->width, pRect->height);
DrawAxialShading(pGraphics, pRect->left, pRect->top, fRight, fBottom,
m_pColorData->clrStart[eState - 1],
diff --git a/xfa/fwl/theme/cfwl_widgettp.h b/xfa/fwl/theme/cfwl_widgettp.h
index c81950793a..730a39cd17 100644
--- a/xfa/fwl/theme/cfwl_widgettp.h
+++ b/xfa/fwl/theme/cfwl_widgettp.h
@@ -66,10 +66,10 @@ class CFWL_WidgetTP {
const CFX_RectF* pRect,
CFX_Matrix* pMatrix = nullptr);
void DrawAxialShading(CFX_Graphics* pGraphics,
- FX_FLOAT fx1,
- FX_FLOAT fy1,
- FX_FLOAT fx2,
- FX_FLOAT fy2,
+ float fx1,
+ float fy1,
+ float fx2,
+ float fy2,
FX_ARGB beginColor,
FX_ARGB endColor,
CFX_Path* path,
diff --git a/xfa/fxbarcode/BC_TwoDimWriter.cpp b/xfa/fxbarcode/BC_TwoDimWriter.cpp
index b9aae361d6..328352c6c1 100644
--- a/xfa/fxbarcode/BC_TwoDimWriter.cpp
+++ b/xfa/fxbarcode/BC_TwoDimWriter.cpp
@@ -23,7 +23,7 @@ void CBC_TwoDimWriter::RenderDeviceResult(CFX_RenderDevice* device,
const CFX_Matrix* matrix) {
CFX_GraphStateData stateData;
CFX_PathData path;
- path.AppendRect(0, 0, (FX_FLOAT)m_Width, (FX_FLOAT)m_Height);
+ path.AppendRect(0, 0, (float)m_Width, (float)m_Height);
device->DrawPath(&path, matrix, &stateData, m_backgroundColor,
m_backgroundColor, FXFILL_ALTERNATE);
int32_t leftPos = 0;
@@ -34,17 +34,17 @@ void CBC_TwoDimWriter::RenderDeviceResult(CFX_RenderDevice* device,
}
CFX_Matrix matri = *matrix;
if (m_Width < m_output->GetWidth() && m_Height < m_output->GetHeight()) {
- CFX_Matrix matriScale(
- (FX_FLOAT)m_Width / (FX_FLOAT)m_output->GetWidth(), 0.0, 0.0,
- (FX_FLOAT)m_Height / (FX_FLOAT)m_output->GetHeight(), 0.0, 0.0);
+ CFX_Matrix matriScale((float)m_Width / (float)m_output->GetWidth(), 0.0,
+ 0.0, (float)m_Height / (float)m_output->GetHeight(),
+ 0.0, 0.0);
matriScale.Concat(*matrix);
matri = matriScale;
}
for (int32_t x = 0; x < m_output->GetWidth(); x++) {
for (int32_t y = 0; y < m_output->GetHeight(); y++) {
CFX_PathData rect;
- rect.AppendRect((FX_FLOAT)leftPos + x, (FX_FLOAT)topPos + y,
- (FX_FLOAT)(leftPos + x + 1), (FX_FLOAT)(topPos + y + 1));
+ rect.AppendRect((float)leftPos + x, (float)topPos + y,
+ (float)(leftPos + x + 1), (float)(topPos + y + 1));
if (m_output->Get(x, y)) {
CFX_GraphStateData data;
device->DrawPath(&rect, &matri, &data, m_barColor, 0, FXFILL_WINDING);
@@ -98,7 +98,7 @@ void CBC_TwoDimWriter::RenderResult(uint8_t* code,
int32_t inputHeight = codeHeight;
int32_t tempWidth = inputWidth + 2;
int32_t tempHeight = inputHeight + 2;
- FX_FLOAT moduleHSize = std::min(m_ModuleWidth, m_ModuleHeight);
+ float moduleHSize = std::min(m_ModuleWidth, m_ModuleHeight);
moduleHSize = std::min(moduleHSize, 8.0f);
moduleHSize = std::max(moduleHSize, 1.0f);
pdfium::base::CheckedNumeric<int32_t> scaledWidth = tempWidth;
@@ -115,14 +115,14 @@ void CBC_TwoDimWriter::RenderResult(uint8_t* code,
}
} else {
if (m_Width > outputWidth || m_Height > outputHeight) {
- outputWidth = (int32_t)(outputWidth *
- ceil((FX_FLOAT)m_Width / (FX_FLOAT)outputWidth));
- outputHeight = (int32_t)(
- outputHeight * ceil((FX_FLOAT)m_Height / (FX_FLOAT)outputHeight));
+ outputWidth =
+ (int32_t)(outputWidth * ceil((float)m_Width / (float)outputWidth));
+ outputHeight =
+ (int32_t)(outputHeight * ceil((float)m_Height / (float)outputHeight));
}
}
- int32_t multiX = (int32_t)ceil((FX_FLOAT)outputWidth / (FX_FLOAT)tempWidth);
- int32_t multiY = (int32_t)ceil((FX_FLOAT)outputHeight / (FX_FLOAT)tempHeight);
+ int32_t multiX = (int32_t)ceil((float)outputWidth / (float)tempWidth);
+ int32_t multiY = (int32_t)ceil((float)outputHeight / (float)tempHeight);
if (m_bFixedSize) {
multiX = std::min(multiX, multiY);
multiY = multiX;
diff --git a/xfa/fxbarcode/cbc_onecode.cpp b/xfa/fxbarcode/cbc_onecode.cpp
index 55c2837bd4..cf916402fb 100644
--- a/xfa/fxbarcode/cbc_onecode.cpp
+++ b/xfa/fxbarcode/cbc_onecode.cpp
@@ -62,7 +62,7 @@ bool CBC_OneCode::SetFont(CFX_Font* cFont) {
return false;
}
-void CBC_OneCode::SetFontSize(FX_FLOAT size) {
+void CBC_OneCode::SetFontSize(float size) {
if (m_pBCWriter)
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())->SetFontSize(size);
}
diff --git a/xfa/fxbarcode/cbc_onecode.h b/xfa/fxbarcode/cbc_onecode.h
index e348b4ee2c..ac7eacebfb 100644
--- a/xfa/fxbarcode/cbc_onecode.h
+++ b/xfa/fxbarcode/cbc_onecode.h
@@ -27,7 +27,7 @@ class CBC_OneCode : public CBC_CodeBase {
virtual void SetDataLength(int32_t length);
virtual void SetCalChecksum(bool calc);
virtual bool SetFont(CFX_Font* cFont);
- virtual void SetFontSize(FX_FLOAT size);
+ virtual void SetFontSize(float size);
virtual void SetFontStyle(int32_t style);
virtual void SetFontColor(FX_ARGB color);
};
diff --git a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
index ec6eb02b1c..90877c7ef3 100644
--- a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
@@ -140,7 +140,7 @@ int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg,
if (startpos >= msg.GetLength()) {
return currentMode;
}
- std::vector<FX_FLOAT> charCounts;
+ std::vector<float> charCounts;
if (currentMode == ASCII_ENCODATION) {
charCounts.push_back(0);
charCounts.push_back(1);
@@ -189,12 +189,10 @@ int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg,
if (isDigit(c)) {
charCounts[ASCII_ENCODATION] += 0.5;
} else if (isExtendedASCII(c)) {
- charCounts[ASCII_ENCODATION] =
- (FX_FLOAT)ceil(charCounts[ASCII_ENCODATION]);
+ charCounts[ASCII_ENCODATION] = (float)ceil(charCounts[ASCII_ENCODATION]);
charCounts[ASCII_ENCODATION] += 2;
} else {
- charCounts[ASCII_ENCODATION] =
- (FX_FLOAT)ceil(charCounts[ASCII_ENCODATION]);
+ charCounts[ASCII_ENCODATION] = (float)ceil(charCounts[ASCII_ENCODATION]);
charCounts[ASCII_ENCODATION]++;
}
if (isNativeC40(c)) {
@@ -320,7 +318,7 @@ wchar_t CBC_HighLevelEncoder::randomize253State(wchar_t ch,
: (wchar_t)(tempVariable - 254);
}
int32_t CBC_HighLevelEncoder::findMinimums(
- std::vector<FX_FLOAT>& charCounts,
+ std::vector<float>& charCounts,
CFX_ArrayTemplate<int32_t>& intCharCounts,
int32_t min,
CFX_ArrayTemplate<uint8_t>& mins) {
diff --git a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h
index cfd16ed676..821dedd29f 100644
--- a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h
+++ b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h
@@ -63,7 +63,7 @@ class CBC_HighLevelEncoder : public CBC_SymbolShapeHint {
private:
static wchar_t randomize253State(wchar_t ch, int32_t codewordPosition);
- static int32_t findMinimums(std::vector<FX_FLOAT>& charCounts,
+ static int32_t findMinimums(std::vector<float>& charCounts,
CFX_ArrayTemplate<int32_t>& intCharCounts,
int32_t min,
CFX_ArrayTemplate<uint8_t>& mins);
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
index dd7fcaa864..02ae58dc84 100644
--- a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -71,7 +71,7 @@ bool CBC_OneDimWriter::SetFont(CFX_Font* cFont) {
return true;
}
-void CBC_OneDimWriter::SetFontSize(FX_FLOAT size) {
+void CBC_OneDimWriter::SetFontSize(float size) {
m_fFontSize = size;
}
@@ -151,39 +151,39 @@ int32_t CBC_OneDimWriter::AppendPattern(uint8_t* target,
void CBC_OneDimWriter::CalcTextInfo(const CFX_ByteString& text,
FXTEXT_CHARPOS* charPos,
CFX_Font* cFont,
- FX_FLOAT geWidth,
+ float geWidth,
int32_t fontSize,
- FX_FLOAT& charsLen) {
+ float& charsLen) {
std::unique_ptr<CFX_UnicodeEncodingEx> encoding(
FX_CreateFontEncodingEx(cFont));
int32_t length = text.GetLength();
uint32_t* pCharCode = FX_Alloc(uint32_t, text.GetLength());
- FX_FLOAT charWidth = 0;
+ float charWidth = 0;
for (int32_t j = 0; j < text.GetLength(); j++) {
pCharCode[j] = encoding->CharCodeFromUnicode(text[j]);
int32_t glyp_code = encoding->GlyphFromCharCode(pCharCode[j]);
int32_t glyp_value = cFont->GetGlyphWidth(glyp_code);
- FX_FLOAT temp = (FX_FLOAT)((glyp_value)*fontSize / 1000.0);
+ float temp = (float)((glyp_value)*fontSize / 1000.0);
charWidth += temp;
}
charsLen = charWidth;
- FX_FLOAT leftPositon = (FX_FLOAT)(geWidth - charsLen) / 2.0f;
+ float leftPositon = (float)(geWidth - charsLen) / 2.0f;
if (leftPositon < 0 && geWidth == 0) {
leftPositon = 0;
}
- FX_FLOAT penX = 0.0;
- FX_FLOAT penY =
- (FX_FLOAT)FXSYS_abs(cFont->GetDescent()) * (FX_FLOAT)fontSize / 1000.0f;
- FX_FLOAT left = leftPositon;
- FX_FLOAT top = 0.0;
+ float penX = 0.0;
+ float penY =
+ (float)FXSYS_abs(cFont->GetDescent()) * (float)fontSize / 1000.0f;
+ float left = leftPositon;
+ float top = 0.0;
charPos[0].m_Origin = CFX_PointF(penX + left, penY + top);
charPos[0].m_GlyphIndex = encoding->GlyphFromCharCode(pCharCode[0]);
charPos[0].m_FontCharWidth = cFont->GetGlyphWidth(charPos[0].m_GlyphIndex);
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
charPos[0].m_ExtGID = charPos[0].m_GlyphIndex;
#endif
- penX += (FX_FLOAT)(charPos[0].m_FontCharWidth) * (FX_FLOAT)fontSize / 1000.0f;
+ penX += (float)(charPos[0].m_FontCharWidth) * (float)fontSize / 1000.0f;
for (int32_t i = 1; i < length; i++) {
charPos[i].m_Origin = CFX_PointF(penX + left, penY + top);
charPos[i].m_GlyphIndex = encoding->GlyphFromCharCode(pCharCode[i]);
@@ -191,8 +191,7 @@ void CBC_OneDimWriter::CalcTextInfo(const CFX_ByteString& text,
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
charPos[i].m_ExtGID = charPos[i].m_GlyphIndex;
#endif
- penX +=
- (FX_FLOAT)(charPos[i].m_FontCharWidth) * (FX_FLOAT)fontSize / 1000.0f;
+ penX += (float)(charPos[i].m_FontCharWidth) * (float)fontSize / 1000.0f;
}
FX_Free(pCharCode);
}
@@ -200,37 +199,37 @@ void CBC_OneDimWriter::CalcTextInfo(const CFX_ByteString& text,
void CBC_OneDimWriter::ShowDeviceChars(CFX_RenderDevice* device,
const CFX_Matrix* matrix,
const CFX_ByteString str,
- FX_FLOAT geWidth,
+ float geWidth,
FXTEXT_CHARPOS* pCharPos,
- FX_FLOAT locX,
- FX_FLOAT locY,
+ float locX,
+ float locY,
int32_t barWidth) {
int32_t iFontSize = (int32_t)fabs(m_fFontSize);
int32_t iTextHeight = iFontSize + 1;
- CFX_FloatRect rect((FX_FLOAT)locX, (FX_FLOAT)locY, (FX_FLOAT)(locX + geWidth),
- (FX_FLOAT)(locY + iTextHeight));
+ CFX_FloatRect rect((float)locX, (float)locY, (float)(locX + geWidth),
+ (float)(locY + iTextHeight));
if (geWidth != m_Width) {
rect.right -= 1;
}
matrix->TransformRect(rect);
FX_RECT re = rect.GetOuterRect();
device->FillRect(&re, m_backgroundColor);
- CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, (FX_FLOAT)locX,
- (FX_FLOAT)(locY + iFontSize));
+ CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, (float)locX,
+ (float)(locY + iFontSize));
if (matrix) {
affine_matrix.Concat(*matrix);
}
device->DrawNormalText(str.GetLength(), pCharPos, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix,
+ static_cast<float>(iFontSize), &affine_matrix,
m_fontColor, FXTEXT_CLEARTYPE);
}
void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap* pOutBitmap,
const CFX_ByteString str,
- FX_FLOAT geWidth,
+ float geWidth,
FXTEXT_CHARPOS* pCharPos,
- FX_FLOAT locX,
- FX_FLOAT locY,
+ float locX,
+ float locY,
int32_t barWidth) {
int32_t iFontSize = (int32_t)fabs(m_fFontSize);
int32_t iTextHeight = iFontSize + 1;
@@ -239,10 +238,10 @@ void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap* pOutBitmap,
FX_RECT geRect(0, 0, (int)geWidth, iTextHeight);
ge.FillRect(&geRect, m_backgroundColor);
CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0,
- static_cast<FX_FLOAT>(iFontSize));
+ static_cast<float>(iFontSize));
ge.DrawNormalText(str.GetLength(), pCharPos, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix,
- m_fontColor, FXTEXT_CLEARTYPE);
+ static_cast<float>(iFontSize), &affine_matrix, m_fontColor,
+ FXTEXT_CLEARTYPE);
CFX_FxgeDevice geBitmap;
geBitmap.Attach(pOutBitmap, false, nullptr, false);
geBitmap.SetDIBits(ge.GetBitmap(), (int)locX, (int)locY);
@@ -267,14 +266,14 @@ void CBC_OneDimWriter::ShowChars(const CFX_WideStringC& contents,
int32_t iLen = str.GetLength();
FXTEXT_CHARPOS* pCharPos = FX_Alloc(FXTEXT_CHARPOS, iLen);
FXSYS_memset(pCharPos, 0, sizeof(FXTEXT_CHARPOS) * iLen);
- FX_FLOAT charsLen = 0;
- FX_FLOAT geWidth = 0;
+ float charsLen = 0;
+ float geWidth = 0;
if (m_locTextLoc == BC_TEXT_LOC_ABOVEEMBED ||
m_locTextLoc == BC_TEXT_LOC_BELOWEMBED) {
geWidth = 0;
} else if (m_locTextLoc == BC_TEXT_LOC_ABOVE ||
m_locTextLoc == BC_TEXT_LOC_BELOW) {
- geWidth = (FX_FLOAT)barWidth;
+ geWidth = (float)barWidth;
}
int32_t iFontSize = (int32_t)fabs(m_fFontSize);
int32_t iTextHeight = iFontSize + 1;
@@ -293,7 +292,7 @@ void CBC_OneDimWriter::ShowChars(const CFX_WideStringC& contents,
case BC_TEXT_LOC_ABOVE:
locX = 0;
locY = 0;
- geWidth = (FX_FLOAT)barWidth;
+ geWidth = (float)barWidth;
break;
case BC_TEXT_LOC_BELOWEMBED:
locX = (int32_t)(barWidth - charsLen) / 2;
@@ -304,15 +303,15 @@ void CBC_OneDimWriter::ShowChars(const CFX_WideStringC& contents,
default:
locX = 0;
locY = m_Height - iTextHeight;
- geWidth = (FX_FLOAT)barWidth;
+ geWidth = (float)barWidth;
break;
}
if (device) {
- ShowDeviceChars(device, matrix, str, geWidth, pCharPos, (FX_FLOAT)locX,
- (FX_FLOAT)locY, barWidth);
+ ShowDeviceChars(device, matrix, str, geWidth, pCharPos, (float)locX,
+ (float)locY, barWidth);
} else {
- ShowBitmapChars(pOutBitmap, str, geWidth, pCharPos, (FX_FLOAT)locX,
- (FX_FLOAT)locY, barWidth);
+ ShowBitmapChars(pOutBitmap, str, geWidth, pCharPos, (float)locX,
+ (float)locY, barWidth);
}
FX_Free(pCharPos);
}
@@ -364,16 +363,15 @@ void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device,
CFX_GraphStateData stateData;
CFX_PathData path;
- path.AppendRect(0, 0, (FX_FLOAT)m_Width, (FX_FLOAT)m_Height);
+ path.AppendRect(0, 0, (float)m_Width, (float)m_Height);
device->DrawPath(&path, matrix, &stateData, m_backgroundColor,
m_backgroundColor, FXFILL_ALTERNATE);
- CFX_Matrix matri(m_outputHScale, 0.0, 0.0, (FX_FLOAT)m_Height, 0.0, 0.0);
+ CFX_Matrix matri(m_outputHScale, 0.0, 0.0, (float)m_Height, 0.0, 0.0);
matri.Concat(*matrix);
for (int32_t x = 0; x < m_output->GetWidth(); x++) {
for (int32_t y = 0; y < m_output->GetHeight(); y++) {
CFX_PathData rect;
- rect.AppendRect((FX_FLOAT)x, (FX_FLOAT)y, (FX_FLOAT)(x + 1),
- (FX_FLOAT)(y + 1));
+ rect.AppendRect((float)x, (float)y, (float)(x + 1), (float)(y + 1));
if (m_output->Get(x, y)) {
CFX_GraphStateData data;
device->DrawPath(&rect, &matri, &data, m_barColor, 0, FXFILL_WINDING);
@@ -417,18 +415,18 @@ void CBC_OneDimWriter::RenderResult(const CFX_WideStringC& contents,
codeLength += rightPadding;
m_outputHScale = 1.0;
if (m_Width > 0) {
- m_outputHScale = (FX_FLOAT)m_Width / (FX_FLOAT)codeLength;
+ m_outputHScale = (float)m_Width / (float)codeLength;
}
if (!isDevice) {
m_outputHScale =
- std::max(m_outputHScale, static_cast<FX_FLOAT>(m_ModuleWidth));
+ std::max(m_outputHScale, static_cast<float>(m_ModuleWidth));
}
- FX_FLOAT dataLengthScale = 1.0;
+ float dataLengthScale = 1.0;
if (m_iDataLenth > 0 && contents.GetLength() != 0) {
- dataLengthScale = FX_FLOAT(contents.GetLength()) / FX_FLOAT(m_iDataLenth);
+ dataLengthScale = float(contents.GetLength()) / float(m_iDataLenth);
}
if (m_iDataLenth > 0 && contents.GetLength() == 0) {
- dataLengthScale = FX_FLOAT(1) / FX_FLOAT(m_iDataLenth);
+ dataLengthScale = float(1) / float(m_iDataLenth);
}
m_multiple = 1;
if (!isDevice) {
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.h b/xfa/fxbarcode/oned/BC_OneDimWriter.h
index b7c5cebe06..b2447cffb7 100644
--- a/xfa/fxbarcode/oned/BC_OneDimWriter.h
+++ b/xfa/fxbarcode/oned/BC_OneDimWriter.h
@@ -55,7 +55,7 @@ class CBC_OneDimWriter : public CBC_Writer {
virtual void SetPrintChecksum(bool checksum);
virtual void SetDataLength(int32_t length);
virtual void SetCalcChecksum(bool state);
- virtual void SetFontSize(FX_FLOAT size);
+ virtual void SetFontSize(float size);
virtual void SetFontStyle(int32_t style);
virtual void SetFontColor(FX_ARGB color);
bool SetFont(CFX_Font* cFont);
@@ -64,9 +64,9 @@ class CBC_OneDimWriter : public CBC_Writer {
virtual void CalcTextInfo(const CFX_ByteString& text,
FXTEXT_CHARPOS* charPos,
CFX_Font* cFont,
- FX_FLOAT geWidth,
+ float geWidth,
int32_t fontSize,
- FX_FLOAT& charsLen);
+ float& charsLen);
virtual void ShowChars(const CFX_WideStringC& contents,
CFX_DIBitmap* pOutBitmap,
CFX_RenderDevice* device,
@@ -76,18 +76,18 @@ class CBC_OneDimWriter : public CBC_Writer {
int32_t& e);
virtual void ShowBitmapChars(CFX_DIBitmap* pOutBitmap,
const CFX_ByteString str,
- FX_FLOAT geWidth,
+ float geWidth,
FXTEXT_CHARPOS* pCharPos,
- FX_FLOAT locX,
- FX_FLOAT locY,
+ float locX,
+ float locY,
int32_t barWidth);
virtual void ShowDeviceChars(CFX_RenderDevice* device,
const CFX_Matrix* matrix,
const CFX_ByteString str,
- FX_FLOAT geWidth,
+ float geWidth,
FXTEXT_CHARPOS* pCharPos,
- FX_FLOAT locX,
- FX_FLOAT locY,
+ float locX,
+ float locY,
int32_t barWidth);
virtual int32_t AppendPattern(uint8_t* target,
int32_t pos,
@@ -102,7 +102,7 @@ class CBC_OneDimWriter : public CBC_Writer {
int32_t m_iDataLenth;
bool m_bCalcChecksum;
CFX_Font* m_pFont;
- FX_FLOAT m_fFontSize;
+ float m_fFontSize;
int32_t m_iFontStyle;
uint32_t m_fontColor;
BC_TEXT_LOC m_locTextLoc;
@@ -112,7 +112,7 @@ class CBC_OneDimWriter : public CBC_Writer {
std::unique_ptr<CBC_CommonBitMatrix> m_output;
int32_t m_barWidth;
int32_t m_multiple;
- FX_FLOAT m_outputHScale;
+ float m_outputHScale;
};
#endif // XFA_FXBARCODE_ONED_BC_ONEDIMWRITER_H_
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
index 47e47eaddb..555b58643d 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
@@ -194,18 +194,16 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
int32_t strWidth = multiple * 42;
if (!pOutBitmap) {
CFX_Matrix matr(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0);
- CFX_FloatRect rect(
- (FX_FLOAT)leftPosition, (FX_FLOAT)(m_Height - iTextHeight),
- (FX_FLOAT)(leftPosition + strWidth - 0.5), (FX_FLOAT)m_Height);
+ CFX_FloatRect rect((float)leftPosition, (float)(m_Height - iTextHeight),
+ (float)(leftPosition + strWidth - 0.5), (float)m_Height);
matr.Concat(*matrix);
matr.TransformRect(rect);
FX_RECT re = rect.GetOuterRect();
device->FillRect(&re, m_backgroundColor);
- CFX_FloatRect rect1(
- (FX_FLOAT)(leftPosition + 47 * multiple),
- (FX_FLOAT)(m_Height - iTextHeight),
- (FX_FLOAT)(leftPosition + 47 * multiple + strWidth - 0.5),
- (FX_FLOAT)m_Height);
+ CFX_FloatRect rect1((float)(leftPosition + 47 * multiple),
+ (float)(m_Height - iTextHeight),
+ (float)(leftPosition + 47 * multiple + strWidth - 0.5),
+ (float)m_Height);
CFX_Matrix matr1(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0);
matr1.Concat(*matrix);
matr1.TransformRect(rect1);
@@ -213,63 +211,63 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
device->FillRect(&re, m_backgroundColor);
int32_t strWidth1 = multiple * 7;
CFX_Matrix matr2(m_outputHScale, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f);
- CFX_FloatRect rect2(0.0f, (FX_FLOAT)(m_Height - iTextHeight),
- (FX_FLOAT)strWidth1 - 0.5f, (FX_FLOAT)m_Height);
+ CFX_FloatRect rect2(0.0f, (float)(m_Height - iTextHeight),
+ (float)strWidth1 - 0.5f, (float)m_Height);
matr2.Concat(*matrix);
matr2.TransformRect(rect2);
re = rect2.GetOuterRect();
device->FillRect(&re, m_backgroundColor);
}
- FX_FLOAT blank = 0.0;
+ float blank = 0.0;
iLen = tempStr.GetLength();
if (!pOutBitmap) {
strWidth = (int32_t)(strWidth * m_outputHScale);
}
- CalcTextInfo(tempStr, pCharPos + 1, m_pFont, (FX_FLOAT)strWidth, iFontSize,
+ CalcTextInfo(tempStr, pCharPos + 1, m_pFont, (float)strWidth, iFontSize,
blank);
- CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
+ CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (float)iFontSize);
CFX_FxgeDevice ge;
if (pOutBitmap) {
ge.Create(strWidth, iTextHeight, FXDIB_Argb, nullptr);
FX_RECT rect(0, 0, strWidth, iTextHeight);
ge.FillRect(&rect, m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos + 1, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix,
+ static_cast<float>(iFontSize), &affine_matrix,
m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition, m_Height - iTextHeight);
} else {
CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0,
- (FX_FLOAT)leftPosition * m_outputHScale,
- (FX_FLOAT)(m_Height - iTextHeight) + iFontSize);
+ (float)leftPosition * m_outputHScale,
+ (float)(m_Height - iTextHeight) + iFontSize);
if (matrix) {
affine_matrix1.Concat(*matrix);
}
device->DrawNormalText(iLen, pCharPos + 1, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix1,
+ static_cast<float>(iFontSize), &affine_matrix1,
m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(7, 6);
iLen = tempStr.GetLength();
- CalcTextInfo(tempStr, pCharPos + 7, m_pFont, (FX_FLOAT)strWidth, iFontSize,
+ CalcTextInfo(tempStr, pCharPos + 7, m_pFont, (float)strWidth, iFontSize,
blank);
if (pOutBitmap) {
FX_RECT rect1(0, 0, strWidth, iTextHeight);
ge.FillRect(&rect1, m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos + 7, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix,
+ static_cast<float>(iFontSize), &affine_matrix,
m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition + 47 * multiple,
m_Height - iTextHeight);
} else {
CFX_Matrix affine_matrix1(
1.0, 0.0, 0.0, -1.0,
- (FX_FLOAT)(leftPosition + 47 * multiple) * m_outputHScale,
- (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
+ (float)(leftPosition + 47 * multiple) * m_outputHScale,
+ (float)(m_Height - iTextHeight + iFontSize));
if (matrix) {
affine_matrix1.Concat(*matrix);
}
device->DrawNormalText(iLen, pCharPos + 7, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix1,
+ static_cast<float>(iFontSize), &affine_matrix1,
m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(0, 1);
@@ -278,23 +276,22 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
if (!pOutBitmap)
strWidth = (int32_t)(strWidth * m_outputHScale);
- CalcTextInfo(tempStr, pCharPos, m_pFont, (FX_FLOAT)strWidth, iFontSize,
- blank);
+ CalcTextInfo(tempStr, pCharPos, m_pFont, (float)strWidth, iFontSize, blank);
if (pOutBitmap) {
delete ge.GetBitmap();
ge.Create(strWidth, iTextHeight, FXDIB_Argb, nullptr);
ge.GetBitmap()->Clear(m_backgroundColor);
- ge.DrawNormalText(iLen, pCharPos, m_pFont, static_cast<FX_FLOAT>(iFontSize),
+ ge.DrawNormalText(iLen, pCharPos, m_pFont, static_cast<float>(iFontSize),
&affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), 0, m_Height - iTextHeight);
} else {
CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0, 0.0,
- (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
+ (float)(m_Height - iTextHeight + iFontSize));
if (matrix) {
affine_matrix1.Concat(*matrix);
}
device->DrawNormalText(iLen, pCharPos, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix1,
+ static_cast<float>(iFontSize), &affine_matrix1,
m_fontColor, FXTEXT_CLEARTYPE);
}
FX_Free(pCharPos);
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
index cd21759a19..5f571c2a30 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
@@ -185,7 +185,7 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents,
CFX_ByteString tempStr = str.Mid(0, 4);
int32_t iLen = tempStr.GetLength();
int32_t strWidth = 7 * multiple * 4;
- FX_FLOAT blank = 0.0;
+ float blank = 0.0;
CFX_FxgeDevice geBitmap;
if (pOutBitmap)
geBitmap.Attach(pOutBitmap, false, nullptr, false);
@@ -194,19 +194,17 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents,
int32_t iTextHeight = iFontSize + 1;
if (!pOutBitmap) {
CFX_Matrix matr(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0);
- CFX_FloatRect rect(
- (FX_FLOAT)leftPosition, (FX_FLOAT)(m_Height - iTextHeight),
- (FX_FLOAT)(leftPosition + strWidth - 0.5), (FX_FLOAT)m_Height);
+ CFX_FloatRect rect((float)leftPosition, (float)(m_Height - iTextHeight),
+ (float)(leftPosition + strWidth - 0.5), (float)m_Height);
matr.Concat(*matrix);
matr.TransformRect(rect);
FX_RECT re = rect.GetOuterRect();
device->FillRect(&re, m_backgroundColor);
CFX_Matrix matr1(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0);
- CFX_FloatRect rect1(
- (FX_FLOAT)(leftPosition + 33 * multiple),
- (FX_FLOAT)(m_Height - iTextHeight),
- (FX_FLOAT)(leftPosition + 33 * multiple + strWidth - 0.5),
- (FX_FLOAT)m_Height);
+ CFX_FloatRect rect1((float)(leftPosition + 33 * multiple),
+ (float)(m_Height - iTextHeight),
+ (float)(leftPosition + 33 * multiple + strWidth - 0.5),
+ (float)m_Height);
matr1.Concat(*matrix);
matr1.TransformRect(rect1);
re = rect1.GetOuterRect();
@@ -215,49 +213,48 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents,
if (!pOutBitmap)
strWidth = (int32_t)(strWidth * m_outputHScale);
- CalcTextInfo(tempStr, pCharPos, m_pFont, (FX_FLOAT)strWidth, iFontSize,
- blank);
- CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
+ CalcTextInfo(tempStr, pCharPos, m_pFont, (float)strWidth, iFontSize, blank);
+ CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (float)iFontSize);
CFX_FxgeDevice ge;
if (pOutBitmap) {
delete ge.GetBitmap();
ge.Create(strWidth, iTextHeight, FXDIB_Argb, nullptr);
ge.GetBitmap()->Clear(m_backgroundColor);
- ge.DrawNormalText(iLen, pCharPos, m_pFont, static_cast<FX_FLOAT>(iFontSize),
+ ge.DrawNormalText(iLen, pCharPos, m_pFont, static_cast<float>(iFontSize),
&affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition, m_Height - iTextHeight);
} else {
CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0,
- (FX_FLOAT)leftPosition * m_outputHScale,
- (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
+ (float)leftPosition * m_outputHScale,
+ (float)(m_Height - iTextHeight + iFontSize));
affine_matrix1.Concat(*matrix);
device->DrawNormalText(iLen, pCharPos, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix1,
+ static_cast<float>(iFontSize), &affine_matrix1,
m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(4, 4);
iLen = tempStr.GetLength();
- CalcTextInfo(tempStr, pCharPos + 4, m_pFont, (FX_FLOAT)strWidth, iFontSize,
+ CalcTextInfo(tempStr, pCharPos + 4, m_pFont, (float)strWidth, iFontSize,
blank);
if (pOutBitmap) {
delete ge.GetBitmap();
ge.Create(strWidth, iTextHeight, FXDIB_Argb, nullptr);
ge.GetBitmap()->Clear(m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos + 4, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix,
+ static_cast<float>(iFontSize), &affine_matrix,
m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition + 33 * multiple,
m_Height - iTextHeight);
} else {
CFX_Matrix affine_matrix1(
1.0, 0.0, 0.0, -1.0,
- (FX_FLOAT)(leftPosition + 33 * multiple) * m_outputHScale,
- (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
+ (float)(leftPosition + 33 * multiple) * m_outputHScale,
+ (float)(m_Height - iTextHeight + iFontSize));
if (matrix) {
affine_matrix1.Concat(*matrix);
}
device->DrawNormalText(iLen, pCharPos + 4, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix1,
+ static_cast<float>(iFontSize), &affine_matrix1,
m_fontColor, FXTEXT_CLEARTYPE);
}
FX_Free(pCharPos);
diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
index 3cb72f204a..cefae97d8d 100644
--- a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
@@ -136,8 +136,8 @@ void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents,
FXTEXT_CHARPOS* pCharPos = FX_Alloc(FXTEXT_CHARPOS, iLen);
FXSYS_memset(pCharPos, 0, sizeof(FXTEXT_CHARPOS) * iLen);
CFX_ByteString tempStr = str.Mid(1, 5);
- FX_FLOAT strWidth = (FX_FLOAT)35 * multiple;
- FX_FLOAT blank = 0.0;
+ float strWidth = (float)35 * multiple;
+ float blank = 0.0;
CFX_FxgeDevice geBitmap;
if (pOutBitmap)
geBitmap.Attach(pOutBitmap, false, nullptr, false);
@@ -147,37 +147,34 @@ void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents,
int32_t iTextHeight = iFontSize + 1;
if (!pOutBitmap) {
CFX_Matrix matr(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0);
- CFX_FloatRect rect(
- (FX_FLOAT)leftPosition, (FX_FLOAT)(m_Height - iTextHeight),
- (FX_FLOAT)(leftPosition + strWidth - 0.5), (FX_FLOAT)m_Height);
+ CFX_FloatRect rect((float)leftPosition, (float)(m_Height - iTextHeight),
+ (float)(leftPosition + strWidth - 0.5), (float)m_Height);
matr.Concat(*matrix);
matr.TransformRect(rect);
FX_RECT re = rect.GetOuterRect();
device->FillRect(&re, m_backgroundColor);
CFX_Matrix matr1(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0);
CFX_FloatRect rect1(
- (FX_FLOAT)(leftPosition + 40 * multiple),
- (FX_FLOAT)(m_Height - iTextHeight),
- (FX_FLOAT)((leftPosition + 40 * multiple) + strWidth - 0.5),
- (FX_FLOAT)m_Height);
+ (float)(leftPosition + 40 * multiple), (float)(m_Height - iTextHeight),
+ (float)((leftPosition + 40 * multiple) + strWidth - 0.5),
+ (float)m_Height);
matr1.Concat(*matrix);
matr1.TransformRect(rect1);
re = rect1.GetOuterRect();
device->FillRect(&re, m_backgroundColor);
- FX_FLOAT strWidth1 = (FX_FLOAT)multiple * 7;
+ float strWidth1 = (float)multiple * 7;
CFX_Matrix matr2(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0);
- CFX_FloatRect rect2(0.0, (FX_FLOAT)(m_Height - iTextHeight),
- (FX_FLOAT)strWidth1 - 1, (FX_FLOAT)m_Height);
+ CFX_FloatRect rect2(0.0, (float)(m_Height - iTextHeight),
+ (float)strWidth1 - 1, (float)m_Height);
matr2.Concat(*matrix);
matr2.TransformRect(rect2);
re = rect2.GetOuterRect();
device->FillRect(&re, m_backgroundColor);
CFX_Matrix matr3(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0);
CFX_FloatRect rect3(
- (FX_FLOAT)(leftPosition + 85 * multiple),
- (FX_FLOAT)(m_Height - iTextHeight),
- (FX_FLOAT)((leftPosition + 85 * multiple) + strWidth1 - 0.5),
- (FX_FLOAT)m_Height);
+ (float)(leftPosition + 85 * multiple), (float)(m_Height - iTextHeight),
+ (float)((leftPosition + 85 * multiple) + strWidth1 - 0.5),
+ (float)m_Height);
matr3.Concat(*matrix);
matr3.TransformRect(rect3);
re = rect3.GetOuterRect();
@@ -187,24 +184,24 @@ void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents,
strWidth = strWidth * m_outputHScale;
CalcTextInfo(tempStr, pCharPos + 1, m_pFont, strWidth, iFontSize, blank);
- CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
+ CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (float)iFontSize);
CFX_FxgeDevice ge;
if (pOutBitmap) {
ge.Create((int)strWidth, iTextHeight, FXDIB_Argb, nullptr);
ge.GetBitmap()->Clear(m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos + 1, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix,
+ static_cast<float>(iFontSize), &affine_matrix,
m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition, m_Height - iTextHeight);
} else {
CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0,
- (FX_FLOAT)leftPosition * m_outputHScale,
- (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
+ (float)leftPosition * m_outputHScale,
+ (float)(m_Height - iTextHeight + iFontSize));
if (matrix) {
affine_matrix1.Concat(*matrix);
}
device->DrawNormalText(iLen, pCharPos + 1, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix1,
+ static_cast<float>(iFontSize), &affine_matrix1,
m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(6, 5);
@@ -214,25 +211,25 @@ void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents,
FX_RECT rect2(0, 0, (int)strWidth, iTextHeight);
ge.FillRect(&rect2, m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos + 6, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix,
+ static_cast<float>(iFontSize), &affine_matrix,
m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition + 40 * multiple,
m_Height - iTextHeight);
} else {
CFX_Matrix affine_matrix1(
1.0, 0.0, 0.0, -1.0,
- (FX_FLOAT)(leftPosition + 40 * multiple) * m_outputHScale,
- (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
+ (float)(leftPosition + 40 * multiple) * m_outputHScale,
+ (float)(m_Height - iTextHeight + iFontSize));
if (matrix) {
affine_matrix1.Concat(*matrix);
}
device->DrawNormalText(iLen, pCharPos + 6, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix1,
+ static_cast<float>(iFontSize), &affine_matrix1,
m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(0, 1);
iLen = tempStr.GetLength();
- strWidth = (FX_FLOAT)multiple * 7;
+ strWidth = (float)multiple * 7;
if (!pOutBitmap)
strWidth = strWidth * m_outputHScale;
@@ -241,17 +238,17 @@ void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents,
delete ge.GetBitmap();
ge.Create((int)strWidth, iTextHeight, FXDIB_Argb, nullptr);
ge.GetBitmap()->Clear(m_backgroundColor);
- ge.DrawNormalText(iLen, pCharPos, m_pFont, static_cast<FX_FLOAT>(iFontSize),
+ ge.DrawNormalText(iLen, pCharPos, m_pFont, static_cast<float>(iFontSize),
&affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), 0, m_Height - iTextHeight);
} else {
CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0, 0,
- (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
+ (float)(m_Height - iTextHeight + iFontSize));
if (matrix) {
affine_matrix1.Concat(*matrix);
}
device->DrawNormalText(iLen, pCharPos, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix1,
+ static_cast<float>(iFontSize), &affine_matrix1,
m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(11, 1);
@@ -262,20 +259,20 @@ void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents,
ge.Create((int)strWidth, iTextHeight, FXDIB_Argb, nullptr);
ge.GetBitmap()->Clear(m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos + 11, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix,
+ static_cast<float>(iFontSize), &affine_matrix,
m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition + 85 * multiple,
m_Height - iTextHeight);
} else {
CFX_Matrix affine_matrix1(
1.0, 0.0, 0.0, -1.0,
- (FX_FLOAT)(leftPosition + 85 * multiple) * m_outputHScale,
- (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
+ (float)(leftPosition + 85 * multiple) * m_outputHScale,
+ (float)(m_Height - iTextHeight + iFontSize));
if (matrix) {
affine_matrix1.Concat(*matrix);
}
device->DrawNormalText(iLen, pCharPos + 11, m_pFont,
- static_cast<FX_FLOAT>(iFontSize), &affine_matrix1,
+ static_cast<float>(iFontSize), &affine_matrix1,
m_fontColor, FXTEXT_CLEARTYPE);
}
FX_Free(pCharPos);
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.cpp b/xfa/fxbarcode/pdf417/BC_PDF417.cpp
index 94c65b8538..f7aad69953 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417.cpp
@@ -540,7 +540,7 @@ CFX_ArrayTemplate<int32_t>* CBC_PDF417::determineDimensions(
int32_t sourceCodeWords,
int32_t errorCorrectionCodeWords,
int32_t& e) {
- FX_FLOAT ratio = 0.0f;
+ float ratio = 0.0f;
CFX_ArrayTemplate<int32_t>* dimension = nullptr;
for (int32_t cols = m_minCols; cols <= m_maxCols; cols++) {
int32_t rows =
@@ -551,7 +551,7 @@ CFX_ArrayTemplate<int32_t>* CBC_PDF417::determineDimensions(
if (rows > m_maxRows) {
continue;
}
- FX_FLOAT newRatio =
+ float newRatio =
((17 * cols + 69) * DEFAULT_MODULE_WIDTH) / (rows * HEIGHT);
if (dimension &&
fabsf(newRatio - PREFERRED_RATIO) > fabsf(ratio - PREFERRED_RATIO)) {
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.h b/xfa/fxbarcode/pdf417/BC_PDF417.h
index 3ba5aa2f0c..b382e5d26e 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417.h
+++ b/xfa/fxbarcode/pdf417/BC_PDF417.h
@@ -36,9 +36,9 @@ class CBC_PDF417 {
static const int32_t START_PATTERN = 0x1fea8;
static const int32_t STOP_PATTERN = 0x3fa29;
static const int32_t CODEWORD_TABLE[][929];
- static constexpr FX_FLOAT PREFERRED_RATIO = 3.0f;
- static constexpr FX_FLOAT DEFAULT_MODULE_WIDTH = 0.357f;
- static constexpr FX_FLOAT HEIGHT = 2.0f;
+ static constexpr float PREFERRED_RATIO = 3.0f;
+ static constexpr float DEFAULT_MODULE_WIDTH = 0.357f;
+ static constexpr float HEIGHT = 2.0f;
static int32_t calculateNumberOfRows(int32_t m, int32_t k, int32_t c);
static int32_t getNumberOfPadCodewords(int32_t m,
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;
diff --git a/xfa/fxgraphics/cfx_graphics.cpp b/xfa/fxgraphics/cfx_graphics.cpp
index d2f2151d91..48d8f6f80f 100644
--- a/xfa/fxgraphics/cfx_graphics.cpp
+++ b/xfa/fxgraphics/cfx_graphics.cpp
@@ -134,15 +134,15 @@ void CFX_Graphics::SetLineCap(CFX_GraphStateData::LineCap lineCap) {
}
}
-void CFX_Graphics::SetLineDash(FX_FLOAT dashPhase,
- FX_FLOAT* dashArray,
+void CFX_Graphics::SetLineDash(float dashPhase,
+ float* dashArray,
int32_t dashCount) {
if (dashCount > 0 && !dashArray)
return;
dashCount = dashCount < 0 ? 0 : dashCount;
if (m_type == FX_CONTEXT_Device && m_renderDevice) {
- FX_FLOAT scale = 1.0;
+ float scale = 1.0;
if (m_info.isActOnDash) {
scale = m_info.graphState.m_LineWidth;
}
@@ -159,7 +159,7 @@ void CFX_Graphics::SetLineDash(FX_DashStyle dashStyle) {
RenderDeviceSetLineDash(dashStyle);
}
-void CFX_Graphics::SetLineWidth(FX_FLOAT lineWidth, bool isActOnDash) {
+void CFX_Graphics::SetLineWidth(float lineWidth, bool isActOnDash) {
if (m_type == FX_CONTEXT_Device && m_renderDevice) {
m_info.graphState.m_LineWidth = lineWidth;
m_info.isActOnDash = isActOnDash;
@@ -226,7 +226,7 @@ CFX_RectF CFX_Graphics::GetClipRect() const {
return CFX_RectF();
FX_RECT r = m_renderDevice->GetClipBox();
- return CFX_Rect(r.left, r.top, r.Width(), r.Height()).As<FX_FLOAT>();
+ return CFX_Rect(r.left, r.top, r.Width(), r.Height()).As<float>();
}
void CFX_Graphics::SetClipRect(const CFX_RectF& rect) {
@@ -248,22 +248,22 @@ void CFX_Graphics::RenderDeviceSetLineDash(FX_DashStyle dashStyle) {
return;
}
case FX_DASHSTYLE_Dash: {
- FX_FLOAT dashArray[] = {3, 1};
+ float dashArray[] = {3, 1};
SetLineDash(0, dashArray, 2);
return;
}
case FX_DASHSTYLE_Dot: {
- FX_FLOAT dashArray[] = {1, 1};
+ float dashArray[] = {1, 1};
SetLineDash(0, dashArray, 2);
return;
}
case FX_DASHSTYLE_DashDot: {
- FX_FLOAT dashArray[] = {3, 1, 1, 1};
+ float dashArray[] = {3, 1, 1, 1};
SetLineDash(0, dashArray, 4);
return;
}
case FX_DASHSTYLE_DashDotDot: {
- FX_FLOAT dashArray[] = {4, 1, 2, 1, 2, 1};
+ float dashArray[] = {4, 1, 2, 1, 2, 1};
SetLineDash(0, dashArray, 6);
return;
}
@@ -388,10 +388,10 @@ void CFX_Graphics::FillPathWithShading(CFX_Path* path,
CFX_DIBitmap* bitmap = m_renderDevice->GetBitmap();
int32_t width = bitmap->GetWidth();
int32_t height = bitmap->GetHeight();
- FX_FLOAT start_x = m_info.fillColor->m_shading->m_beginPoint.x;
- FX_FLOAT start_y = m_info.fillColor->m_shading->m_beginPoint.y;
- FX_FLOAT end_x = m_info.fillColor->m_shading->m_endPoint.x;
- FX_FLOAT end_y = m_info.fillColor->m_shading->m_endPoint.y;
+ float start_x = m_info.fillColor->m_shading->m_beginPoint.x;
+ float start_y = m_info.fillColor->m_shading->m_beginPoint.y;
+ float end_x = m_info.fillColor->m_shading->m_endPoint.x;
+ float end_y = m_info.fillColor->m_shading->m_endPoint.y;
CFX_DIBitmap bmp;
bmp.Create(width, height, FXDIB_Argb);
m_renderDevice->GetDIBits(&bmp, 0, 0);
@@ -399,17 +399,16 @@ void CFX_Graphics::FillPathWithShading(CFX_Path* path,
bool result = false;
switch (m_info.fillColor->m_shading->m_type) {
case FX_SHADING_Axial: {
- FX_FLOAT x_span = end_x - start_x;
- FX_FLOAT y_span = end_y - start_y;
- FX_FLOAT axis_len_square = (x_span * x_span) + (y_span * y_span);
+ float x_span = end_x - start_x;
+ float y_span = end_y - start_y;
+ float axis_len_square = (x_span * x_span) + (y_span * y_span);
for (int32_t row = 0; row < height; row++) {
uint32_t* dib_buf = (uint32_t*)(bmp.GetBuffer() + row * pitch);
for (int32_t column = 0; column < width; column++) {
- FX_FLOAT x = (FX_FLOAT)(column);
- FX_FLOAT y = (FX_FLOAT)(row);
- FX_FLOAT scale =
- (((x - start_x) * x_span) + ((y - start_y) * y_span)) /
- axis_len_square;
+ float x = (float)(column);
+ float y = (float)(row);
+ float scale = (((x - start_x) * x_span) + ((y - start_y) * y_span)) /
+ axis_len_square;
if (scale < 0) {
if (!m_info.fillColor->m_shading->m_isExtendedBegin) {
continue;
@@ -429,31 +428,31 @@ void CFX_Graphics::FillPathWithShading(CFX_Path* path,
break;
}
case FX_SHADING_Radial: {
- FX_FLOAT start_r = m_info.fillColor->m_shading->m_beginRadius;
- FX_FLOAT end_r = m_info.fillColor->m_shading->m_endRadius;
- FX_FLOAT a = ((start_x - end_x) * (start_x - end_x)) +
- ((start_y - end_y) * (start_y - end_y)) -
- ((start_r - end_r) * (start_r - end_r));
+ float start_r = m_info.fillColor->m_shading->m_beginRadius;
+ float end_r = m_info.fillColor->m_shading->m_endRadius;
+ float a = ((start_x - end_x) * (start_x - end_x)) +
+ ((start_y - end_y) * (start_y - end_y)) -
+ ((start_r - end_r) * (start_r - end_r));
for (int32_t row = 0; row < height; row++) {
uint32_t* dib_buf = (uint32_t*)(bmp.GetBuffer() + row * pitch);
for (int32_t column = 0; column < width; column++) {
- FX_FLOAT x = (FX_FLOAT)(column);
- FX_FLOAT y = (FX_FLOAT)(row);
- FX_FLOAT b = -2 * (((x - start_x) * (end_x - start_x)) +
- ((y - start_y) * (end_y - start_y)) +
- (start_r * (end_r - start_r)));
- FX_FLOAT c = ((x - start_x) * (x - start_x)) +
- ((y - start_y) * (y - start_y)) - (start_r * start_r);
- FX_FLOAT s;
+ float x = (float)(column);
+ float y = (float)(row);
+ float b = -2 * (((x - start_x) * (end_x - start_x)) +
+ ((y - start_y) * (end_y - start_y)) +
+ (start_r * (end_r - start_r)));
+ float c = ((x - start_x) * (x - start_x)) +
+ ((y - start_y) * (y - start_y)) - (start_r * start_r);
+ float s;
if (a == 0) {
s = -c / b;
} else {
- FX_FLOAT b2_4ac = (b * b) - 4 * (a * c);
+ float b2_4ac = (b * b) - 4 * (a * c);
if (b2_4ac < 0) {
continue;
}
- FX_FLOAT root = (FXSYS_sqrt(b2_4ac));
- FX_FLOAT s1, s2;
+ float root = (FXSYS_sqrt(b2_4ac));
+ float s1, s2;
if (a > 0) {
s1 = (-b - root) / (2 * a);
s2 = (-b + root) / (2 * a);
@@ -507,8 +506,8 @@ void CFX_Graphics::SetDIBitsWithMatrix(CFX_DIBSource* source,
if (matrix->IsIdentity()) {
m_renderDevice->SetDIBits(source, 0, 0);
} else {
- CFX_Matrix m((FX_FLOAT)source->GetWidth(), 0, 0,
- (FX_FLOAT)source->GetHeight(), 0, 0);
+ CFX_Matrix m((float)source->GetWidth(), 0, 0, (float)source->GetHeight(), 0,
+ 0);
m.Concat(*matrix);
int32_t left;
int32_t top;
diff --git a/xfa/fxgraphics/cfx_graphics.h b/xfa/fxgraphics/cfx_graphics.h
index c18f8eb4c9..c360813401 100644
--- a/xfa/fxgraphics/cfx_graphics.h
+++ b/xfa/fxgraphics/cfx_graphics.h
@@ -54,9 +54,9 @@ class CFX_Graphics {
CFX_RenderDevice* GetRenderDevice();
void SetLineCap(CFX_GraphStateData::LineCap lineCap);
- void SetLineDash(FX_FLOAT dashPhase, FX_FLOAT* dashArray, int32_t dashCount);
+ void SetLineDash(float dashPhase, float* dashArray, int32_t dashCount);
void SetLineDash(FX_DashStyle dashStyle);
- void SetLineWidth(FX_FLOAT lineWidth, bool isActOnDash = false);
+ void SetLineWidth(float lineWidth, bool isActOnDash = false);
void SetStrokeColor(CFX_Color* color);
void SetFillColor(CFX_Color* color);
void SetClipRect(const CFX_RectF& rect);
diff --git a/xfa/fxgraphics/cfx_path.cpp b/xfa/fxgraphics/cfx_path.cpp
index d56eb13f67..5ff9bffb07 100644
--- a/xfa/fxgraphics/cfx_path.cpp
+++ b/xfa/fxgraphics/cfx_path.cpp
@@ -39,8 +39,8 @@ void CFX_Path::BezierTo(const CFX_PointF& c1,
void CFX_Path::ArcTo(const CFX_PointF& pos,
const CFX_SizeF& size,
- FX_FLOAT start_angle,
- FX_FLOAT sweep_angle) {
+ float start_angle,
+ float sweep_angle) {
CFX_SizeF new_size = size / 2.0f;
ArcToInternal(CFX_PointF(pos.x + new_size.width, pos.y + new_size.height),
new_size, start_angle, sweep_angle);
@@ -48,16 +48,16 @@ void CFX_Path::ArcTo(const CFX_PointF& pos,
void CFX_Path::ArcToInternal(const CFX_PointF& pos,
const CFX_SizeF& size,
- FX_FLOAT start_angle,
- FX_FLOAT sweep_angle) {
- FX_FLOAT x0 = FXSYS_cos(sweep_angle / 2);
- FX_FLOAT y0 = FXSYS_sin(sweep_angle / 2);
- FX_FLOAT tx = ((1.0f - x0) * 4) / (3 * 1.0f);
- FX_FLOAT ty = y0 - ((tx * x0) / y0);
+ float start_angle,
+ float sweep_angle) {
+ float x0 = FXSYS_cos(sweep_angle / 2);
+ float y0 = FXSYS_sin(sweep_angle / 2);
+ float tx = ((1.0f - x0) * 4) / (3 * 1.0f);
+ float ty = y0 - ((tx * x0) / y0);
CFX_PointF points[] = {CFX_PointF(x0 + tx, -ty), CFX_PointF(x0 + tx, ty)};
- FX_FLOAT sn = FXSYS_sin(start_angle + sweep_angle / 2);
- FX_FLOAT cs = FXSYS_cos(start_angle + sweep_angle / 2);
+ float sn = FXSYS_sin(start_angle + sweep_angle / 2);
+ float cs = FXSYS_cos(start_angle + sweep_angle / 2);
CFX_PointF bezier;
bezier.x = pos.x + (size.width * ((points[0].x * cs) - (points[0].y * sn)));
@@ -78,10 +78,7 @@ void CFX_Path::AddLine(const CFX_PointF& p1, const CFX_PointF& p2) {
data_.AppendPoint(p2, FXPT_TYPE::LineTo, false);
}
-void CFX_Path::AddRectangle(FX_FLOAT left,
- FX_FLOAT top,
- FX_FLOAT width,
- FX_FLOAT height) {
+void CFX_Path::AddRectangle(float left, float top, float width, float height) {
data_.AppendRect(left, top, left + width, top + height);
}
@@ -91,12 +88,12 @@ void CFX_Path::AddEllipse(const CFX_RectF& rect) {
void CFX_Path::AddArc(const CFX_PointF& original_pos,
const CFX_SizeF& original_size,
- FX_FLOAT start_angle,
- FX_FLOAT sweep_angle) {
+ float start_angle,
+ float sweep_angle) {
if (sweep_angle == 0)
return;
- const FX_FLOAT bezier_arc_angle_epsilon = 0.01f;
+ const float bezier_arc_angle_epsilon = 0.01f;
while (start_angle > FX_PI * 2)
start_angle -= FX_PI * 2;
while (start_angle < 0)
@@ -112,9 +109,9 @@ void CFX_Path::AddArc(const CFX_PointF& original_pos,
size.height * FXSYS_sin(start_angle)),
FXPT_TYPE::MoveTo, false);
- FX_FLOAT total_sweep = 0;
- FX_FLOAT local_sweep = 0;
- FX_FLOAT prev_sweep = 0;
+ float total_sweep = 0;
+ float local_sweep = 0;
+ float prev_sweep = 0;
bool done = false;
do {
if (sweep_angle < 0) {
diff --git a/xfa/fxgraphics/cfx_path.h b/xfa/fxgraphics/cfx_path.h
index 267831603a..186465f810 100644
--- a/xfa/fxgraphics/cfx_path.h
+++ b/xfa/fxgraphics/cfx_path.h
@@ -30,27 +30,24 @@ class CFX_Path final {
const CFX_PointF& to);
void ArcTo(const CFX_PointF& pos,
const CFX_SizeF& size,
- FX_FLOAT startAngle,
- FX_FLOAT sweepAngle);
+ float startAngle,
+ float sweepAngle);
void AddLine(const CFX_PointF& p1, const CFX_PointF& p2);
- void AddRectangle(FX_FLOAT left,
- FX_FLOAT top,
- FX_FLOAT width,
- FX_FLOAT height);
+ void AddRectangle(float left, float top, float width, float height);
void AddEllipse(const CFX_RectF& rect);
void AddArc(const CFX_PointF& pos,
const CFX_SizeF& size,
- FX_FLOAT startAngle,
- FX_FLOAT sweepAngle);
+ float startAngle,
+ float sweepAngle);
void AddSubpath(CFX_Path* path);
private:
void ArcToInternal(const CFX_PointF& pos,
const CFX_SizeF& size,
- FX_FLOAT start_angle,
- FX_FLOAT sweep_angle);
+ float start_angle,
+ float sweep_angle);
CFX_PathData data_;
};
diff --git a/xfa/fxgraphics/cfx_shading.cpp b/xfa/fxgraphics/cfx_shading.cpp
index 07936302c9..7dc8ce3412 100644
--- a/xfa/fxgraphics/cfx_shading.cpp
+++ b/xfa/fxgraphics/cfx_shading.cpp
@@ -26,8 +26,8 @@ CFX_Shading::CFX_Shading(const CFX_PointF& beginPoint,
CFX_Shading::CFX_Shading(const CFX_PointF& beginPoint,
const CFX_PointF& endPoint,
- const FX_FLOAT beginRadius,
- const FX_FLOAT endRadius,
+ const float beginRadius,
+ const float endRadius,
bool isExtendedBegin,
bool isExtendedEnd,
const FX_ARGB beginArgb,
@@ -59,11 +59,11 @@ void CFX_Shading::InitArgbArray() {
int32_t b2;
ArgbDecode(m_endArgb, a2, r2, g2, b2);
- FX_FLOAT f = (FX_FLOAT)(FX_SHADING_Steps - 1);
- FX_FLOAT aScale = 1.0 * (a2 - a1) / f;
- FX_FLOAT rScale = 1.0 * (r2 - r1) / f;
- FX_FLOAT gScale = 1.0 * (g2 - g1) / f;
- FX_FLOAT bScale = 1.0 * (b2 - b1) / f;
+ float f = (float)(FX_SHADING_Steps - 1);
+ float aScale = 1.0 * (a2 - a1) / f;
+ float rScale = 1.0 * (r2 - r1) / f;
+ float gScale = 1.0 * (g2 - g1) / f;
+ float bScale = 1.0 * (b2 - b1) / f;
for (int32_t i = 0; i < FX_SHADING_Steps; i++) {
int32_t a3 = static_cast<int32_t>(i * aScale);
diff --git a/xfa/fxgraphics/cfx_shading.h b/xfa/fxgraphics/cfx_shading.h
index 4189581895..1fb34d2b07 100644
--- a/xfa/fxgraphics/cfx_shading.h
+++ b/xfa/fxgraphics/cfx_shading.h
@@ -28,8 +28,8 @@ class CFX_Shading {
// Radial shading.
CFX_Shading(const CFX_PointF& beginPoint,
const CFX_PointF& endPoint,
- const FX_FLOAT beginRadius,
- const FX_FLOAT endRadius,
+ const float beginRadius,
+ const float endRadius,
bool isExtendedBegin,
bool isExtendedEnd,
const FX_ARGB beginArgb,
@@ -44,8 +44,8 @@ class CFX_Shading {
const CFX_Shading_Type m_type;
const CFX_PointF m_beginPoint;
const CFX_PointF m_endPoint;
- const FX_FLOAT m_beginRadius;
- const FX_FLOAT m_endRadius;
+ const float m_beginRadius;
+ const float m_endRadius;
const bool m_isExtendedBegin;
const bool m_isExtendedEnd;
const FX_ARGB m_beginArgb;