diff options
Diffstat (limited to 'xfa/fwl/theme')
-rw-r--r-- | xfa/fwl/theme/cfwl_barcodetp.cpp | 11 | ||||
-rw-r--r-- | xfa/fwl/theme/cfwl_carettp.cpp | 6 | ||||
-rw-r--r-- | xfa/fwl/theme/cfwl_checkboxtp.cpp | 4 | ||||
-rw-r--r-- | xfa/fwl/theme/cfwl_comboboxtp.cpp | 5 | ||||
-rw-r--r-- | xfa/fwl/theme/cfwl_datetimepickertp.cpp | 11 | ||||
-rw-r--r-- | xfa/fwl/theme/cfwl_edittp.cpp | 13 | ||||
-rw-r--r-- | xfa/fwl/theme/cfwl_listboxtp.cpp | 11 | ||||
-rw-r--r-- | xfa/fwl/theme/cfwl_monthcalendartp.cpp | 7 | ||||
-rw-r--r-- | xfa/fwl/theme/cfwl_pictureboxtp.cpp | 6 | ||||
-rw-r--r-- | xfa/fwl/theme/cfwl_pushbuttontp.cpp | 5 | ||||
-rw-r--r-- | xfa/fwl/theme/cfwl_scrollbartp.cpp | 2 |
11 files changed, 43 insertions, 38 deletions
diff --git a/xfa/fwl/theme/cfwl_barcodetp.cpp b/xfa/fwl/theme/cfwl_barcodetp.cpp index cafdf17933..52e0c9fa5b 100644 --- a/xfa/fwl/theme/cfwl_barcodetp.cpp +++ b/xfa/fwl/theme/cfwl_barcodetp.cpp @@ -19,15 +19,14 @@ void CFWL_BarcodeTP::DrawBackground(CFWL_ThemeBackground* pParams) { return; switch (pParams->m_iPart) { - case CFWL_Part::Border: { - DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); + case CFWL_Part::Border: + DrawBorder(pParams->m_pGraphics.Get(), &pParams->m_rtPart, + &pParams->m_matrix); break; - } - case CFWL_Part::Background: { - FillBackground(pParams->m_pGraphics, &pParams->m_rtPart, + case CFWL_Part::Background: + FillBackground(pParams->m_pGraphics.Get(), &pParams->m_rtPart, &pParams->m_matrix); break; - } default: break; } diff --git a/xfa/fwl/theme/cfwl_carettp.cpp b/xfa/fwl/theme/cfwl_carettp.cpp index 973531958a..186d658041 100644 --- a/xfa/fwl/theme/cfwl_carettp.cpp +++ b/xfa/fwl/theme/cfwl_carettp.cpp @@ -24,9 +24,9 @@ void CFWL_CaretTP::DrawBackground(CFWL_ThemeBackground* pParams) { if (!(pParams->m_dwStates & CFWL_PartState_HightLight)) return; - DrawCaretBK(pParams->m_pGraphics, pParams->m_dwStates, - &(pParams->m_rtPart), (CXFA_GEColor*)pParams->m_pData, - &(pParams->m_matrix)); + DrawCaretBK( + pParams->m_pGraphics.Get(), pParams->m_dwStates, &pParams->m_rtPart, + static_cast<CXFA_GEColor*>(pParams->m_pData), &pParams->m_matrix); break; } default: diff --git a/xfa/fwl/theme/cfwl_checkboxtp.cpp b/xfa/fwl/theme/cfwl_checkboxtp.cpp index a4e474b4f1..f54f93f351 100644 --- a/xfa/fwl/theme/cfwl_checkboxtp.cpp +++ b/xfa/fwl/theme/cfwl_checkboxtp.cpp @@ -270,8 +270,8 @@ void CFWL_CheckBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) { if ((pParams->m_dwStates & CFWL_PartState_Checked) || (pParams->m_dwStates & CFWL_PartState_Neutral)) { - DrawCheckSign(pParams->m_pWidget, pParams->m_pGraphics, pParams->m_rtPart, - pParams->m_dwStates, &pParams->m_matrix); + DrawCheckSign(pParams->m_pWidget, pParams->m_pGraphics.Get(), + pParams->m_rtPart, pParams->m_dwStates, &pParams->m_matrix); } } diff --git a/xfa/fwl/theme/cfwl_comboboxtp.cpp b/xfa/fwl/theme/cfwl_comboboxtp.cpp index 76953423e6..8c35e56713 100644 --- a/xfa/fwl/theme/cfwl_comboboxtp.cpp +++ b/xfa/fwl/theme/cfwl_comboboxtp.cpp @@ -23,7 +23,8 @@ void CFWL_ComboBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) { switch (pParams->m_iPart) { case CFWL_Part::Border: { - DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); + DrawBorder(pParams->m_pGraphics.Get(), &pParams->m_rtPart, + &pParams->m_matrix); break; } case CFWL_Part::Background: { @@ -95,6 +96,6 @@ void CFWL_ComboBoxTP::DrawDropDownButton(CFWL_ThemeBackground* pParams, default: break; } - DrawArrowBtn(pParams->m_pGraphics, &pParams->m_rtPart, + DrawArrowBtn(pParams->m_pGraphics.Get(), &pParams->m_rtPart, FWLTHEME_DIRECTION_Down, eState, &pParams->m_matrix); } diff --git a/xfa/fwl/theme/cfwl_datetimepickertp.cpp b/xfa/fwl/theme/cfwl_datetimepickertp.cpp index 8902ef9351..d13d4c7548 100644 --- a/xfa/fwl/theme/cfwl_datetimepickertp.cpp +++ b/xfa/fwl/theme/cfwl_datetimepickertp.cpp @@ -18,14 +18,13 @@ void CFWL_DateTimePickerTP::DrawBackground(CFWL_ThemeBackground* pParams) { return; switch (pParams->m_iPart) { - case CFWL_Part::Border: { - DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); + case CFWL_Part::Border: + DrawBorder(pParams->m_pGraphics.Get(), &pParams->m_rtPart, + &pParams->m_matrix); break; - } - case CFWL_Part::DropDownButton: { + case CFWL_Part::DropDownButton: DrawDropDownButton(pParams, &pParams->m_matrix); break; - } default: break; } @@ -56,7 +55,7 @@ void CFWL_DateTimePickerTP::DrawDropDownButton(CFWL_ThemeBackground* pParams, default: break; } - DrawArrowBtn(pParams->m_pGraphics, &pParams->m_rtPart, + DrawArrowBtn(pParams->m_pGraphics.Get(), &pParams->m_rtPart, FWLTHEME_DIRECTION_Down, eState, pMatrix); } diff --git a/xfa/fwl/theme/cfwl_edittp.cpp b/xfa/fwl/theme/cfwl_edittp.cpp index 700d78131f..eb1f24e14e 100644 --- a/xfa/fwl/theme/cfwl_edittp.cpp +++ b/xfa/fwl/theme/cfwl_edittp.cpp @@ -37,21 +37,23 @@ void CFWL_EditTP::DrawBackground(CFWL_ThemeBackground* pParams) { } pParams->m_pGraphics->SetStrokeColor(CXFA_GEColor(cr)); pParams->m_pGraphics->SetLineWidth(fWidth); - pParams->m_pGraphics->StrokePath(pParams->m_pPath, &pParams->m_matrix); + pParams->m_pGraphics->StrokePath(pParams->m_pPath.Get(), + &pParams->m_matrix); return; } switch (pParams->m_iPart) { case CFWL_Part::Border: { - DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); + DrawBorder(pParams->m_pGraphics.Get(), &pParams->m_rtPart, + &pParams->m_matrix); break; } case CFWL_Part::Background: { if (pParams->m_pPath) { - CXFA_Graphics* pGraphics = pParams->m_pGraphics; + CXFA_Graphics* pGraphics = pParams->m_pGraphics.Get(); pGraphics->SaveGraphState(); pGraphics->SetFillColor(CXFA_GEColor(FWLTHEME_COLOR_BKSelected)); - pGraphics->FillPath(pParams->m_pPath, FXFILL_WINDING, + pGraphics->FillPath(pParams->m_pPath.Get(), FXFILL_WINDING, &pParams->m_matrix); pGraphics->RestoreGraphState(); } else { @@ -78,7 +80,8 @@ void CFWL_EditTP::DrawBackground(CFWL_ThemeBackground* pParams) { case CFWL_Part::CombTextLine: { pParams->m_pGraphics->SetStrokeColor(CXFA_GEColor(0xFF000000)); pParams->m_pGraphics->SetLineWidth(1.0f); - pParams->m_pGraphics->StrokePath(pParams->m_pPath, &pParams->m_matrix); + pParams->m_pGraphics->StrokePath(pParams->m_pPath.Get(), + &pParams->m_matrix); break; } default: diff --git a/xfa/fwl/theme/cfwl_listboxtp.cpp b/xfa/fwl/theme/cfwl_listboxtp.cpp index 6c495b4c81..9b8cd0dc7a 100644 --- a/xfa/fwl/theme/cfwl_listboxtp.cpp +++ b/xfa/fwl/theme/cfwl_listboxtp.cpp @@ -22,21 +22,22 @@ void CFWL_ListBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) { switch (pParams->m_iPart) { case CFWL_Part::Border: { - DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); + DrawBorder(pParams->m_pGraphics.Get(), &pParams->m_rtPart, + &pParams->m_matrix); break; } case CFWL_Part::Background: { - FillSolidRect(pParams->m_pGraphics, ArgbEncode(255, 255, 255, 255), + FillSolidRect(pParams->m_pGraphics.Get(), ArgbEncode(255, 255, 255, 255), &pParams->m_rtPart, &pParams->m_matrix); if (pParams->m_pData) { - FillSolidRect(pParams->m_pGraphics, FWLTHEME_COLOR_Background, + FillSolidRect(pParams->m_pGraphics.Get(), FWLTHEME_COLOR_Background, static_cast<CFX_RectF*>(pParams->m_pData), &pParams->m_matrix); } break; } case CFWL_Part::ListItem: { - DrawListBoxItem(pParams->m_pGraphics, pParams->m_dwStates, + DrawListBoxItem(pParams->m_pGraphics.Get(), pParams->m_dwStates, &pParams->m_rtPart, pParams->m_pData, &pParams->m_matrix); break; } @@ -47,7 +48,7 @@ void CFWL_ListBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) { } else if (pParams->m_dwStates == CFWL_PartState_Normal) { color = 0xFF0000FF; } - FillSolidRect(pParams->m_pGraphics, color, &pParams->m_rtPart, + FillSolidRect(pParams->m_pGraphics.Get(), color, &pParams->m_rtPart, &pParams->m_matrix); break; } diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.cpp b/xfa/fwl/theme/cfwl_monthcalendartp.cpp index 6bb3f186b7..c17451d1ae 100644 --- a/xfa/fwl/theme/cfwl_monthcalendartp.cpp +++ b/xfa/fwl/theme/cfwl_monthcalendartp.cpp @@ -37,7 +37,8 @@ void CFWL_MonthCalendarTP::DrawBackground(CFWL_ThemeBackground* pParams) { switch (pParams->m_iPart) { case CFWL_Part::Border: { - DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); + DrawBorder(pParams->m_pGraphics.Get(), &pParams->m_rtPart, + &pParams->m_matrix); break; } case CFWL_Part::Background: { @@ -50,13 +51,13 @@ void CFWL_MonthCalendarTP::DrawBackground(CFWL_ThemeBackground* pParams) { } case CFWL_Part::LBtn: { FWLTHEME_STATE eState = GetState(pParams->m_dwStates); - DrawArrowBtn(pParams->m_pGraphics, &pParams->m_rtPart, + DrawArrowBtn(pParams->m_pGraphics.Get(), &pParams->m_rtPart, FWLTHEME_DIRECTION_Left, eState, &pParams->m_matrix); break; } case CFWL_Part::RBtn: { FWLTHEME_STATE eState = GetState(pParams->m_dwStates); - DrawArrowBtn(pParams->m_pGraphics, &pParams->m_rtPart, + DrawArrowBtn(pParams->m_pGraphics.Get(), &pParams->m_rtPart, FWLTHEME_DIRECTION_Right, eState, &pParams->m_matrix); break; } diff --git a/xfa/fwl/theme/cfwl_pictureboxtp.cpp b/xfa/fwl/theme/cfwl_pictureboxtp.cpp index 27abbe27e3..6a30113cf7 100644 --- a/xfa/fwl/theme/cfwl_pictureboxtp.cpp +++ b/xfa/fwl/theme/cfwl_pictureboxtp.cpp @@ -19,10 +19,10 @@ void CFWL_PictureBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) { return; switch (pParams->m_iPart) { - case CFWL_Part::Border: { - DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); + case CFWL_Part::Border: + DrawBorder(pParams->m_pGraphics.Get(), &pParams->m_rtPart, + &pParams->m_matrix); break; - } default: break; } diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.cpp b/xfa/fwl/theme/cfwl_pushbuttontp.cpp index c3eef0f11f..dbd6800ba2 100644 --- a/xfa/fwl/theme/cfwl_pushbuttontp.cpp +++ b/xfa/fwl/theme/cfwl_pushbuttontp.cpp @@ -24,7 +24,8 @@ CFWL_PushButtonTP::~CFWL_PushButtonTP() {} void CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground* pParams) { switch (pParams->m_iPart) { case CFWL_Part::Border: { - DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); + DrawBorder(pParams->m_pGraphics.Get(), &pParams->m_rtPart, + &pParams->m_matrix); break; } case CFWL_Part::Background: { @@ -51,7 +52,7 @@ void CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground* pParams) { CXFA_GEPath fillPath; fillPath.AddSubpath(&strokePath); - CXFA_Graphics* pGraphics = pParams->m_pGraphics; + CXFA_Graphics* pGraphics = pParams->m_pGraphics.Get(); pGraphics->SaveGraphState(); CFX_RectF rtInner(rect); diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp index 1e9ade8c76..0f383e64b0 100644 --- a/xfa/fwl/theme/cfwl_scrollbartp.cpp +++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp @@ -38,7 +38,7 @@ void CFWL_ScrollBarTP::DrawBackground(CFWL_ThemeBackground* pParams) { else if (pParams->m_dwStates & CFWL_PartState_Disabled) eState = FWLTHEME_STATE_Disable; - CXFA_Graphics* pGraphics = pParams->m_pGraphics; + CXFA_Graphics* pGraphics = pParams->m_pGraphics.Get(); CFX_RectF* pRect = &pParams->m_rtPart; bool bVert = !!pWidget->GetStylesEx(); switch (pParams->m_iPart) { |