summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl')
-rw-r--r--xfa/fwl/cfwl_barcode.cpp9
-rw-r--r--xfa/fwl/cfwl_barcode.h2
-rw-r--r--xfa/fwl/cfwl_caret.cpp8
-rw-r--r--xfa/fwl/cfwl_caret.h4
-rw-r--r--xfa/fwl/cfwl_checkbox.cpp14
-rw-r--r--xfa/fwl/cfwl_checkbox.h4
-rw-r--r--xfa/fwl/cfwl_combobox.cpp21
-rw-r--r--xfa/fwl/cfwl_combobox.h4
-rw-r--r--xfa/fwl/cfwl_comboboxproxy.cpp4
-rw-r--r--xfa/fwl/cfwl_comboboxproxy.h2
-rw-r--r--xfa/fwl/cfwl_datetimepicker.cpp16
-rw-r--r--xfa/fwl/cfwl_datetimepicker.h4
-rw-r--r--xfa/fwl/cfwl_edit.cpp15
-rw-r--r--xfa/fwl/cfwl_edit.h4
-rw-r--r--xfa/fwl/cfwl_form.cpp10
-rw-r--r--xfa/fwl/cfwl_form.h4
-rw-r--r--xfa/fwl/cfwl_formproxy.cpp2
-rw-r--r--xfa/fwl/cfwl_formproxy.h2
-rw-r--r--xfa/fwl/cfwl_listbox.cpp15
-rw-r--r--xfa/fwl/cfwl_listbox.h4
-rw-r--r--xfa/fwl/cfwl_monthcalendar.cpp34
-rw-r--r--xfa/fwl/cfwl_monthcalendar.h4
-rw-r--r--xfa/fwl/cfwl_picturebox.cpp8
-rw-r--r--xfa/fwl/cfwl_picturebox.h4
-rw-r--r--xfa/fwl/cfwl_pushbutton.cpp10
-rw-r--r--xfa/fwl/cfwl_pushbutton.h4
-rw-r--r--xfa/fwl/cfwl_scrollbar.cpp18
-rw-r--r--xfa/fwl/cfwl_scrollbar.h4
-rw-r--r--xfa/fwl/cfwl_spinbutton.cpp15
-rw-r--r--xfa/fwl/cfwl_spinbutton.h4
-rw-r--r--xfa/fwl/cfwl_widget.cpp7
-rw-r--r--xfa/fwl/cfwl_widget.h6
-rw-r--r--xfa/fwl/cfwl_widgetmgr.cpp16
-rw-r--r--xfa/fwl/cfwl_widgetmgr.h2
-rw-r--r--xfa/fwl/ifwl_widgetdelegate.h2
35 files changed, 139 insertions, 147 deletions
diff --git a/xfa/fwl/cfwl_barcode.cpp b/xfa/fwl/cfwl_barcode.cpp
index b51bb24366..8db40d2b19 100644
--- a/xfa/fwl/cfwl_barcode.cpp
+++ b/xfa/fwl/cfwl_barcode.cpp
@@ -36,7 +36,7 @@ void CFWL_Barcode::Update() {
}
void CFWL_Barcode::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+ const CFX_Matrix& matrix) {
if (!pGraphics)
return;
if (!m_pProperties->m_pThemeProvider)
@@ -49,13 +49,12 @@ void CFWL_Barcode::DrawWidget(CXFA_Graphics* pGraphics,
CFX_Matrix mt;
mt.e = GetRTClient().left;
mt.f = GetRTClient().top;
- if (pMatrix)
- mt.Concat(*pMatrix);
+ mt.Concat(matrix);
- m_pBarcodeEngine->RenderDevice(pGraphics->GetRenderDevice(), pMatrix);
+ m_pBarcodeEngine->RenderDevice(pGraphics->GetRenderDevice(), &matrix);
return;
}
- CFWL_Edit::DrawWidget(pGraphics, pMatrix);
+ CFWL_Edit::DrawWidget(pGraphics, matrix);
}
void CFWL_Barcode::SetType(BC_TYPE type) {
diff --git a/xfa/fwl/cfwl_barcode.h b/xfa/fwl/cfwl_barcode.h
index c913a17b10..48bdeabdd3 100644
--- a/xfa/fwl/cfwl_barcode.h
+++ b/xfa/fwl/cfwl_barcode.h
@@ -45,7 +45,7 @@ class CFWL_Barcode : public CFWL_Edit {
// CFWL_Widget
FWL_Type GetClassID() const override;
void Update() override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void OnProcessEvent(CFWL_Event* pEvent) override;
// CFWL_Edit
diff --git a/xfa/fwl/cfwl_caret.cpp b/xfa/fwl/cfwl_caret.cpp
index be7ecbf331..1cef4f673a 100644
--- a/xfa/fwl/cfwl_caret.cpp
+++ b/xfa/fwl/cfwl_caret.cpp
@@ -44,7 +44,7 @@ FWL_Type CFWL_Caret::GetClassID() const {
void CFWL_Caret::Update() {}
void CFWL_Caret::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+ const CFX_Matrix& matrix) {
if (!pGraphics)
return;
if (!m_pProperties->m_pThemeProvider)
@@ -52,7 +52,7 @@ void CFWL_Caret::DrawWidget(CXFA_Graphics* pGraphics,
if (!m_pProperties->m_pThemeProvider)
return;
- DrawCaretBK(pGraphics, m_pProperties->m_pThemeProvider, pMatrix);
+ DrawCaretBK(pGraphics, m_pProperties->m_pThemeProvider, &matrix);
}
void CFWL_Caret::ShowCaret() {
@@ -90,8 +90,8 @@ void CFWL_Caret::DrawCaretBK(CXFA_Graphics* pGraphics,
void CFWL_Caret::OnProcessMessage(CFWL_Message* pMessage) {}
void CFWL_Caret::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- DrawWidget(pGraphics, pMatrix);
+ const CFX_Matrix& matrix) {
+ DrawWidget(pGraphics, matrix);
}
CFWL_Caret::Timer::Timer(CFWL_Caret* pCaret) : CFWL_Timer(pCaret) {}
diff --git a/xfa/fwl/cfwl_caret.h b/xfa/fwl/cfwl_caret.h
index d00f38a29c..32bc79535a 100644
--- a/xfa/fwl/cfwl_caret.h
+++ b/xfa/fwl/cfwl_caret.h
@@ -27,10 +27,10 @@ class CFWL_Caret : public CFWL_Widget {
// CFWL_Widget
FWL_Type GetClassID() const override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
void Update() override;
void ShowCaret();
diff --git a/xfa/fwl/cfwl_checkbox.cpp b/xfa/fwl/cfwl_checkbox.cpp
index bc45e5a792..42b6cadc83 100644
--- a/xfa/fwl/cfwl_checkbox.cpp
+++ b/xfa/fwl/cfwl_checkbox.cpp
@@ -62,7 +62,7 @@ void CFWL_CheckBox::Update() {
}
void CFWL_CheckBox::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+ const CFX_Matrix& matrix) {
if (!pGraphics)
return;
if (!m_pProperties->m_pThemeProvider)
@@ -71,7 +71,7 @@ void CFWL_CheckBox::DrawWidget(CXFA_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
if (HasBorder()) {
DrawBorder(pGraphics, CFWL_Part::Border, m_pProperties->m_pThemeProvider,
- pMatrix);
+ matrix);
}
int32_t dwStates = GetPartStates();
@@ -81,8 +81,7 @@ void CFWL_CheckBox::DrawWidget(CXFA_Graphics* pGraphics,
param.m_iPart = CFWL_Part::Background;
param.m_dwStates = dwStates;
param.m_pGraphics = pGraphics;
- if (pMatrix)
- param.m_matrix.Concat(*pMatrix);
+ param.m_matrix.Concat(matrix);
param.m_rtPart = m_rtClient;
if (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused)
param.m_pData = &m_rtFocus;
@@ -97,8 +96,7 @@ void CFWL_CheckBox::DrawWidget(CXFA_Graphics* pGraphics,
textParam.m_iPart = CFWL_Part::Caption;
textParam.m_dwStates = dwStates;
textParam.m_pGraphics = pGraphics;
- if (pMatrix)
- textParam.m_matrix.Concat(*pMatrix);
+ textParam.m_matrix.Concat(matrix);
textParam.m_rtPart = m_rtCaption;
textParam.m_wsText = L"Check box";
textParam.m_dwTTOStyles = m_dwTTOStyles;
@@ -268,8 +266,8 @@ void CFWL_CheckBox::OnProcessMessage(CFWL_Message* pMessage) {
}
void CFWL_CheckBox::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- DrawWidget(pGraphics, pMatrix);
+ const CFX_Matrix& matrix) {
+ DrawWidget(pGraphics, matrix);
}
void CFWL_CheckBox::OnFocusChanged(bool bSet) {
diff --git a/xfa/fwl/cfwl_checkbox.h b/xfa/fwl/cfwl_checkbox.h
index e90fbd1b93..9ae6590b2f 100644
--- a/xfa/fwl/cfwl_checkbox.h
+++ b/xfa/fwl/cfwl_checkbox.h
@@ -41,11 +41,11 @@ class CFWL_CheckBox : public CFWL_Widget {
// CFWL_Widget
FWL_Type GetClassID() const override;
void Update() override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
void SetBoxSize(float fHeight);
diff --git a/xfa/fwl/cfwl_combobox.cpp b/xfa/fwl/cfwl_combobox.cpp
index ec90a15684..a3dbe8c946 100644
--- a/xfa/fwl/cfwl_combobox.cpp
+++ b/xfa/fwl/cfwl_combobox.cpp
@@ -126,9 +126,9 @@ FWL_WidgetHit CFWL_ComboBox::HitTest(const CFX_PointF& point) {
}
void CFWL_ComboBox::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+ const CFX_Matrix& matrix) {
if (m_pWidgetMgr->IsFormDisabled()) {
- DisForm_DrawWidget(pGraphics, pMatrix);
+ DisForm_DrawWidget(pGraphics, &matrix);
return;
}
@@ -139,7 +139,7 @@ void CFWL_ComboBox::DrawWidget(CXFA_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
+ DrawBorder(pGraphics, CFWL_Part::Border, pTheme, matrix);
if (!IsDropDownStyle()) {
CFX_RectF rtTextBk(m_rtClient);
@@ -149,8 +149,7 @@ void CFWL_ComboBox::DrawWidget(CXFA_Graphics* pGraphics,
param.m_pWidget = this;
param.m_iPart = CFWL_Part::Background;
param.m_pGraphics = pGraphics;
- if (pMatrix)
- param.m_matrix.Concat(*pMatrix);
+ param.m_matrix.Concat(matrix);
param.m_rtPart = rtTextBk;
if (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) {
@@ -174,7 +173,7 @@ void CFWL_ComboBox::DrawWidget(CXFA_Graphics* pGraphics,
theme_text.m_iPart = CFWL_Part::Caption;
theme_text.m_dwStates = m_iBtnState;
theme_text.m_pGraphics = pGraphics;
- theme_text.m_matrix.Concat(*pMatrix);
+ theme_text.m_matrix.Concat(matrix);
theme_text.m_rtPart = rtTextBk;
theme_text.m_dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused)
? CFWL_PartState_Selected
@@ -193,7 +192,7 @@ void CFWL_ComboBox::DrawWidget(CXFA_Graphics* pGraphics,
? CFWL_PartState_Disabled
: m_iBtnState;
param.m_pGraphics = pGraphics;
- param.m_matrix.Concat(*pMatrix);
+ param.m_matrix.Concat(matrix);
param.m_rtPart = m_rtBtn;
pTheme->DrawBackground(&param);
}
@@ -639,13 +638,13 @@ void CFWL_ComboBox::DisForm_DrawWidget(CXFA_Graphics* pGraphics,
CFX_RectF rtEdit = m_pEdit->GetWidgetRect();
CFX_Matrix mt(1, 0, 0, 1, rtEdit.left, rtEdit.top);
mt.Concat(mtOrg);
- m_pEdit->DrawWidget(pGraphics, &mt);
+ m_pEdit->DrawWidget(pGraphics, mt);
}
if (m_pListBox && DisForm_IsDropListVisible()) {
CFX_RectF rtList = m_pListBox->GetWidgetRect();
CFX_Matrix mt(1, 0, 0, 1, rtList.left, rtList.top);
mt.Concat(mtOrg);
- m_pListBox->DrawWidget(pGraphics, &mt);
+ m_pListBox->DrawWidget(pGraphics, mt);
}
}
@@ -757,8 +756,8 @@ void CFWL_ComboBox::OnProcessEvent(CFWL_Event* pEvent) {
}
void CFWL_ComboBox::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- DrawWidget(pGraphics, pMatrix);
+ const CFX_Matrix& matrix) {
+ DrawWidget(pGraphics, matrix);
}
void CFWL_ComboBox::OnFocusChanged(CFWL_Message* pMsg, bool bSet) {
diff --git a/xfa/fwl/cfwl_combobox.h b/xfa/fwl/cfwl_combobox.h
index 396aa6c9d5..0e1f815872 100644
--- a/xfa/fwl/cfwl_combobox.h
+++ b/xfa/fwl/cfwl_combobox.h
@@ -52,12 +52,12 @@ class CFWL_ComboBox : public CFWL_Widget {
void RemoveStates(uint32_t dwStates) override;
void Update() override;
FWL_WidgetHit HitTest(const CFX_PointF& point) override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnProcessEvent(CFWL_Event* pEvent) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
CFX_WideString GetTextByIndex(int32_t iIndex) const;
int32_t GetCurSel() const { return m_iCurSel; }
diff --git a/xfa/fwl/cfwl_comboboxproxy.cpp b/xfa/fwl/cfwl_comboboxproxy.cpp
index 28c403fb0a..d1db1c01a8 100644
--- a/xfa/fwl/cfwl_comboboxproxy.cpp
+++ b/xfa/fwl/cfwl_comboboxproxy.cpp
@@ -59,8 +59,8 @@ void CFWL_ComboBoxProxy::OnProcessMessage(CFWL_Message* pMessage) {
}
void CFWL_ComboBoxProxy::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- m_pComboBox->DrawStretchHandler(pGraphics, pMatrix);
+ const CFX_Matrix& matrix) {
+ m_pComboBox->DrawStretchHandler(pGraphics, &matrix);
}
void CFWL_ComboBoxProxy::OnLButtonDown(CFWL_Message* pMessage) {
diff --git a/xfa/fwl/cfwl_comboboxproxy.h b/xfa/fwl/cfwl_comboboxproxy.h
index 8282348657..bb21707851 100644
--- a/xfa/fwl/cfwl_comboboxproxy.h
+++ b/xfa/fwl/cfwl_comboboxproxy.h
@@ -24,7 +24,7 @@ class CFWL_ComboBoxProxy : public CFWL_FormProxy {
// CFWL_FormProxy
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
void Reset() { m_bLButtonUpSelf = false; }
diff --git a/xfa/fwl/cfwl_datetimepicker.cpp b/xfa/fwl/cfwl_datetimepicker.cpp
index 1a82a5c7ee..7383729ad4 100644
--- a/xfa/fwl/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/cfwl_datetimepicker.cpp
@@ -115,7 +115,7 @@ FWL_WidgetHit CFWL_DateTimePicker::HitTest(const CFX_PointF& point) {
}
void CFWL_DateTimePicker::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+ const CFX_Matrix& matrix) {
if (!pGraphics)
return;
if (!m_pProperties->m_pThemeProvider)
@@ -123,11 +123,11 @@ void CFWL_DateTimePicker::DrawWidget(CXFA_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
+ DrawBorder(pGraphics, CFWL_Part::Border, pTheme, matrix);
if (!m_rtBtn.IsEmpty())
- DrawDropDownButton(pGraphics, pTheme, pMatrix);
+ DrawDropDownButton(pGraphics, pTheme, &matrix);
if (m_pWidgetMgr->IsFormDisabled()) {
- DisForm_DrawWidget(pGraphics, pMatrix);
+ DisForm_DrawWidget(pGraphics, &matrix);
return;
}
}
@@ -453,7 +453,7 @@ void CFWL_DateTimePicker::DisForm_DrawWidget(CXFA_Graphics* pGraphics,
CFX_Matrix mt(1, 0, 0, 1, rtEdit.left, rtEdit.top);
if (pMatrix)
mt.Concat(*pMatrix);
- m_pEdit->DrawWidget(pGraphics, &mt);
+ m_pEdit->DrawWidget(pGraphics, mt);
}
if (!IsMonthCalendarVisible())
return;
@@ -462,7 +462,7 @@ void CFWL_DateTimePicker::DisForm_DrawWidget(CXFA_Graphics* pGraphics,
CFX_Matrix mt(1, 0, 0, 1, rtMonth.left, rtMonth.top);
if (pMatrix)
mt.Concat(*pMatrix);
- m_pMonthCal->DrawWidget(pGraphics, &mt);
+ m_pMonthCal->DrawWidget(pGraphics, mt);
}
void CFWL_DateTimePicker::OnProcessMessage(CFWL_Message* pMessage) {
@@ -511,8 +511,8 @@ void CFWL_DateTimePicker::OnProcessMessage(CFWL_Message* pMessage) {
}
void CFWL_DateTimePicker::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- DrawWidget(pGraphics, pMatrix);
+ const CFX_Matrix& matrix) {
+ DrawWidget(pGraphics, matrix);
}
void CFWL_DateTimePicker::OnFocusChanged(CFWL_Message* pMsg, bool bSet) {
diff --git a/xfa/fwl/cfwl_datetimepicker.h b/xfa/fwl/cfwl_datetimepicker.h
index 79e9cad9dd..fa7653ecf0 100644
--- a/xfa/fwl/cfwl_datetimepicker.h
+++ b/xfa/fwl/cfwl_datetimepicker.h
@@ -39,11 +39,11 @@ class CFWL_DateTimePicker : public CFWL_Widget {
FWL_Type GetClassID() const override;
void Update() override;
FWL_WidgetHit HitTest(const CFX_PointF& point) override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void SetThemeProvider(IFWL_ThemeProvider* pTP) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
void GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay);
void SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay);
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index 184329fcac..fc8b0fa888 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -239,8 +239,7 @@ void CFWL_Edit::DrawSpellCheck(CXFA_Graphics* pGraphics,
pGraphics->RestoreGraphState();
}
-void CFWL_Edit::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+void CFWL_Edit::DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) {
if (!pGraphics)
return;
if (!m_pProperties->m_pThemeProvider)
@@ -250,15 +249,15 @@ void CFWL_Edit::DrawWidget(CXFA_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
if (!m_pWidgetMgr->IsFormDisabled())
- DrawTextBk(pGraphics, pTheme, pMatrix);
- DrawContent(pGraphics, pTheme, pMatrix);
+ DrawTextBk(pGraphics, pTheme, &matrix);
+ DrawContent(pGraphics, pTheme, &matrix);
if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) &&
!(m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_ReadOnly)) {
- DrawSpellCheck(pGraphics, pMatrix);
+ DrawSpellCheck(pGraphics, &matrix);
}
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
+ DrawBorder(pGraphics, CFWL_Part::Border, pTheme, matrix);
}
void CFWL_Edit::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
@@ -1263,8 +1262,8 @@ void CFWL_Edit::OnProcessEvent(CFWL_Event* pEvent) {
}
void CFWL_Edit::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- DrawWidget(pGraphics, pMatrix);
+ const CFX_Matrix& matrix) {
+ DrawWidget(pGraphics, matrix);
}
void CFWL_Edit::DoButtonDown(CFWL_MessageMouse* pMsg) {
diff --git a/xfa/fwl/cfwl_edit.h b/xfa/fwl/cfwl_edit.h
index 9915f05c00..23d6158ee6 100644
--- a/xfa/fwl/cfwl_edit.h
+++ b/xfa/fwl/cfwl_edit.h
@@ -61,12 +61,12 @@ class CFWL_Edit : public CFWL_Widget {
void Update() override;
FWL_WidgetHit HitTest(const CFX_PointF& point) override;
void SetStates(uint32_t dwStates) override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnProcessEvent(CFWL_Event* pEvent) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
virtual void SetText(const CFX_WideString& wsText);
diff --git a/xfa/fwl/cfwl_form.cpp b/xfa/fwl/cfwl_form.cpp
index c560a0d352..5ab7a567ac 100644
--- a/xfa/fwl/cfwl_form.cpp
+++ b/xfa/fwl/cfwl_form.cpp
@@ -75,8 +75,7 @@ FWL_WidgetHit CFWL_Form::HitTest(const CFX_PointF& point) {
: FWL_WidgetHit::Client;
}
-void CFWL_Form::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+void CFWL_Form::DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) {
if (!pGraphics)
return;
if (!m_pProperties->m_pThemeProvider)
@@ -93,8 +92,7 @@ void CFWL_Form::DrawWidget(CXFA_Graphics* pGraphics,
param.m_dwStates = CFWL_PartState_Normal;
param.m_pGraphics = pGraphics;
param.m_rtPart = m_rtRelative;
- if (pMatrix)
- param.m_matrix.Concat(*pMatrix);
+ param.m_matrix.Concat(matrix);
if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_Border) {
param.m_iPart = CFWL_Part::Border;
pTheme->DrawBackground(&param);
@@ -240,8 +238,8 @@ void CFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {
}
void CFWL_Form::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- DrawWidget(pGraphics, pMatrix);
+ const CFX_Matrix& matrix) {
+ DrawWidget(pGraphics, matrix);
}
void CFWL_Form::OnLButtonDown(CFWL_MessageMouse* pMsg) {
diff --git a/xfa/fwl/cfwl_form.h b/xfa/fwl/cfwl_form.h
index 96452e8e33..78fee4b915 100644
--- a/xfa/fwl/cfwl_form.h
+++ b/xfa/fwl/cfwl_form.h
@@ -38,10 +38,10 @@ class CFWL_Form : public CFWL_Widget {
CFX_RectF GetClientRect() override;
void Update() override;
FWL_WidgetHit HitTest(const CFX_PointF& point) override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
CFWL_Widget* DoModal();
void EndDoModal();
diff --git a/xfa/fwl/cfwl_formproxy.cpp b/xfa/fwl/cfwl_formproxy.cpp
index af7703e9c0..123cf2509a 100644
--- a/xfa/fwl/cfwl_formproxy.cpp
+++ b/xfa/fwl/cfwl_formproxy.cpp
@@ -33,7 +33,7 @@ bool CFWL_FormProxy::IsInstance(const CFX_WideStringC& wsClass) const {
void CFWL_FormProxy::Update() {}
void CFWL_FormProxy::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {}
+ const CFX_Matrix& matrix) {}
void CFWL_FormProxy::OnProcessMessage(CFWL_Message* pMessage) {
m_pOuter->GetDelegate()->OnProcessMessage(pMessage);
diff --git a/xfa/fwl/cfwl_formproxy.h b/xfa/fwl/cfwl_formproxy.h
index dbc49d8f5e..630719505d 100644
--- a/xfa/fwl/cfwl_formproxy.h
+++ b/xfa/fwl/cfwl_formproxy.h
@@ -24,7 +24,7 @@ class CFWL_FormProxy : public CFWL_Form {
FWL_Type GetClassID() const override;
bool IsInstance(const CFX_WideStringC& wsClass) const override;
void Update() override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
};
diff --git a/xfa/fwl/cfwl_listbox.cpp b/xfa/fwl/cfwl_listbox.cpp
index d0455ff650..ce1c0133f9 100644
--- a/xfa/fwl/cfwl_listbox.cpp
+++ b/xfa/fwl/cfwl_listbox.cpp
@@ -91,7 +91,7 @@ FWL_WidgetHit CFWL_ListBox::HitTest(const CFX_PointF& point) {
}
void CFWL_ListBox::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+ const CFX_Matrix& matrix) {
if (!pGraphics)
return;
if (!m_pProperties->m_pThemeProvider)
@@ -100,21 +100,20 @@ void CFWL_ListBox::DrawWidget(CXFA_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
pGraphics->SaveGraphState();
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
+ DrawBorder(pGraphics, CFWL_Part::Border, pTheme, matrix);
CFX_RectF rtClip(m_rtConent);
if (IsShowScrollBar(false))
rtClip.height -= m_fScorllBarWidth;
if (IsShowScrollBar(true))
rtClip.width -= m_fScorllBarWidth;
- if (pMatrix)
- pMatrix->TransformRect(rtClip);
+ matrix.TransformRect(rtClip);
pGraphics->SetClipRect(rtClip);
if ((m_pProperties->m_dwStyles & FWL_WGTSTYLE_NoBackground) == 0)
- DrawBkground(pGraphics, pTheme, pMatrix);
+ DrawBkground(pGraphics, pTheme, &matrix);
- DrawItems(pGraphics, pTheme, pMatrix);
+ DrawItems(pGraphics, pTheme, &matrix);
pGraphics->RestoreGraphState();
}
@@ -714,8 +713,8 @@ void CFWL_ListBox::OnProcessEvent(CFWL_Event* pEvent) {
}
void CFWL_ListBox::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- DrawWidget(pGraphics, pMatrix);
+ const CFX_Matrix& matrix) {
+ DrawWidget(pGraphics, matrix);
}
void CFWL_ListBox::OnFocusChanged(CFWL_Message* pMsg, bool bSet) {
diff --git a/xfa/fwl/cfwl_listbox.h b/xfa/fwl/cfwl_listbox.h
index e98f21b464..4704a8a840 100644
--- a/xfa/fwl/cfwl_listbox.h
+++ b/xfa/fwl/cfwl_listbox.h
@@ -42,12 +42,12 @@ class CFWL_ListBox : public CFWL_Widget {
FWL_Type GetClassID() const override;
void Update() override;
FWL_WidgetHit HitTest(const CFX_PointF& point) override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnProcessEvent(CFWL_Event* pEvent) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
int32_t CountItems(const CFWL_Widget* pWidget) const;
CFWL_ListItem* GetItem(const CFWL_Widget* pWidget, int32_t nIndex) const;
diff --git a/xfa/fwl/cfwl_monthcalendar.cpp b/xfa/fwl/cfwl_monthcalendar.cpp
index 64e6977924..11712fefa4 100644
--- a/xfa/fwl/cfwl_monthcalendar.cpp
+++ b/xfa/fwl/cfwl_monthcalendar.cpp
@@ -147,7 +147,7 @@ void CFWL_MonthCalendar::Update() {
}
void CFWL_MonthCalendar::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+ const CFX_Matrix& matrix) {
if (!pGraphics)
return;
if (!m_pProperties->m_pThemeProvider)
@@ -155,20 +155,20 @@ void CFWL_MonthCalendar::DrawWidget(CXFA_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
-
- DrawBackground(pGraphics, pTheme, pMatrix);
- DrawHeadBK(pGraphics, pTheme, pMatrix);
- DrawLButton(pGraphics, pTheme, pMatrix);
- DrawRButton(pGraphics, pTheme, pMatrix);
- DrawSeperator(pGraphics, pTheme, pMatrix);
- DrawDatesInBK(pGraphics, pTheme, pMatrix);
- DrawDatesInCircle(pGraphics, pTheme, pMatrix);
- DrawCaption(pGraphics, pTheme, pMatrix);
- DrawWeek(pGraphics, pTheme, pMatrix);
- DrawDatesIn(pGraphics, pTheme, pMatrix);
- DrawDatesOut(pGraphics, pTheme, pMatrix);
- DrawToday(pGraphics, pTheme, pMatrix);
+ DrawBorder(pGraphics, CFWL_Part::Border, pTheme, matrix);
+
+ DrawBackground(pGraphics, pTheme, &matrix);
+ DrawHeadBK(pGraphics, pTheme, &matrix);
+ DrawLButton(pGraphics, pTheme, &matrix);
+ DrawRButton(pGraphics, pTheme, &matrix);
+ DrawSeperator(pGraphics, pTheme, &matrix);
+ DrawDatesInBK(pGraphics, pTheme, &matrix);
+ DrawDatesInCircle(pGraphics, pTheme, &matrix);
+ DrawCaption(pGraphics, pTheme, &matrix);
+ DrawWeek(pGraphics, pTheme, &matrix);
+ DrawDatesIn(pGraphics, pTheme, &matrix);
+ DrawDatesOut(pGraphics, pTheme, &matrix);
+ DrawToday(pGraphics, pTheme, &matrix);
}
void CFWL_MonthCalendar::SetSelect(int32_t iYear,
@@ -749,8 +749,8 @@ void CFWL_MonthCalendar::OnProcessMessage(CFWL_Message* pMessage) {
}
void CFWL_MonthCalendar::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- DrawWidget(pGraphics, pMatrix);
+ const CFX_Matrix& matrix) {
+ DrawWidget(pGraphics, matrix);
}
void CFWL_MonthCalendar::OnLButtonDown(CFWL_MessageMouse* pMsg) {
diff --git a/xfa/fwl/cfwl_monthcalendar.h b/xfa/fwl/cfwl_monthcalendar.h
index e537c331ef..6e0d4711f1 100644
--- a/xfa/fwl/cfwl_monthcalendar.h
+++ b/xfa/fwl/cfwl_monthcalendar.h
@@ -33,10 +33,10 @@ class CFWL_MonthCalendar : public CFWL_Widget {
FWL_Type GetClassID() const override;
CFX_RectF GetAutosizedWidgetRect() override;
void Update() override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
void SetSelect(int32_t iYear, int32_t iMonth, int32_t iDay);
diff --git a/xfa/fwl/cfwl_picturebox.cpp b/xfa/fwl/cfwl_picturebox.cpp
index 096b14ec61..637de94e7d 100644
--- a/xfa/fwl/cfwl_picturebox.cpp
+++ b/xfa/fwl/cfwl_picturebox.cpp
@@ -33,7 +33,7 @@ void CFWL_PictureBox::Update() {
}
void CFWL_PictureBox::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+ const CFX_Matrix& matrix) {
if (!pGraphics)
return;
if (!m_pProperties->m_pThemeProvider)
@@ -41,10 +41,10 @@ void CFWL_PictureBox::DrawWidget(CXFA_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme = GetAvailableTheme();
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
+ DrawBorder(pGraphics, CFWL_Part::Border, pTheme, matrix);
}
void CFWL_PictureBox::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- DrawWidget(pGraphics, pMatrix);
+ const CFX_Matrix& matrix) {
+ DrawWidget(pGraphics, matrix);
}
diff --git a/xfa/fwl/cfwl_picturebox.h b/xfa/fwl/cfwl_picturebox.h
index e244c853b8..363db8a291 100644
--- a/xfa/fwl/cfwl_picturebox.h
+++ b/xfa/fwl/cfwl_picturebox.h
@@ -23,9 +23,9 @@ class CFWL_PictureBox : public CFWL_Widget {
// CFWL_Widget
FWL_Type GetClassID() const override;
void Update() override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
private:
CFX_RectF m_rtClient;
diff --git a/xfa/fwl/cfwl_pushbutton.cpp b/xfa/fwl/cfwl_pushbutton.cpp
index 1dfe2db2fd..a912108278 100644
--- a/xfa/fwl/cfwl_pushbutton.cpp
+++ b/xfa/fwl/cfwl_pushbutton.cpp
@@ -49,7 +49,7 @@ void CFWL_PushButton::Update() {
}
void CFWL_PushButton::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+ const CFX_Matrix& matrix) {
if (!pGraphics)
return;
if (!m_pProperties->m_pThemeProvider)
@@ -57,9 +57,9 @@ void CFWL_PushButton::DrawWidget(CXFA_Graphics* pGraphics,
if (HasBorder()) {
DrawBorder(pGraphics, CFWL_Part::Border, m_pProperties->m_pThemeProvider,
- pMatrix);
+ matrix);
}
- DrawBkground(pGraphics, m_pProperties->m_pThemeProvider, pMatrix);
+ DrawBkground(pGraphics, m_pProperties->m_pThemeProvider, &matrix);
}
void CFWL_PushButton::DrawBkground(CXFA_Graphics* pGraphics,
@@ -137,8 +137,8 @@ void CFWL_PushButton::OnProcessMessage(CFWL_Message* pMessage) {
}
void CFWL_PushButton::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- DrawWidget(pGraphics, pMatrix);
+ const CFX_Matrix& matrix) {
+ DrawWidget(pGraphics, matrix);
}
void CFWL_PushButton::OnFocusChanged(CFWL_Message* pMsg, bool bSet) {
diff --git a/xfa/fwl/cfwl_pushbutton.h b/xfa/fwl/cfwl_pushbutton.h
index 84019ba181..5c509fb503 100644
--- a/xfa/fwl/cfwl_pushbutton.h
+++ b/xfa/fwl/cfwl_pushbutton.h
@@ -28,10 +28,10 @@ class CFWL_PushButton : public CFWL_Widget {
FWL_Type GetClassID() const override;
void SetStates(uint32_t dwStates) override;
void Update() override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
private:
void DrawBkground(CXFA_Graphics* pGraphics,
diff --git a/xfa/fwl/cfwl_scrollbar.cpp b/xfa/fwl/cfwl_scrollbar.cpp
index 0e1a9be1ba..f723124e86 100644
--- a/xfa/fwl/cfwl_scrollbar.cpp
+++ b/xfa/fwl/cfwl_scrollbar.cpp
@@ -75,7 +75,7 @@ void CFWL_ScrollBar::Update() {
}
void CFWL_ScrollBar::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+ const CFX_Matrix& matrix) {
if (!pGraphics)
return;
if (!m_pProperties->m_pThemeProvider)
@@ -83,12 +83,12 @@ void CFWL_ScrollBar::DrawWidget(CXFA_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
- DrawTrack(pGraphics, pTheme, true, pMatrix);
- DrawTrack(pGraphics, pTheme, false, pMatrix);
- DrawArrowBtn(pGraphics, pTheme, true, pMatrix);
- DrawArrowBtn(pGraphics, pTheme, false, pMatrix);
- DrawThumb(pGraphics, pTheme, pMatrix);
+ DrawBorder(pGraphics, CFWL_Part::Border, pTheme, matrix);
+ DrawTrack(pGraphics, pTheme, true, &matrix);
+ DrawTrack(pGraphics, pTheme, false, &matrix);
+ DrawArrowBtn(pGraphics, pTheme, true, &matrix);
+ DrawArrowBtn(pGraphics, pTheme, false, &matrix);
+ DrawThumb(pGraphics, pTheme, &matrix);
}
void CFWL_ScrollBar::SetTrackPos(float fTrackPos) {
@@ -356,8 +356,8 @@ void CFWL_ScrollBar::OnProcessMessage(CFWL_Message* pMessage) {
}
void CFWL_ScrollBar::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- DrawWidget(pGraphics, pMatrix);
+ const CFX_Matrix& matrix) {
+ DrawWidget(pGraphics, matrix);
}
void CFWL_ScrollBar::OnLButtonDown(const CFX_PointF& point) {
diff --git a/xfa/fwl/cfwl_scrollbar.h b/xfa/fwl/cfwl_scrollbar.h
index 368dee96fe..b2523a6e15 100644
--- a/xfa/fwl/cfwl_scrollbar.h
+++ b/xfa/fwl/cfwl_scrollbar.h
@@ -30,10 +30,10 @@ class CFWL_ScrollBar : public CFWL_Widget {
// CFWL_Widget
FWL_Type GetClassID() const override;
void Update() override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
void GetRange(float* fMin, float* fMax) const {
ASSERT(fMin);
diff --git a/xfa/fwl/cfwl_spinbutton.cpp b/xfa/fwl/cfwl_spinbutton.cpp
index 2943c205d7..3119c7517a 100644
--- a/xfa/fwl/cfwl_spinbutton.cpp
+++ b/xfa/fwl/cfwl_spinbutton.cpp
@@ -79,20 +79,19 @@ FWL_WidgetHit CFWL_SpinButton::HitTest(const CFX_PointF& point) {
}
void CFWL_SpinButton::DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+ const CFX_Matrix& matrix) {
if (!pGraphics)
return;
CFX_RectF rtClip(m_rtClient);
- if (pMatrix)
- pMatrix->TransformRect(rtClip);
+ matrix.TransformRect(rtClip);
IFWL_ThemeProvider* pTheme = GetAvailableTheme();
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
+ DrawBorder(pGraphics, CFWL_Part::Border, pTheme, matrix);
- DrawUpButton(pGraphics, pTheme, pMatrix);
- DrawDownButton(pGraphics, pTheme, pMatrix);
+ DrawUpButton(pGraphics, pTheme, &matrix);
+ DrawDownButton(pGraphics, pTheme, &matrix);
}
void CFWL_SpinButton::DisableButton() {
@@ -183,8 +182,8 @@ void CFWL_SpinButton::OnProcessMessage(CFWL_Message* pMessage) {
}
void CFWL_SpinButton::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- DrawWidget(pGraphics, pMatrix);
+ const CFX_Matrix& matrix) {
+ DrawWidget(pGraphics, matrix);
}
void CFWL_SpinButton::OnFocusChanged(CFWL_Message* pMsg, bool bSet) {
diff --git a/xfa/fwl/cfwl_spinbutton.h b/xfa/fwl/cfwl_spinbutton.h
index 2dcb8483f2..2ebabb1799 100644
--- a/xfa/fwl/cfwl_spinbutton.h
+++ b/xfa/fwl/cfwl_spinbutton.h
@@ -28,10 +28,10 @@ class CFWL_SpinButton : public CFWL_Widget {
FWL_Type GetClassID() const override;
void Update() override;
FWL_WidgetHit HitTest(const CFX_PointF& point) override;
- void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
+ void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
private:
class Timer : public CFWL_Timer {
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp
index 8b8bf5d3cd..9071f0fb0e 100644
--- a/xfa/fwl/cfwl_widget.cpp
+++ b/xfa/fwl/cfwl_widget.cpp
@@ -538,13 +538,12 @@ void CFWL_Widget::DrawBackground(CXFA_Graphics* pGraphics,
void CFWL_Widget::DrawBorder(CXFA_Graphics* pGraphics,
CFWL_Part iPartBorder,
IFWL_ThemeProvider* pTheme,
- const CFX_Matrix* pMatrix) {
+ const CFX_Matrix& matrix) {
CFWL_ThemeBackground param;
param.m_pWidget = this;
param.m_iPart = iPartBorder;
param.m_pGraphics = pGraphics;
- if (pMatrix)
- param.m_matrix.Concat(*pMatrix, true);
+ param.m_matrix.Concat(matrix, true);
param.m_rtPart = GetRelativeRect();
pTheme->DrawBackground(&param);
}
@@ -614,4 +613,4 @@ void CFWL_Widget::OnProcessMessage(CFWL_Message* pMessage) {
void CFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {}
void CFWL_Widget::OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {}
+ const CFX_Matrix& matrix) {}
diff --git a/xfa/fwl/cfwl_widget.h b/xfa/fwl/cfwl_widget.h
index 11b3569dbd..3111e9e1b0 100644
--- a/xfa/fwl/cfwl_widget.h
+++ b/xfa/fwl/cfwl_widget.h
@@ -65,14 +65,14 @@ class CFWL_Widget : public IFWL_WidgetDelegate {
virtual void Update() = 0;
virtual FWL_WidgetHit HitTest(const CFX_PointF& point);
virtual void DrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) = 0;
+ const CFX_Matrix& matrix) = 0;
virtual void SetThemeProvider(IFWL_ThemeProvider* pThemeProvider);
// IFWL_WidgetDelegate.
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnProcessEvent(CFWL_Event* pEvent) override;
void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix& matrix) override;
void InflateWidgetRect(CFX_RectF& rect);
void SetWidgetRect(const CFX_RectF& rect);
@@ -147,7 +147,7 @@ class CFWL_Widget : public IFWL_WidgetDelegate {
void DrawBorder(CXFA_Graphics* pGraphics,
CFWL_Part iPartBorder,
IFWL_ThemeProvider* pTheme,
- const CFX_Matrix* pMatrix);
+ const CFX_Matrix& pMatrix);
CFX_UnownedPtr<const CFWL_App> const m_pOwnerApp;
CFX_UnownedPtr<CFWL_WidgetMgr> const m_pWidgetMgr;
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp
index d5b496a04b..f5beb411e6 100644
--- a/xfa/fwl/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/cfwl_widgetmgr.cpp
@@ -419,7 +419,7 @@ void CFWL_WidgetMgr::OnProcessMessageToForm(CFWL_Message* pMessage) {
void CFWL_WidgetMgr::OnDrawWidget(CFWL_Widget* pWidget,
CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+ const CFX_Matrix& matrix) {
if (!pWidget || !pGraphics)
return;
@@ -430,22 +430,24 @@ void CFWL_WidgetMgr::OnDrawWidget(CFWL_Widget* pWidget,
if (IsFormDisabled()) {
#endif // _FX_OS_ == _FX_MACOSX_
- pWidget->GetDelegate()->OnDrawWidget(pGraphics, pMatrix);
+ pWidget->GetDelegate()->OnDrawWidget(pGraphics, matrix);
clipBounds = pGraphics->GetClipRect();
clipCopy = clipBounds;
#if _FX_OS_ == _FX_MACOSX_
} else {
- clipBounds = CFX_RectF(pMatrix->a, pMatrix->b, pMatrix->c, pMatrix->d);
- const_cast<CFX_Matrix*>(pMatrix)->SetIdentity(); // FIXME: const cast.
- pWidget->GetDelegate()->OnDrawWidget(pGraphics, pMatrix);
+ clipBounds = CFX_RectF(matrix.a, matrix.b, matrix.c, matrix.d);
+ // FIXME: const cast
+ CFX_Matrix* pMatrixHack = const_cast<CFX_Matrix*>(&matrix);
+ pMatrixHack->SetIdentity();
+ pWidget->GetDelegate()->OnDrawWidget(pGraphics, *pMatrixHack);
}
#endif // _FX_OS_ == _FX_MACOSX_
if (!IsFormDisabled())
clipBounds.Intersect(pWidget->GetClientRect());
if (!clipBounds.IsEmpty())
- DrawChild(pWidget, clipBounds, pGraphics, pMatrix);
+ DrawChild(pWidget, clipBounds, pGraphics, &matrix);
GetWidgetMgrItem(pWidget)->iRedrawCounter = 0;
ResetRedrawCounts(pWidget);
@@ -492,7 +494,7 @@ void CFWL_WidgetMgr::DrawChild(CFWL_Widget* parent,
if (IFWL_WidgetDelegate* pDelegate = child->GetDelegate()) {
if (IsFormDisabled() || IsNeedRepaint(child, &widgetMatrix, rtClip))
- pDelegate->OnDrawWidget(pGraphics, &widgetMatrix);
+ pDelegate->OnDrawWidget(pGraphics, widgetMatrix);
}
if (!bFormDisable)
pGraphics->RestoreGraphState();
diff --git a/xfa/fwl/cfwl_widgetmgr.h b/xfa/fwl/cfwl_widgetmgr.h
index 9ea2238c4f..f633ba8706 100644
--- a/xfa/fwl/cfwl_widgetmgr.h
+++ b/xfa/fwl/cfwl_widgetmgr.h
@@ -32,7 +32,7 @@ class CFWL_WidgetMgr {
void OnProcessMessageToForm(CFWL_Message* pMessage);
void OnDrawWidget(CFWL_Widget* pWidget,
CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix);
+ const CFX_Matrix& matrix);
CFWL_Widget* GetParentWidget(CFWL_Widget* pWidget) const;
CFWL_Widget* GetOwnerWidget(CFWL_Widget* pWidget) const;
diff --git a/xfa/fwl/ifwl_widgetdelegate.h b/xfa/fwl/ifwl_widgetdelegate.h
index 8dee6da7a9..09bac9ab4e 100644
--- a/xfa/fwl/ifwl_widgetdelegate.h
+++ b/xfa/fwl/ifwl_widgetdelegate.h
@@ -21,7 +21,7 @@ class IFWL_WidgetDelegate {
virtual void OnProcessMessage(CFWL_Message* pMessage) = 0;
virtual void OnProcessEvent(CFWL_Event* pEvent) = 0;
virtual void OnDrawWidget(CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) = 0;
+ const CFX_Matrix& matrix) = 0;
};
#endif // XFA_FWL_IFWL_WIDGETDELEGATE_H_