summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r--xfa/fxfa/app/xfa_ffbarcode.cpp4
-rw-r--r--xfa/fxfa/app/xfa_ffcheckbutton.cpp10
-rw-r--r--xfa/fxfa/app/xfa_ffdocview.cpp5
-rw-r--r--xfa/fxfa/app/xfa_ffexclgroup.cpp8
-rw-r--r--xfa/fxfa/app/xfa_fffield.cpp18
-rw-r--r--xfa/fxfa/app/xfa_ffpageview.cpp13
-rw-r--r--xfa/fxfa/app/xfa_ffpushbutton.cpp25
-rw-r--r--xfa/fxfa/app/xfa_fftext.cpp4
-rw-r--r--xfa/fxfa/app/xfa_ffwidget.cpp33
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp26
-rw-r--r--xfa/fxfa/app/xfa_fwltheme.cpp2
-rw-r--r--xfa/fxfa/app/xfa_rendercontext.cpp2
12 files changed, 62 insertions, 88 deletions
diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp
index e42bf919c7..78452d5dd3 100644
--- a/xfa/fxfa/app/xfa_ffbarcode.cpp
+++ b/xfa/fxfa/app/xfa_ffbarcode.cpp
@@ -157,8 +157,8 @@ void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS,
DrawBorder(pGS, borderUI, m_rtUI, &mtRotate);
RenderCaption(pGS, &mtRotate);
CFX_RectF rtWidget = m_pNormalWidget->GetWidgetRect();
- CFX_Matrix mt;
- mt.Set(1, 0, 0, 1, rtWidget.left, rtWidget.top);
+
+ CFX_Matrix mt(1, 0, 0, 1, rtWidget.left, rtWidget.top);
mt.Concat(mtRotate);
m_pNormalWidget->DrawWidget(pGS, &mt);
}
diff --git a/xfa/fxfa/app/xfa_ffcheckbutton.cpp b/xfa/fxfa/app/xfa_ffcheckbutton.cpp
index 3de3672a63..c8ede3761a 100644
--- a/xfa/fxfa/app/xfa_ffcheckbutton.cpp
+++ b/xfa/fxfa/app/xfa_ffcheckbutton.cpp
@@ -19,9 +19,7 @@
#include "xfa/fxfa/xfa_ffwidget.h"
CXFA_FFCheckButton::CXFA_FFCheckButton(CXFA_WidgetAcc* pDataAcc)
- : CXFA_FFField(pDataAcc), m_pOldDelegate(nullptr) {
- m_rtCheckBox.Set(0, 0, 0, 0);
-}
+ : CXFA_FFField(pDataAcc), m_pOldDelegate(nullptr) {}
CXFA_FFCheckButton::~CXFA_FFCheckButton() {}
@@ -99,8 +97,7 @@ bool CXFA_FFCheckButton::PerformLayout() {
FX_FLOAT fCapReserve = 0;
CXFA_Caption caption = m_pDataAcc->GetCaption();
if (caption && caption.GetPresence()) {
- m_rtCaption.Set(rtWidget.left, rtWidget.top, rtWidget.width,
- rtWidget.height);
+ m_rtCaption = rtWidget;
iCapPlacement = caption.GetPlacementType();
fCapReserve = caption.GetReserve();
if (fCapReserve <= 0) {
@@ -232,8 +229,7 @@ void CXFA_FFCheckButton::RenderWidget(CFX_Graphics* pGS,
RenderCaption(pGS, &mtRotate);
DrawHighlight(pGS, &mtRotate, dwStatus,
m_pDataAcc->GetCheckButtonShape() == XFA_ATTRIBUTEENUM_Round);
- CFX_Matrix mt;
- mt.Set(1, 0, 0, 1, m_rtCheckBox.left, m_rtCheckBox.top);
+ CFX_Matrix mt(1, 0, 0, 1, m_rtCheckBox.left, m_rtCheckBox.top);
mt.Concat(mtRotate);
GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget, pGS, &mt);
}
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index 847ae07d87..87441814e5 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -551,10 +551,7 @@ void CXFA_FFDocView::AddInvalidateRect(CXFA_FFPageView* pPageView,
m_mapPageInvalidate[pPageView]->Union(rtInvalidate);
return;
}
- CFX_RectF* pRect = new CFX_RectF;
- pRect->Set(rtInvalidate.left, rtInvalidate.top, rtInvalidate.width,
- rtInvalidate.height);
- m_mapPageInvalidate[pPageView].reset(pRect);
+ m_mapPageInvalidate[pPageView] = pdfium::MakeUnique<CFX_RectF>(rtInvalidate);
}
void CXFA_FFDocView::RunInvalidate() {
diff --git a/xfa/fxfa/app/xfa_ffexclgroup.cpp b/xfa/fxfa/app/xfa_ffexclgroup.cpp
index 6b47cfb8eb..938cdbcb23 100644
--- a/xfa/fxfa/app/xfa_ffexclgroup.cpp
+++ b/xfa/fxfa/app/xfa_ffexclgroup.cpp
@@ -19,13 +19,13 @@ CXFA_FFExclGroup::~CXFA_FFExclGroup() {}
void CXFA_FFExclGroup::RenderWidget(CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
uint32_t dwStatus) {
- if (!IsMatchVisibleStatus(dwStatus)) {
+ if (!IsMatchVisibleStatus(dwStatus))
return;
- }
+
CFX_Matrix mtRotate;
GetRotateMatrix(mtRotate);
- if (pMatrix) {
+ if (pMatrix)
mtRotate.Concat(*pMatrix);
- }
+
CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus);
}
diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp
index c053a8c6ca..0f9bb65b6f 100644
--- a/xfa/fxfa/app/xfa_fffield.cpp
+++ b/xfa/fxfa/app/xfa_fffield.cpp
@@ -26,10 +26,7 @@
#include "xfa/fxgraphics/cfx_path.h"
CXFA_FFField::CXFA_FFField(CXFA_WidgetAcc* pDataAcc)
- : CXFA_FFWidget(pDataAcc), m_pNormalWidget(nullptr) {
- m_rtUI.Set(0, 0, 0, 0);
- m_rtCaption.Set(0, 0, 0, 0);
-}
+ : CXFA_FFWidget(pDataAcc), m_pNormalWidget(nullptr) {}
CXFA_FFField::~CXFA_FFField() {
CXFA_FFField::UnloadWidget();
@@ -72,8 +69,7 @@ void CXFA_FFField::RenderWidget(CFX_Graphics* pGS,
DrawHighlight(pGS, &mtRotate, dwStatus, false);
CFX_RectF rtWidget = m_pNormalWidget->GetWidgetRect();
- CFX_Matrix mt;
- mt.Set(1, 0, 0, 1, rtWidget.left, rtWidget.top);
+ CFX_Matrix mt(1, 0, 0, 1, rtWidget.left, rtWidget.top);
mt.Concat(mtRotate);
GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget, pGS, &mt);
}
@@ -186,15 +182,14 @@ void CXFA_FFField::CapPlacement() {
if (caption && caption.GetPresence() != XFA_ATTRIBUTEENUM_Hidden) {
iCapPlacement = (XFA_ATTRIBUTEENUM)caption.GetPlacementType();
if (iCapPlacement == XFA_ATTRIBUTEENUM_Top && GetPrev()) {
- m_rtCaption.Set(0, 0, 0, 0);
+ m_rtCaption.Reset();
} else if (iCapPlacement == XFA_ATTRIBUTEENUM_Bottom && GetNext()) {
- m_rtCaption.Set(0, 0, 0, 0);
+ m_rtCaption.Reset();
} else {
fCapReserve = caption.GetReserve();
CXFA_LayoutItem* pItem = this;
if (!pItem->GetPrev() && !pItem->GetNext()) {
- m_rtCaption.Set(rtWidget.left, rtWidget.top, rtWidget.width,
- rtWidget.height);
+ m_rtCaption = rtWidget;
} else {
pItem = pItem->GetFirst();
m_rtCaption = pItem->GetRect(false);
@@ -617,8 +612,7 @@ void CXFA_FFField::RenderCaption(CFX_Graphics* pGS, CFX_Matrix* pMatrix) {
CFX_RectF rtClip = m_rtCaption;
rtClip.Intersect(rtWidget);
CFX_RenderDevice* pRenderDevice = pGS->GetRenderDevice();
- CFX_Matrix mt;
- mt.Set(1, 0, 0, 1, m_rtCaption.left, m_rtCaption.top);
+ CFX_Matrix mt(1, 0, 0, 1, m_rtCaption.left, m_rtCaption.top);
if (pMatrix) {
pMatrix->TransformRect(rtClip);
mt.Concat(*pMatrix);
diff --git a/xfa/fxfa/app/xfa_ffpageview.cpp b/xfa/fxfa/app/xfa_ffpageview.cpp
index 3dfa237c0f..da31cbf3b3 100644
--- a/xfa/fxfa/app/xfa_ffpageview.cpp
+++ b/xfa/fxfa/app/xfa_ffpageview.cpp
@@ -33,8 +33,7 @@ void GetPageMatrix(CFX_Matrix& pageMatrix,
ASSERT(iRotate >= 0 && iRotate <= 3);
bool bFlipX = (dwCoordinatesType & 0x01) != 0;
bool bFlipY = (dwCoordinatesType & 0x02) != 0;
- CFX_Matrix m;
- m.Set((bFlipX ? -1.0f : 1.0f), 0, 0, (bFlipY ? -1.0f : 1.0f), 0, 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;
@@ -126,16 +125,14 @@ CXFA_FFDocView* CXFA_FFPageView::GetDocView() const {
}
void CXFA_FFPageView::GetPageViewRect(CFX_RectF& rtPage) const {
- rtPage.Set(0, 0, GetPageSize());
+ rtPage = CFX_RectF(0, 0, GetPageSize());
}
void CXFA_FFPageView::GetDisplayMatrix(CFX_Matrix& mt,
const CFX_Rect& rtDisp,
int32_t iRotate) const {
CFX_SizeF sz = GetPageSize();
- CFX_RectF fdePage;
- fdePage.Set(0, 0, sz.x, sz.y);
- GetPageMatrix(mt, fdePage, rtDisp, iRotate, 0);
+ GetPageMatrix(mt, CFX_RectF(0, 0, sz.x, sz.y), rtDisp, iRotate, 0);
}
IXFA_WidgetIterator* CXFA_FFPageView::CreateWidgetIterator(
@@ -370,8 +367,10 @@ static int32_t XFA_TabOrderWidgetComparator(const void* phWidget1,
const void* phWidget2) {
CXFA_FFWidget* pWidget1 = (*(CXFA_TabParam**)phWidget1)->m_pWidget;
CXFA_FFWidget* pWidget2 = (*(CXFA_TabParam**)phWidget2)->m_pWidget;
- CFX_RectF rt1, rt2;
+ CFX_RectF rt1;
pWidget1->GetWidgetRect(rt1);
+
+ CFX_RectF rt2;
pWidget2->GetWidgetRect(rt2);
FX_FLOAT x1 = rt1.left, y1 = rt1.top, x2 = rt2.left, y2 = rt2.top;
if (y1 < y2 || (y1 - y2 < XFA_FLOAT_PERCISION && x1 < x2)) {
diff --git a/xfa/fxfa/app/xfa_ffpushbutton.cpp b/xfa/fxfa/app/xfa_ffpushbutton.cpp
index 92e5b70d4e..fcb7d32761 100644
--- a/xfa/fxfa/app/xfa_ffpushbutton.cpp
+++ b/xfa/fxfa/app/xfa_ffpushbutton.cpp
@@ -45,8 +45,8 @@ void CXFA_FFPushButton::RenderWidget(CFX_Graphics* pGS,
RenderHighlightCaption(pGS, &mtRotate);
CFX_RectF rtWidget;
GetRectWithoutRotate(rtWidget);
- CFX_Matrix mt;
- mt.Set(1, 0, 0, 1, rtWidget.left, rtWidget.top);
+
+ CFX_Matrix mt(1, 0, 0, 1, rtWidget.left, rtWidget.top);
mt.Concat(mtRotate);
GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget, pGS, &mt);
}
@@ -102,20 +102,21 @@ bool CXFA_FFPushButton::PerformLayout() {
CXFA_FFWidget::PerformLayout();
CFX_RectF rtWidget;
GetRectWithoutRotate(rtWidget);
+
m_rtUI = rtWidget;
- if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin()) {
+ if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin())
XFA_RectWidthoutMargin(rtWidget, mgWidget);
- }
+
CXFA_Caption caption = m_pDataAcc->GetCaption();
- m_rtCaption.Set(rtWidget.left, rtWidget.top, rtWidget.width, rtWidget.height);
- if (CXFA_Margin mgCap = caption.GetMargin()) {
+ m_rtCaption = rtWidget;
+ if (CXFA_Margin mgCap = caption.GetMargin())
XFA_RectWidthoutMargin(m_rtCaption, mgCap);
- }
+
LayoutHighlightCaption();
SetFWLRect();
- if (m_pNormalWidget) {
+ if (m_pNormalWidget)
m_pNormalWidget->Update();
- }
+
return true;
}
FX_FLOAT CXFA_FFPushButton::GetLineWidth() {
@@ -176,8 +177,7 @@ void CXFA_FFPushButton::RenderHighlightCaption(CFX_Graphics* pGS,
GetRectWithoutRotate(rtWidget);
CFX_RectF rtClip = m_rtCaption;
rtClip.Intersect(rtWidget);
- CFX_Matrix mt;
- mt.Set(1, 0, 0, 1, m_rtCaption.left, m_rtCaption.top);
+ CFX_Matrix mt(1, 0, 0, 1, m_rtCaption.left, m_rtCaption.top);
if (pMatrix) {
pMatrix->TransformRect(rtClip);
mt.Concat(*pMatrix);
@@ -215,8 +215,7 @@ void CXFA_FFPushButton::OnDrawWidget(CFX_Graphics* pGraphics,
if (m_pNormalWidget->GetStylesEx() & XFA_FWL_PSBSTYLEEXT_HiliteInverted) {
if ((m_pNormalWidget->GetStates() & FWL_STATE_PSB_Pressed) &&
(m_pNormalWidget->GetStates() & FWL_STATE_PSB_Hovered)) {
- CFX_RectF rtFill = m_pNormalWidget->GetWidgetRect();
- rtFill.left = rtFill.top = 0;
+ CFX_RectF rtFill(0, 0, m_pNormalWidget->GetWidgetRect().Size());
FX_FLOAT fLineWith = GetLineWidth();
rtFill.Deflate(fLineWith, fLineWith);
CFX_Color cr(FXARGB_MAKE(128, 128, 255, 255));
diff --git a/xfa/fxfa/app/xfa_fftext.cpp b/xfa/fxfa/app/xfa_fftext.cpp
index b87645d8a7..9176276d85 100644
--- a/xfa/fxfa/app/xfa_fftext.cpp
+++ b/xfa/fxfa/app/xfa_fftext.cpp
@@ -57,8 +57,8 @@ void CXFA_FFText::RenderWidget(CFX_Graphics* pGS,
rtText.Deflate(fLeftInset, fTopInset, fRightInset, fBottomInset);
}
}
- CFX_Matrix mt;
- mt.Set(1, 0, 0, 1, rtText.left, rtText.top);
+
+ CFX_Matrix mt(1, 0, 0, 1, rtText.left, rtText.top);
CFX_RectF rtClip = rtText;
mtRotate.TransformRect(rtClip);
mt.Concat(mtRotate);
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index 95cfe2e59f..d34cecc44c 100644
--- a/xfa/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/fxfa/app/xfa_ffwidget.cpp
@@ -35,9 +35,7 @@
CXFA_FFWidget::CXFA_FFWidget(CXFA_WidgetAcc* pDataAcc)
: CXFA_ContentLayoutItem(pDataAcc->GetNode()),
m_pPageView(nullptr),
- m_pDataAcc(pDataAcc) {
- m_rtWidget.Set(0, 0, 0, 0);
-}
+ m_pDataAcc(pDataAcc) {}
CXFA_FFWidget::~CXFA_FFWidget() {}
@@ -380,7 +378,7 @@ static void XFA_GetMatrix(CFX_Matrix& m,
}
}
void CXFA_FFWidget::GetRotateMatrix(CFX_Matrix& mt) {
- mt.Set(1, 0, 0, 1, 0, 0);
+ mt = CFX_Matrix();
int32_t iRotate = m_pDataAcc->GetRotate();
if (!iRotate) {
return;
@@ -831,18 +829,15 @@ void XFA_DrawImage(CFX_Graphics* pGS,
int32_t iImageYDpi,
int32_t iHorzAlign,
int32_t iVertAlign) {
- if (rtImage.IsEmpty()) {
+ if (rtImage.IsEmpty())
return;
- }
- if (!pDIBitmap || !pDIBitmap->GetBuffer()) {
+ if (!pDIBitmap || !pDIBitmap->GetBuffer())
return;
- }
- FX_FLOAT fWidth =
- XFA_UnitPx2Pt((FX_FLOAT)pDIBitmap->GetWidth(), (FX_FLOAT)iImageXDpi);
- FX_FLOAT fHeight =
- XFA_UnitPx2Pt((FX_FLOAT)pDIBitmap->GetHeight(), (FX_FLOAT)iImageYDpi);
- CFX_RectF rtFit;
- rtFit.Set(rtImage.left, rtImage.top, fWidth, fHeight);
+
+ CFX_RectF rtFit(
+ rtImage.TopLeft(),
+ XFA_UnitPx2Pt((FX_FLOAT)pDIBitmap->GetWidth(), (FX_FLOAT)iImageXDpi),
+ XFA_UnitPx2Pt((FX_FLOAT)pDIBitmap->GetHeight(), (FX_FLOAT)iImageYDpi));
switch (iAspect) {
case XFA_ATTRIBUTEENUM_Fit: {
FX_FLOAT f1 = rtImage.height / rtFit.height;
@@ -1348,10 +1343,9 @@ static void XFA_BOX_GetPath(CXFA_Box box,
if (bInverted) {
sy *= -1;
}
- CFX_RectF rtRadius;
- rtRadius.Set(cp1.x + offsetX * 2, cp1.y + offsetY * 2,
- fRadius1 * 2 * vx - offsetX * 2,
- fRadius1 * 2 * vy - offsetY * 2);
+ CFX_RectF rtRadius(cp1.x + offsetX * 2, cp1.y + offsetY * 2,
+ fRadius1 * 2 * vx - offsetX * 2,
+ fRadius1 * 2 * vy - offsetY * 2);
rtRadius.Normalize();
if (bInverted) {
rtRadius.Offset(-fRadius1 * vx, -fRadius1 * vy);
@@ -1501,8 +1495,7 @@ static void XFA_BOX_GetFillPath(CXFA_Box box,
if (bInverted) {
sy *= -1;
}
- CFX_RectF rtRadius;
- rtRadius.Set(cp1.x, cp1.y, fRadius1 * 2 * vx, fRadius1 * 2 * vy);
+ CFX_RectF rtRadius(cp1.x, cp1.y, fRadius1 * 2 * vx, fRadius1 * 2 * vy);
rtRadius.Normalize();
if (bInverted) {
rtRadius.Offset(-fRadius1 * vx, -fRadius1 * vy);
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index 97adff30ac..704aec634d 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -927,16 +927,15 @@ bool CXFA_WidgetAcc::CalculateImageAutoSize(CFX_SizeF& size) {
}
size.clear();
if (CFX_DIBitmap* pBitmap = GetImageImage()) {
- CFX_RectF rtImage, rtFit;
- rtImage.Set(0, 0, 0, 0);
- rtFit.Set(0, 0, 0, 0);
int32_t iImageXDpi = 0;
int32_t iImageYDpi = 0;
GetImageDpi(iImageXDpi, iImageYDpi);
- rtImage.width =
- XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetWidth(), (FX_FLOAT)iImageXDpi);
- rtImage.height =
- XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetHeight(), (FX_FLOAT)iImageYDpi);
+ CFX_RectF rtImage(
+ 0, 0,
+ XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetWidth(), (FX_FLOAT)iImageXDpi),
+ XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetHeight(), (FX_FLOAT)iImageYDpi));
+
+ CFX_RectF rtFit;
if (GetWidth(rtFit.width)) {
GetWidthWithoutMargin(rtFit.width);
} else {
@@ -958,16 +957,15 @@ bool CXFA_WidgetAcc::CalculateImageEditAutoSize(CFX_SizeF& size) {
}
size.clear();
if (CFX_DIBitmap* pBitmap = GetImageEditImage()) {
- CFX_RectF rtImage, rtFit;
- rtImage.Set(0, 0, 0, 0);
- rtFit.Set(0, 0, 0, 0);
int32_t iImageXDpi = 0;
int32_t iImageYDpi = 0;
GetImageEditDpi(iImageXDpi, iImageYDpi);
- rtImage.width =
- XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetWidth(), (FX_FLOAT)iImageXDpi);
- rtImage.height =
- XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetHeight(), (FX_FLOAT)iImageYDpi);
+ CFX_RectF rtImage(
+ 0, 0,
+ XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetWidth(), (FX_FLOAT)iImageXDpi),
+ XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetHeight(), (FX_FLOAT)iImageYDpi));
+
+ CFX_RectF rtFit;
if (GetWidth(rtFit.width)) {
GetWidthWithoutMargin(rtFit.width);
} else {
diff --git a/xfa/fxfa/app/xfa_fwltheme.cpp b/xfa/fxfa/app/xfa_fwltheme.cpp
index 1de302e995..3398c8a25c 100644
--- a/xfa/fxfa/app/xfa_fwltheme.cpp
+++ b/xfa/fxfa/app/xfa_fwltheme.cpp
@@ -149,8 +149,6 @@ void CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) {
CFX_RectF CXFA_FWLTheme::GetUIMargin(CFWL_ThemePart* pThemePart) const {
CFX_RectF rect;
- rect.Reset();
-
CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pThemePart->m_pWidget);
if (!pWidget)
return rect;
diff --git a/xfa/fxfa/app/xfa_rendercontext.cpp b/xfa/fxfa/app/xfa_rendercontext.cpp
index 75e7e7d84e..f103b23520 100644
--- a/xfa/fxfa/app/xfa_rendercontext.cpp
+++ b/xfa/fxfa/app/xfa_rendercontext.cpp
@@ -36,7 +36,7 @@ int32_t CXFA_RenderContext::StartRender(CXFA_FFPageView* pPageView,
pGS->GetClipRect(rtPage);
CFX_Matrix mtRes;
mtRes.SetReverse(matrix);
- m_rtClipRect.Set(rtPage.left, rtPage.top, rtPage.width, rtPage.height);
+ m_rtClipRect = rtPage;
mtRes.TransformRect(m_rtClipRect);
m_dwStatus = m_options.m_bHighlight ? XFA_WidgetStatus_Highlight : 0;
uint32_t dwFilterType = XFA_WidgetStatus_Visible |