summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/include/fsdk_mgr.h8
-rw-r--r--fpdfsdk/src/fpdfformfill.cpp3
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp5
3 files changed, 10 insertions, 6 deletions
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index cbe47418fc..357be3cf0f 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -476,10 +476,10 @@ public:
double bottom;
m_pInfo->FFI_GetPageViewRect(m_pInfo, page, &left, &top, &right, &bottom);
- dstRect.left = left;
- dstRect.top = top < bottom? bottom:top;
- dstRect.bottom = top < bottom? top:bottom;
- dstRect.right = right;
+ dstRect.left = static_cast<float>(left);
+ dstRect.top = static_cast<float>(top < bottom ? bottom : top);
+ dstRect.bottom = static_cast<float>(top < bottom ? top : bottom);
+ dstRect.right = static_cast<float>(right);
}
}
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp
index 0fb32919e1..ea94925d63 100644
--- a/fpdfsdk/src/fpdfformfill.cpp
+++ b/fpdfsdk/src/fpdfformfill.cpp
@@ -71,7 +71,8 @@ DLLEXPORT int STDCALL FPDPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle, FPDF_
rcWidget.bottom -= 1.0f;
rcWidget.top += 1.0f;
- if (rcWidget.Contains(page_x, page_y)) {
+ if (rcWidget.Contains(static_cast<FX_FLOAT>(page_x),
+ static_cast<FX_FLOAT>(page_y))) {
pWidgetIterator->Release();
return FPDF_FORMFIELD_XFA;
}
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index c4cee6f4d8..f134b790a9 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -678,7 +678,10 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice, CPDF_Matrix* p
gs.Create(pDevice);
if (pClip) {
CFX_RectF rectClip;
- rectClip.Set(pClip->left, pClip->top, pClip->Width(), pClip->Height());
+ rectClip.Set(static_cast<FX_FLOAT>(pClip->left),
+ static_cast<FX_FLOAT>(pClip->top),
+ static_cast<FX_FLOAT>(pClip->Width()),
+ static_cast<FX_FLOAT>(pClip->Height()));
gs.SetClipRect(rectClip);
}
IXFA_RenderContext* pRenderContext = XFA_RenderContext_Create();