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.cpp3
-rw-r--r--xfa/fxfa/app/xfa_fffield.cpp26
-rw-r--r--xfa/fxfa/app/xfa_ffimageedit.cpp3
-rw-r--r--xfa/fxfa/app/xfa_ffpushbutton.cpp7
4 files changed, 16 insertions, 23 deletions
diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp
index 8c42bcf774..6f83173b71 100644
--- a/xfa/fxfa/app/xfa_ffbarcode.cpp
+++ b/xfa/fxfa/app/xfa_ffbarcode.cpp
@@ -157,8 +157,7 @@ void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS,
CXFA_Border borderUI = m_pDataAcc->GetUIBorder();
DrawBorder(pGS, borderUI, m_rtUI, &mtRotate);
RenderCaption(pGS, &mtRotate);
- CFX_RectF rtWidget;
- m_pNormalWidget->GetWidgetRect(rtWidget, false);
+ CFX_RectF rtWidget = m_pNormalWidget->GetWidgetRect();
CFX_Matrix mt;
mt.Set(1, 0, 0, 1, rtWidget.left, rtWidget.top);
mt.Concat(mtRotate);
diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp
index 136a99cb6c..9b5504708f 100644
--- a/xfa/fxfa/app/xfa_fffield.cpp
+++ b/xfa/fxfa/app/xfa_fffield.cpp
@@ -69,8 +69,8 @@ void CXFA_FFField::RenderWidget(CFX_Graphics* pGS,
DrawBorder(pGS, borderUI, m_rtUI, &mtRotate);
RenderCaption(pGS, &mtRotate);
DrawHighlight(pGS, &mtRotate, dwStatus, false);
- CFX_RectF rtWidget;
- m_pNormalWidget->GetWidgetRect(rtWidget, false);
+
+ CFX_RectF rtWidget = m_pNormalWidget->GetWidgetRect();
CFX_Matrix mt;
mt.Set(1, 0, 0, 1, rtWidget.left, rtWidget.top);
mt.Concat(mtRotate);
@@ -363,15 +363,16 @@ bool CXFA_FFField::OnMouseExit() {
TranslateFWLMessage(&ms);
return true;
}
+
void CXFA_FFField::FWLToClient(FX_FLOAT& fx, FX_FLOAT& fy) {
- if (!m_pNormalWidget) {
+ if (!m_pNormalWidget)
return;
- }
- CFX_RectF rtWidget;
- m_pNormalWidget->GetWidgetRect(rtWidget, false);
+
+ CFX_RectF rtWidget = m_pNormalWidget->GetWidgetRect();
fx -= rtWidget.left;
fy -= rtWidget.top;
}
+
bool CXFA_FFField::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
return false;
@@ -585,20 +586,15 @@ FWL_WidgetHit CXFA_FFField::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) {
return FWL_WidgetHit::Titlebar;
return FWL_WidgetHit::Border;
}
+
bool CXFA_FFField::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) {
return true;
}
+
bool CXFA_FFField::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
- if (!m_pNormalWidget) {
- return false;
- }
- CFX_RectF rtWidget;
- m_pNormalWidget->GetWidgetRect(rtWidget, false);
- if (rtWidget.Contains(fx, fy)) {
- return true;
- }
- return false;
+ return m_pNormalWidget && m_pNormalWidget->GetWidgetRect().Contains(fx, fy);
}
+
void CXFA_FFField::LayoutCaption() {
CXFA_TextLayout* pCapTextLayout = m_pDataAcc->GetCaptionTextLayout();
if (!pCapTextLayout)
diff --git a/xfa/fxfa/app/xfa_ffimageedit.cpp b/xfa/fxfa/app/xfa_ffimageedit.cpp
index e9156bace3..8ee6510b2d 100644
--- a/xfa/fxfa/app/xfa_ffimageedit.cpp
+++ b/xfa/fxfa/app/xfa_ffimageedit.cpp
@@ -61,8 +61,7 @@ void CXFA_FFImageEdit::RenderWidget(CFX_Graphics* pGS,
DrawBorder(pGS, borderUI, m_rtUI, &mtRotate);
RenderCaption(pGS, &mtRotate);
if (CFX_DIBitmap* pDIBitmap = m_pDataAcc->GetImageEditImage()) {
- CFX_RectF rtImage;
- m_pNormalWidget->GetWidgetRect(rtImage, false);
+ CFX_RectF rtImage = m_pNormalWidget->GetWidgetRect();
int32_t iHorzAlign = XFA_ATTRIBUTEENUM_Left;
int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top;
if (CXFA_Para para = m_pDataAcc->GetPara()) {
diff --git a/xfa/fxfa/app/xfa_ffpushbutton.cpp b/xfa/fxfa/app/xfa_ffpushbutton.cpp
index a26714aac3..a2b11e89ae 100644
--- a/xfa/fxfa/app/xfa_ffpushbutton.cpp
+++ b/xfa/fxfa/app/xfa_ffpushbutton.cpp
@@ -214,8 +214,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, false);
+ CFX_RectF rtFill = m_pNormalWidget->GetWidgetRect();
rtFill.left = rtFill.top = 0;
FX_FLOAT fLineWith = GetLineWidth();
rtFill.Deflate(fLineWith, fLineWith);
@@ -236,8 +235,8 @@ void CXFA_FFPushButton::OnDrawWidget(CFX_Graphics* pGraphics,
pGraphics->SetLineWidth(fLineWidth);
CFX_Path path;
path.Create();
- CFX_RectF rect;
- m_pNormalWidget->GetWidgetRect(rect, false);
+
+ CFX_RectF rect = m_pNormalWidget->GetWidgetRect();
path.AddRectangle(0, 0, rect.width, rect.height);
pGraphics->StrokePath(&path, (CFX_Matrix*)pMatrix);
}