diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-11-02 09:54:54 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-11-02 09:54:54 -0800 |
commit | 3343d146f2d9cd2f9eaa3a40fed3a5b94f3f107e (patch) | |
tree | ab220ffcea223cacd136054603c63324a1d9d5f4 /xfa/src/fwl | |
parent | 1b700c3c452429dacde3c163a6edb2706f93d4a7 (diff) | |
download | pdfium-3343d146f2d9cd2f9eaa3a40fed3a5b94f3f107e.tar.xz |
Fix XFA compilation noise, part 1.
Mainly:
volatile/override/method shadowing.
unused variables.
intialization list init order.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1422113003 .
Diffstat (limited to 'xfa/src/fwl')
-rw-r--r-- | xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp | 17 | ||||
-rw-r--r-- | xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp | 18 | ||||
-rw-r--r-- | xfa/src/fwl/src/basewidget/fwl_editimp.cpp | 26 | ||||
-rw-r--r-- | xfa/src/fwl/src/basewidget/fwl_listboximp.cpp | 10 | ||||
-rw-r--r-- | xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp | 20 | ||||
-rw-r--r-- | xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp | 8 | ||||
-rw-r--r-- | xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp | 4 | ||||
-rw-r--r-- | xfa/src/fwl/src/basewidget/include/fwl_editimp.h | 29 | ||||
-rw-r--r-- | xfa/src/fwl/src/basewidget/include/fwl_scrollbarimp.h | 1 | ||||
-rw-r--r-- | xfa/src/fwl/src/core/fwl_formimp.cpp | 2 | ||||
-rw-r--r-- | xfa/src/fwl/src/core/fwl_noteimp.cpp | 10 | ||||
-rw-r--r-- | xfa/src/fwl/src/core/fwl_threadimp.cpp | 4 | ||||
-rw-r--r-- | xfa/src/fwl/src/core/include/fwl_noteimp.h | 2 | ||||
-rw-r--r-- | xfa/src/fwl/src/theme/formtp.cpp | 1 | ||||
-rw-r--r-- | xfa/src/fwl/src/theme/pushbuttontp.cpp | 1 | ||||
-rw-r--r-- | xfa/src/fwl/src/theme/scrollbartp.cpp | 1 | ||||
-rw-r--r-- | xfa/src/fwl/src/theme/widgettp.cpp | 3 |
17 files changed, 65 insertions, 92 deletions
diff --git a/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp b/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp index 64e9b40c11..a170618950 100644 --- a/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp +++ b/xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp @@ -430,7 +430,7 @@ int32_t CFWL_ComboListDelegate::OnDropListKey(CFWL_MsgKey* pKey) { case FWL_VKEY_Up:
case FWL_VKEY_Down: {
OnDropListKeyDown(pKey);
- IFWL_WidgetDelegate* pDelegate = pOuter->SetDelegate(NULL);
+ pOuter->SetDelegate(nullptr);
pOuter->ProcessSelChanged(FALSE);
return 1;
}
@@ -946,7 +946,6 @@ void CFWL_ComboBoxImp::ShowDropList(FX_BOOL bActivate) { rtAnchor.Set(0, 0, m_pProperties->m_rtWidget.width,
m_pProperties->m_rtWidget.height);
FX_FLOAT fMinHeight = 0;
- FX_FLOAT fMaxHeight = m_rtList.height;
if (m_rtList.width < m_rtClient.width) {
m_rtList.width = m_rtClient.width;
}
@@ -1224,8 +1223,6 @@ void CFWL_ComboBoxImp::DisForm_ShowDropList(FX_BOOL bActivate) { pComboList->ChangeSelected(m_iCurSel);
FX_FLOAT fItemHeight = pComboList->GetItemHeigt();
FX_FLOAT fBorder = GetBorderSize();
- FX_DWORD nWhere = 0;
- FX_FLOAT fPopupRet = 0.0f;
FX_FLOAT fPopupMin = 0.0f;
if (iItems > 3) {
fPopupMin = fItemHeight * 3 + fBorder * 2;
@@ -1688,9 +1685,6 @@ void CFWL_ComboBoxImpDelegate::DisForm_OnLButtonDown(CFWL_MsgMouse* pMsg) { }
void CFWL_ComboBoxImpDelegate::DisForm_OnFocusChanged(CFWL_Message* pMsg,
FX_BOOL bSet) {
- IFWL_Target* pDstTarget = pMsg->m_pDstTarget;
- IFWL_Target* pSrcTarget = pMsg->m_pSrcTarget;
- FX_BOOL bDropDown = m_pOwner->IsDropDownStyle();
if (bSet) {
m_pOwner->m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused;
if ((m_pOwner->m_pEdit->GetStates() & FWL_WGTSTATE_Focused) == 0) {
@@ -1759,11 +1753,12 @@ void CFWL_ComboBoxImpDelegate::DisForm_OnKey(CFWL_MsgKey* pMsg) { CFWL_ComboProxyImpDelegate::CFWL_ComboProxyImpDelegate(
IFWL_Form* pForm,
CFWL_ComboBoxImp* pComboBox)
- : m_pForm(pForm),
- m_pComboBox(pComboBox),
- m_bLButtonDown(FALSE),
+ : m_bLButtonDown(FALSE),
m_bLButtonUpSelf(FALSE),
- m_fStartPos(0) {}
+ m_fStartPos(0),
+ m_pForm(pForm),
+ m_pComboBox(pComboBox) {
+}
int32_t CFWL_ComboProxyImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
_FWL_RETURN_VALUE_IF_FAIL(pMessage, 0);
FX_DWORD dwMsgCode = pMessage->GetClassID();
diff --git a/xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp b/xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp index 866dc492aa..f09f74bd20 100644 --- a/xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp +++ b/xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp @@ -405,28 +405,28 @@ void CFWL_DateTimeCalendarDelegate::DisForm_OnLButtonUpEx(CFWL_MsgMouse* pMsg) { }
CFWL_DateTimePickerImp::CFWL_DateTimePickerImp(IFWL_Widget* pOuter)
: CFWL_WidgetImp(pOuter),
- m_bLBtnDown(FALSE),
m_iBtnState(1),
m_iYear(-1),
m_iMonth(-1),
m_iDay(-1),
- m_pEdit(NULL),
- m_pMonthCal(NULL),
- m_pForm(FALSE) {
+ m_bLBtnDown(FALSE),
+ m_pEdit(nullptr),
+ m_pMonthCal(nullptr),
+ m_pForm(nullptr) {
m_rtBtn.Set(0, 0, 0, 0);
}
CFWL_DateTimePickerImp::CFWL_DateTimePickerImp(
const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: CFWL_WidgetImp(properties, pOuter),
- m_bLBtnDown(FALSE),
m_iBtnState(1),
m_iYear(-1),
m_iMonth(-1),
m_iDay(-1),
- m_pEdit(NULL),
- m_pMonthCal(NULL),
- m_pForm(FALSE) {
+ m_bLBtnDown(FALSE),
+ m_pEdit(nullptr),
+ m_pMonthCal(nullptr),
+ m_pForm(nullptr) {
m_rtBtn.Set(0, 0, 0, 0);
}
CFWL_DateTimePickerImp::~CFWL_DateTimePickerImp() {
@@ -879,8 +879,6 @@ void CFWL_DateTimePickerImp::DisForm_ShowMonthCalendar(FX_BOOL bActivate) { if (bActivate) {
CFX_RectF rtMonthCal;
m_pMonthCal->GetWidgetRect(rtMonthCal, TRUE);
- FX_DWORD dwPos = 0;
- FX_FLOAT fPopupHeight = 0.0f;
FX_FLOAT fPopupMin = rtMonthCal.height;
FX_FLOAT fPopupMax = rtMonthCal.height;
CFX_RectF rtAnchor(m_pProperties->m_rtWidget);
diff --git a/xfa/src/fwl/src/basewidget/fwl_editimp.cpp b/xfa/src/fwl/src/basewidget/fwl_editimp.cpp index 93061f35cb..ca273070ab 100644 --- a/xfa/src/fwl/src/basewidget/fwl_editimp.cpp +++ b/xfa/src/fwl/src/basewidget/fwl_editimp.cpp @@ -169,20 +169,20 @@ CFWL_EditImp::CFWL_EditImp(IFWL_Widget* pOuter) m_bLButtonDown(FALSE),
m_nSelStart(0),
m_nLimit(-1),
+ m_fSpaceAbove(0),
+ m_fSpaceBelow(0),
m_fFontSize(0),
+ m_bSetRange(FALSE),
+ m_iMin(-1),
+ m_iMax(0xFFFFFFF),
m_pVertScrollBar(NULL),
m_pHorzScrollBar(NULL),
m_pCaret(NULL),
- m_iMin(-1),
- m_iMax(0xFFFFFFF),
- m_bSetRange(FALSE),
m_pTextField(NULL),
m_backColor(0),
m_updateBackColor(FALSE),
m_iCurRecord(-1),
- m_iMaxRecord(128),
- m_fSpaceAbove(0),
- m_fSpaceBelow(0) {
+ m_iMaxRecord(128) {
m_rtClient.Reset();
m_rtEngine.Reset();
m_rtStatic.Reset();
@@ -197,20 +197,20 @@ CFWL_EditImp::CFWL_EditImp(const CFWL_WidgetImpProperties& properties, m_bLButtonDown(FALSE),
m_nSelStart(0),
m_nLimit(-1),
+ m_fSpaceAbove(0),
+ m_fSpaceBelow(0),
m_fFontSize(0),
+ m_bSetRange(FALSE),
+ m_iMin(-1),
+ m_iMax(0xFFFFFFF),
m_pVertScrollBar(NULL),
m_pHorzScrollBar(NULL),
m_pCaret(NULL),
- m_iMin(-1),
- m_iMax(0xFFFFFFF),
- m_bSetRange(FALSE),
m_pTextField(NULL),
m_backColor(0),
m_updateBackColor(FALSE),
m_iCurRecord(-1),
- m_iMaxRecord(128),
- m_fSpaceAbove(0),
- m_fSpaceBelow(0) {
+ m_iMaxRecord(128) {
m_rtClient.Reset();
m_rtEngine.Reset();
m_rtStatic.Reset();
@@ -464,7 +464,6 @@ void CFWL_EditImp::DrawSpellCheck(CFX_Graphics* pGraphics, }
FX_ARGB cr = 0xFFFF0000;
CFX_Color crLine(cr);
- FX_FLOAT fWidth = 1.0f;
CFWL_EvtEdtCheckWord checkWordEvent;
checkWordEvent.m_pSrcTarget = m_pInterface;
CFX_ByteString sLatinWord;
@@ -1019,7 +1018,6 @@ void CFWL_EditImp::DrawTextBk(CFX_Graphics* pGraphics, }
CFX_RectF rtScorll;
m_pHorzScrollBar->GetWidgetRect(rtScorll);
- FX_FLOAT fStaticWidth = rtScorll.height;
CFX_RectF rtStatic;
rtStatic.Set(m_rtClient.right() - rtScorll.height,
m_rtClient.bottom() - rtScorll.height, rtScorll.height,
diff --git a/xfa/src/fwl/src/basewidget/fwl_listboximp.cpp b/xfa/src/fwl/src/basewidget/fwl_listboximp.cpp index 1151f2f8ee..8a47e4c293 100644 --- a/xfa/src/fwl/src/basewidget/fwl_listboximp.cpp +++ b/xfa/src/fwl/src/basewidget/fwl_listboximp.cpp @@ -343,7 +343,6 @@ FWL_HLISTITEM CFWL_ListBoxImp::GetItem(FWL_HLISTITEM hItem, FX_BOOL bUp = dwKeyCode == FWL_VKEY_Up;
FX_BOOL bDown = dwKeyCode == FWL_VKEY_Down;
FX_BOOL bHome = dwKeyCode == FWL_VKEY_Home;
- FX_BOOL bEnd = dwKeyCode == FWL_VKEY_End;
IFWL_ListBoxDP* pData = (IFWL_ListBoxDP*)m_pProperties->m_pDataProvider;
int32_t iDstItem = -1;
if (bUp || bDown) {
@@ -508,12 +507,8 @@ FX_BOOL CFWL_ListBoxImp::SetItemChecked(FWL_HLISTITEM hItem, FX_BOOL bChecked) { return FALSE;
}
IFWL_ListBoxDP* pData = (IFWL_ListBoxDP*)m_pProperties->m_pDataProvider;
- FX_DWORD dwCheckState = pData->GetItemCheckState(m_pInterface, hItem);
- if (bChecked) {
- pData->SetItemCheckState(m_pInterface, hItem, FWL_ITEMSTATE_LTB_Checked);
- } else {
- pData->SetItemCheckState(m_pInterface, hItem, 0);
- }
+ pData->SetItemCheckState(m_pInterface, hItem,
+ bChecked ? FWL_ITEMSTATE_LTB_Checked : 0);
return TRUE;
}
FX_BOOL CFWL_ListBoxImp::ScrollToVisible(FWL_HLISTITEM hItem) {
@@ -1011,7 +1006,6 @@ int32_t CFWL_ListBoxImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { }
FWL_ERR CFWL_ListBoxImpDelegate::OnProcessEvent(CFWL_Event* pEvent) {
_FWL_RETURN_VALUE_IF_FAIL(pEvent, FWL_ERR_Indefinite);
- FX_DWORD dwHashCode = pEvent->GetClassID();
if (pEvent->GetClassID() != FWL_EVTHASH_Scroll) {
return FWL_ERR_Succeeded;
}
diff --git a/xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp b/xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp index efe50176a4..0be09cab9c 100644 --- a/xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp +++ b/xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp @@ -58,14 +58,14 @@ FX_BOOL IFWL_MonthCalendar::SetSelect(int32_t iYear, }
CFWL_MonthCalendarImp::CFWL_MonthCalendarImp(IFWL_Widget* pOuter)
: CFWL_WidgetImp(pOuter),
- m_iLBtnPartStates(FWL_PARTSTATE_MCD_Normal),
- m_iRBtnPartStates(FWL_PARTSTATE_MCD_Normal),
- m_iCurMonth(1),
m_iCurYear(2011),
+ m_iCurMonth(1),
m_iYear(2011),
m_iMonth(1),
m_iDay(1),
- m_iHovered(-1) {
+ m_iHovered(-1),
+ m_iLBtnPartStates(FWL_PARTSTATE_MCD_Normal),
+ m_iRBtnPartStates(FWL_PARTSTATE_MCD_Normal) {
m_rtHead.Reset();
m_rtWeek.Reset();
m_rtLBtn.Reset();
@@ -89,14 +89,14 @@ CFWL_MonthCalendarImp::CFWL_MonthCalendarImp( const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: CFWL_WidgetImp(properties, pOuter),
- m_iLBtnPartStates(FWL_PARTSTATE_MCD_Normal),
- m_iRBtnPartStates(FWL_PARTSTATE_MCD_Normal),
- m_iCurMonth(1),
m_iCurYear(2011),
+ m_iCurMonth(1),
m_iYear(2011),
m_iMonth(1),
m_iDay(1),
- m_iHovered(-1) {
+ m_iHovered(-1),
+ m_iLBtnPartStates(FWL_PARTSTATE_MCD_Normal),
+ m_iRBtnPartStates(FWL_PARTSTATE_MCD_Normal) {
m_rtHead.Reset();
m_rtWeek.Reset();
m_rtLBtn.Reset();
@@ -361,10 +361,6 @@ void CFWL_MonthCalendarImp::DrawWeek(CFX_Graphics* pGraphics, int32_t iWeek;
iWeek = m_pDateTime->GetDayOfWeek();
CFX_RectF rtDayOfWeek;
- const FX_WCHAR* pWeekDay[] = {(FX_WCHAR*)L"Sun", (FX_WCHAR*)L"Mon",
- (FX_WCHAR*)L"Tue", (FX_WCHAR*)L"Wed",
- (FX_WCHAR*)L"Thu", (FX_WCHAR*)L"Fri",
- (FX_WCHAR*)L"Sat"};
if (pMatrix) {
params.m_matrix.Concat(*pMatrix);
}
diff --git a/xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp b/xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp index 6d0887b263..4863676d7c 100644 --- a/xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp +++ b/xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp @@ -82,16 +82,16 @@ CFWL_ScrollBarImp::CFWL_ScrollBarImp(IFWL_Widget* pOuter) m_iMinButtonState(FWL_PARTSTATE_SCB_Normal),
m_iMaxButtonState(FWL_PARTSTATE_SCB_Normal),
m_iThumbButtonState(FWL_PARTSTATE_SCB_Normal),
+ m_iMinTrackState(FWL_PARTSTATE_SCB_Normal),
+ m_iMaxTrackState(FWL_PARTSTATE_SCB_Normal),
m_fLastTrackPos(0),
m_cpTrackPointX(0),
m_cpTrackPointY(0),
- m_iMinTrackState(FWL_PARTSTATE_SCB_Normal),
- m_iMaxTrackState(FWL_PARTSTATE_SCB_Normal),
m_iMouseWheel(0),
m_bTrackMouseLeave(FALSE),
m_bMouseHover(FALSE),
- m_bRepaintThumb(FALSE),
m_bMouseDown(FALSE),
+ m_bRepaintThumb(FALSE),
m_fButtonLen(0),
m_bMinSize(FALSE),
m_bCustomLayout(FALSE),
@@ -124,8 +124,8 @@ CFWL_ScrollBarImp::CFWL_ScrollBarImp(const CFWL_WidgetImpProperties& properties, m_iMouseWheel(0),
m_bTrackMouseLeave(FALSE),
m_bMouseHover(FALSE),
- m_bRepaintThumb(FALSE),
m_bMouseDown(FALSE),
+ m_bRepaintThumb(FALSE),
m_fButtonLen(0),
m_bMinSize(FALSE),
m_bCustomLayout(FALSE),
diff --git a/xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp b/xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp index 8736b17906..849044ea6e 100644 --- a/xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp +++ b/xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp @@ -45,8 +45,8 @@ CFWL_SpinButtonImp::CFWL_SpinButtonImp(IFWL_Widget* pOuter) : CFWL_WidgetImp(pOuter),
m_dwUpState(FWL_PARTSTATE_SPB_Normal),
m_dwDnState(FWL_PARTSTATE_SPB_Normal),
- m_bLButtonDwn(FALSE),
m_iButtonIndex(0),
+ m_bLButtonDwn(FALSE),
m_hTimer(NULL) {
m_rtClient.Reset();
m_rtUpButton.Reset();
@@ -59,8 +59,8 @@ CFWL_SpinButtonImp::CFWL_SpinButtonImp( : CFWL_WidgetImp(properties, pOuter),
m_dwUpState(FWL_PARTSTATE_SPB_Normal),
m_dwDnState(FWL_PARTSTATE_SPB_Normal),
- m_bLButtonDwn(FALSE),
m_iButtonIndex(0),
+ m_bLButtonDwn(FALSE),
m_hTimer(NULL) {
m_rtClient.Reset();
m_rtUpButton.Reset();
diff --git a/xfa/src/fwl/src/basewidget/include/fwl_editimp.h b/xfa/src/fwl/src/basewidget/include/fwl_editimp.h index ac9cc41bea..79e5ac9ece 100644 --- a/xfa/src/fwl/src/basewidget/include/fwl_editimp.h +++ b/xfa/src/fwl/src/basewidget/include/fwl_editimp.h @@ -19,19 +19,22 @@ class CFWL_EditImp : public CFWL_WidgetImp, public IFDE_TxtEdtEventSink { CFWL_EditImp(IFWL_Widget* pOuter = NULL);
CFWL_EditImp(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter = NULL);
- ~CFWL_EditImp();
- virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const;
- virtual FX_DWORD GetClassID() const;
- virtual FWL_ERR Initialize();
- virtual FWL_ERR Finalize();
- virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE);
- virtual FWL_ERR SetWidgetRect(const CFX_RectF& rect);
- virtual FWL_ERR Update();
- virtual FX_DWORD HitTest(FX_FLOAT fx, FX_FLOAT fy);
- virtual FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE);
- virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix = NULL);
- virtual FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider);
+ ~CFWL_EditImp() override;
+
+ // CFWL_WidgetImp:
+ FWL_ERR GetClassName(CFX_WideString& wsClass) const override;
+ FX_DWORD GetClassID() const override;
+ FWL_ERR Initialize() override;
+ FWL_ERR Finalize() override;
+ FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override;
+ FWL_ERR SetWidgetRect(const CFX_RectF& rect) override;
+ FWL_ERR Update() override;
+ FX_DWORD HitTest(FX_FLOAT fx, FX_FLOAT fy) override;
+ FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE) override;
+ FWL_ERR DrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix = NULL) override;
+ FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) override;
+
virtual FWL_ERR SetText(const CFX_WideString& wsText);
virtual int32_t GetTextLength() const;
virtual FWL_ERR GetText(CFX_WideString& wsText,
diff --git a/xfa/src/fwl/src/basewidget/include/fwl_scrollbarimp.h b/xfa/src/fwl/src/basewidget/include/fwl_scrollbarimp.h index 1aef7584e5..319182becc 100644 --- a/xfa/src/fwl/src/basewidget/include/fwl_scrollbarimp.h +++ b/xfa/src/fwl/src/basewidget/include/fwl_scrollbarimp.h @@ -87,7 +87,6 @@ class CFWL_ScrollBarImp : public CFWL_WidgetImp, public IFWL_Timer { FX_BOOL m_bMouseHover;
FX_BOOL m_bMouseDown;
FX_BOOL m_bRepaintThumb;
-
FX_FLOAT m_fButtonLen;
FX_BOOL m_bMinSize;
CFX_RectF m_rtClient;
diff --git a/xfa/src/fwl/src/core/fwl_formimp.cpp b/xfa/src/fwl/src/core/fwl_formimp.cpp index 2facbf3757..b64f4b19f4 100644 --- a/xfa/src/fwl/src/core/fwl_formimp.cpp +++ b/xfa/src/fwl/src/core/fwl_formimp.cpp @@ -240,7 +240,7 @@ FWL_ERR CFWL_FormImp::Update() { return FWL_ERR_Succeeded;
}
FX_DWORD CFWL_FormImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) {
- IFWL_ThemeProvider* pTheme = GetAvailableTheme();
+ (void)GetAvailableTheme();
if (m_pCloseBox && m_pCloseBox->m_rtBtn.Contains(fx, fy)) {
return FWL_WGTHITTEST_CloseBox;
}
diff --git a/xfa/src/fwl/src/core/fwl_noteimp.cpp b/xfa/src/fwl/src/core/fwl_noteimp.cpp index 2c3a79429e..6bf017d736 100644 --- a/xfa/src/fwl/src/core/fwl_noteimp.cpp +++ b/xfa/src/fwl/src/core/fwl_noteimp.cpp @@ -93,10 +93,10 @@ CFWL_NoteDriver::CFWL_NoteDriver() : m_sendEventCalled(0),
m_maxSize(500),
m_bFullScreen(FALSE),
- m_pFocus(NULL),
- m_pHover(NULL),
- m_pGrab(NULL),
- m_hook(NULL) {
+ m_pHover(nullptr),
+ m_pFocus(nullptr),
+ m_pGrab(nullptr),
+ m_hook(nullptr) {
m_pNoteLoop = new CFWL_NoteLoop;
PushNoteLoop((IFWL_NoteLoop*)m_pNoteLoop);
}
@@ -220,8 +220,6 @@ FX_BOOL CFWL_NoteDriver::SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify) { if (pPrev) {
IFWL_Widget* pWidget =
FWL_GetWidgetMgr()->GetWidget(m_pFocus, FWL_WGTRELATION_SystemForm);
- CFWL_FormImp* pForm =
- pWidget ? (CFWL_FormImp*)((IFWL_TargetData*)pWidget)->GetData() : NULL;
CFWL_MsgKillFocus ms;
ms.m_pDstTarget = pPrev;
ms.m_pSrcTarget = pPrev;
diff --git a/xfa/src/fwl/src/core/fwl_threadimp.cpp b/xfa/src/fwl/src/core/fwl_threadimp.cpp index 98672f3abe..331f336efd 100644 --- a/xfa/src/fwl/src/core/fwl_threadimp.cpp +++ b/xfa/src/fwl/src/core/fwl_threadimp.cpp @@ -11,9 +11,7 @@ #include "include/fwl_appimp.h"
CFWL_ControlThread::~CFWL_ControlThread() {}
FWL_ERR CFWL_ControlThread::Run(FWL_HTHREAD hThread) {
- static int count = 0;
- while (TRUE) {
- }
+ FXSYS_assert(false);
return FWL_ERR_Succeeded;
}
IFWL_Thread* IFWL_Thread::Create() {
diff --git a/xfa/src/fwl/src/core/include/fwl_noteimp.h b/xfa/src/fwl/src/core/include/fwl_noteimp.h index 1c0e922470..93aeae05b1 100644 --- a/xfa/src/fwl/src/core/include/fwl_noteimp.h +++ b/xfa/src/fwl/src/core/include/fwl_noteimp.h @@ -104,7 +104,7 @@ typedef CFX_MapPtrTemplate<void*, FX_DWORD> CFWL_EventSource; class CFWL_EventTarget {
public:
CFWL_EventTarget(CFWL_NoteDriver* pNoteDriver, IFWL_Widget* pListener)
- : m_pNoteDriver(pNoteDriver), m_pListener(pListener), m_bInvalid(FALSE) {}
+ : m_pListener(pListener), m_pNoteDriver(pNoteDriver), m_bInvalid(FALSE) {}
~CFWL_EventTarget();
int32_t SetEventSource(IFWL_Widget* pSource,
FX_DWORD dwFilter = FWL_EVENT_ALL_MASK);
diff --git a/xfa/src/fwl/src/theme/formtp.cpp b/xfa/src/fwl/src/theme/formtp.cpp index 217de374ce..ba1ac68ffa 100644 --- a/xfa/src/fwl/src/theme/formtp.cpp +++ b/xfa/src/fwl/src/theme/formtp.cpp @@ -427,7 +427,6 @@ void CFWL_FormTP::DrawCloseBox(CFX_Graphics* pGraphics, FXFILL_WINDING, pMatrix);
CFX_RectF rtX(*pRect);
rtX.Inflate(-5, -5);
- FX_FLOAT fR = rtX.right();
path.Clear();
FX_FLOAT frtXRight = rtX.right();
FX_FLOAT frtXBottom = rtX.bottom();
diff --git a/xfa/src/fwl/src/theme/pushbuttontp.cpp b/xfa/src/fwl/src/theme/pushbuttontp.cpp index db77f3ef27..fe142d241f 100644 --- a/xfa/src/fwl/src/theme/pushbuttontp.cpp +++ b/xfa/src/fwl/src/theme/pushbuttontp.cpp @@ -103,7 +103,6 @@ FWL_ERR CFWL_PushButtonTP::Finalize() { return CFWL_WidgetTP::Finalize();
}
void CFWL_PushButtonTP::SetThemeData(FX_DWORD dwID) {
- FX_ARGB* pData = (FX_ARGB*)&*m_pThemeData;
if (dwID) {
m_pThemeData->clrBorder[0] = ArgbEncode(255, 55, 98, 6);
m_pThemeData->clrBorder[1] = ArgbEncode(255, 55, 98, 6);
diff --git a/xfa/src/fwl/src/theme/scrollbartp.cpp b/xfa/src/fwl/src/theme/scrollbartp.cpp index e0ad6a1531..50126f4edc 100644 --- a/xfa/src/fwl/src/theme/scrollbartp.cpp +++ b/xfa/src/fwl/src/theme/scrollbartp.cpp @@ -39,7 +39,6 @@ FX_DWORD CFWL_ScrollBarTP::SetThemeID(IFWL_Widget* pWidget, FX_BOOL CFWL_ScrollBarTP::DrawBackground(CFWL_ThemeBackground* pParams) {
_FWL_RETURN_VALUE_IF_FAIL(pParams, FALSE);
IFWL_Widget* pWidget = pParams->m_pWidget;
- FX_DWORD dwStyleEx = pWidget->GetStylesEx();
FWLTHEME_STATE eState = FWLTHEME_STATE_Normal;
switch (pParams->m_dwStates & 0x03) {
case FWL_PARTSTATE_SCB_Hovered: {
diff --git a/xfa/src/fwl/src/theme/widgettp.cpp b/xfa/src/fwl/src/theme/widgettp.cpp index 49b8f214e3..b6052484d3 100644 --- a/xfa/src/fwl/src/theme/widgettp.cpp +++ b/xfa/src/fwl/src/theme/widgettp.cpp @@ -350,7 +350,6 @@ void CFWL_WidgetTP::Draw3DCircle(CFX_Graphics* pGraphics, _FWL_RETURN_IF_FAIL(pGraphics);
_FWL_RETURN_IF_FAIL(pRect);
pGraphics->SaveGraphState();
- FX_FLOAT fRadius = pRect->width / 2;
CFX_Path path;
path.Create();
path.AddArc(pRect->left, pRect->top, pRect->width, pRect->height,
@@ -450,8 +449,6 @@ void CFWL_WidgetTP::DrawAnnulusRect(CFX_Graphics* pGraphics, pGraphics->SetFillColor(&cr);
CFX_Path path;
path.Create();
- FX_FLOAT fRight = pRect->right();
- FX_FLOAT fBottom = pRect->bottom();
CFX_RectF rtInner(*pRect);
rtInner.Deflate(fRingWidth, fRingWidth);
path.AddRectangle(rtInner.left, rtInner.top, rtInner.width, rtInner.height);
|