summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fxfa')
-rw-r--r--xfa/src/fxfa/src/app/xfa_fwladapter.cpp6
-rw-r--r--xfa/src/fxfa/src/app/xfa_fwltheme.cpp18
2 files changed, 16 insertions, 8 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_fwladapter.cpp b/xfa/src/fxfa/src/app/xfa_fwladapter.cpp
index 94e10ab01d..3c9f1a1556 100644
--- a/xfa/src/fxfa/src/app/xfa_fwladapter.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fwladapter.cpp
@@ -42,9 +42,11 @@ FX_BOOL FWL_ShowCaret(IFWL_Widget* pWidget,
}
FWL_ERR CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
const CFX_RectF* pRect) {
- _FWL_RETURN_VALUE_IF_FAIL(pWidget, FWL_ERR_Indefinite);
+ if (!pWidget)
+ return FWL_ERR_Indefinite;
CXFA_FFField* pField = (CXFA_FFField*)pWidget->GetPrivateData(pWidget);
- _FWL_RETURN_VALUE_IF_FAIL(pField, FWL_ERR_Indefinite);
+ if (!pField)
+ return FWL_ERR_Indefinite;
#ifdef _XFA_EMB
CFX_RectF rtInvalidate;
pWidget->GetWidgetRect(rtInvalidate);
diff --git a/xfa/src/fxfa/src/app/xfa_fwltheme.cpp b/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
index 3b12058f88..0d2412858f 100644
--- a/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
@@ -131,7 +131,8 @@ FX_BOOL CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) {
}
CFX_Graphics* pGraphics = pParams->m_pGraphics;
CFX_RenderDevice* pRenderDevice = pGraphics->GetRenderDevice();
- _FWL_RETURN_VALUE_IF_FAIL(pRenderDevice, FALSE);
+ if (!pRenderDevice)
+ return FALSE;
m_pTextOut->SetRenderDevice(pRenderDevice);
CFX_Matrix mtPart = pParams->m_matrix;
CFX_Matrix* pMatrix = pGraphics->GetMatrix();
@@ -150,7 +151,8 @@ FX_BOOL CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) {
CXFA_WidgetAcc* pAcc = pWidget->GetDataAcc();
CFX_Graphics* pGraphics = pParams->m_pGraphics;
CFX_RenderDevice* pRenderDevice = pGraphics->GetRenderDevice();
- _FWL_RETURN_VALUE_IF_FAIL(pRenderDevice, FALSE);
+ if (!pRenderDevice)
+ return FALSE;
m_pTextOut->SetRenderDevice(pRenderDevice);
m_pTextOut->SetStyles(pParams->m_dwTTOStyles);
m_pTextOut->SetAlignment(pParams->m_iTTOAlign);
@@ -274,8 +276,10 @@ FX_BOOL CXFA_FWLTheme::CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) {
if (!pWidget) {
return FWL_ERR_Indefinite;
}
- _FWL_RETURN_VALUE_IF_FAIL(pParams, FALSE);
- _FWL_RETURN_VALUE_IF_FAIL(m_pTextOut, FALSE);
+ if (!pParams)
+ return FALSE;
+ if (!m_pTextOut)
+ return FALSE;
m_pTextOut->SetFont(m_pCalendarFont);
m_pTextOut->SetFontSize(FWLTHEME_CAPACITY_FontSize);
m_pTextOut->SetTextColor(FWLTHEME_CAPACITY_TextColor);
@@ -293,8 +297,10 @@ FX_BOOL CXFA_FWLTheme::CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) {
m_pTextOut->SetFont(pAcc->GetFDEFont());
m_pTextOut->SetFontSize(pAcc->GetFontSize());
m_pTextOut->SetTextColor(pAcc->GetTextColor());
- _FWL_RETURN_VALUE_IF_FAIL(pParams, FALSE);
- _FWL_RETURN_VALUE_IF_FAIL(m_pTextOut, FALSE);
+ if (!pParams)
+ return FALSE;
+ if (!m_pTextOut)
+ return FALSE;
m_pTextOut->SetAlignment(pParams->m_iTTOAlign);
m_pTextOut->SetStyles(pParams->m_dwTTOStyles);
m_pTextOut->CalcLogicSize(pParams->m_wsText, pParams->m_wsText.GetLength(),