summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/PWL_Edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pdfwindow/PWL_Edit.cpp')
-rw-r--r--fpdfsdk/pdfwindow/PWL_Edit.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp
index b77aad9ab0..f84c38e23b 100644
--- a/fpdfsdk/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp
@@ -101,7 +101,7 @@ void CPWL_Edit::RePosChildWnd() {
CFX_FloatRect CPWL_Edit::GetClientRect() const {
CFX_FloatRect rcClient = CPWL_Utils::DeflateRect(
- GetWindowRect(), (FX_FLOAT)(GetBorderWidth() + GetInnerBorderWidth()));
+ GetWindowRect(), (float)(GetBorderWidth() + GetInnerBorderWidth()));
if (CPWL_ScrollBar* pVSB = GetVScrollBar()) {
if (pVSB->IsVisible()) {
@@ -329,7 +329,7 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice,
switch (GetBorderStyle()) {
case BorderStyle::SOLID: {
CFX_GraphStateData gsd;
- gsd.m_LineWidth = (FX_FLOAT)GetBorderWidth();
+ gsd.m_LineWidth = (float)GetBorderWidth();
CFX_PathData path;
@@ -355,12 +355,12 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice,
}
case BorderStyle::DASH: {
CFX_GraphStateData gsd;
- gsd.m_LineWidth = (FX_FLOAT)GetBorderWidth();
+ gsd.m_LineWidth = (float)GetBorderWidth();
gsd.SetDashCount(2);
- gsd.m_DashArray[0] = (FX_FLOAT)GetBorderDash().nDash;
- gsd.m_DashArray[1] = (FX_FLOAT)GetBorderDash().nGap;
- gsd.m_DashPhase = (FX_FLOAT)GetBorderDash().nPhase;
+ gsd.m_DashArray[0] = (float)GetBorderDash().nDash;
+ gsd.m_DashArray[1] = (float)GetBorderDash().nGap;
+ gsd.m_DashPhase = (float)GetBorderDash().nPhase;
CFX_PathData path;
for (int32_t i = 0; i < nCharArray - 1; i++) {
@@ -463,7 +463,7 @@ void CPWL_Edit::OnKillFocus() {
m_bFocus = false;
}
-void CPWL_Edit::SetCharSpace(FX_FLOAT fCharSpace) {
+void CPWL_Edit::SetCharSpace(float fCharSpace) {
m_pEdit->SetCharSpace(fCharSpace);
}
@@ -527,16 +527,16 @@ bool CPWL_Edit::IsTextFull() const {
return m_pEdit->IsTextFull();
}
-FX_FLOAT CPWL_Edit::GetCharArrayAutoFontSize(CPDF_Font* pFont,
- const CFX_FloatRect& rcPlate,
- int32_t nCharArray) {
+float CPWL_Edit::GetCharArrayAutoFontSize(CPDF_Font* pFont,
+ const CFX_FloatRect& rcPlate,
+ int32_t nCharArray) {
if (pFont && !pFont->IsStandardFont()) {
FX_RECT rcBBox;
pFont->GetFontBBox(rcBBox);
CFX_FloatRect rcCell = rcPlate;
- FX_FLOAT xdiv = rcCell.Width() / nCharArray * 1000.0f / rcBBox.Width();
- FX_FLOAT ydiv = -rcCell.Height() * 1000.0f / rcBBox.Height();
+ float xdiv = rcCell.Width() / nCharArray * 1000.0f / rcBBox.Width();
+ float ydiv = -rcCell.Height() * 1000.0f / rcBBox.Height();
return xdiv < ydiv ? xdiv : ydiv;
}
@@ -551,8 +551,8 @@ void CPWL_Edit::SetCharArray(int32_t nCharArray) {
if (HasFlag(PWS_AUTOFONTSIZE)) {
if (IPVT_FontMap* pFontMap = GetFontMap()) {
- FX_FLOAT fFontSize = GetCharArrayAutoFontSize(
- pFontMap->GetPDFFont(0), GetClientRect(), nCharArray);
+ float fFontSize = GetCharArrayAutoFontSize(pFontMap->GetPDFFont(0),
+ GetClientRect(), nCharArray);
if (fFontSize > 0.0f) {
m_pEdit->SetAutoFontSize(false, true);
m_pEdit->SetFontSize(fFontSize);