summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-02 09:54:54 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-02 09:54:54 -0800
commit3343d146f2d9cd2f9eaa3a40fed3a5b94f3f107e (patch)
treeab220ffcea223cacd136054603c63324a1d9d5f4 /xfa
parent1b700c3c452429dacde3c163a6edb2706f93d4a7 (diff)
downloadpdfium-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')
-rw-r--r--xfa/src/fdp/src/tto/fde_textout.cpp2
-rw-r--r--xfa/src/fdp/src/tto/fde_textout.h1
-rw-r--r--xfa/src/fdp/src/xml/fde_xml.cpp9
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtbuf.cpp10
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtengine.cpp25
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtengine.h3
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtpage.cpp15
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtpage.h2
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtparag.cpp6
-rw-r--r--xfa/src/fgas/src/layout/fx_rtfbreak.cpp1
-rw-r--r--xfa/src/fgas/src/localization/fx_locale.cpp20
-rw-r--r--xfa/src/fgas/src/xml/fx_sax_imp.cpp25
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp17
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp18
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_editimp.cpp26
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_listboximp.cpp10
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp20
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp8
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp4
-rw-r--r--xfa/src/fwl/src/basewidget/include/fwl_editimp.h29
-rw-r--r--xfa/src/fwl/src/basewidget/include/fwl_scrollbarimp.h1
-rw-r--r--xfa/src/fwl/src/core/fwl_formimp.cpp2
-rw-r--r--xfa/src/fwl/src/core/fwl_noteimp.cpp10
-rw-r--r--xfa/src/fwl/src/core/fwl_threadimp.cpp4
-rw-r--r--xfa/src/fwl/src/core/include/fwl_noteimp.h2
-rw-r--r--xfa/src/fwl/src/theme/formtp.cpp1
-rw-r--r--xfa/src/fwl/src/theme/pushbuttontp.cpp1
-rw-r--r--xfa/src/fwl/src/theme/scrollbartp.cpp1
-rw-r--r--xfa/src/fwl/src/theme/widgettp.cpp3
-rw-r--r--xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp11
30 files changed, 109 insertions, 178 deletions
diff --git a/xfa/src/fdp/src/tto/fde_textout.cpp b/xfa/src/fdp/src/tto/fde_textout.cpp
index d7e17628ee..7612cb52f5 100644
--- a/xfa/src/fdp/src/tto/fde_textout.cpp
+++ b/xfa/src/fdp/src/tto/fde_textout.cpp
@@ -29,8 +29,8 @@ CFDE_TextOut::CFDE_TextOut()
m_iEllipsisWidth(0),
m_ttoLines(5),
m_iCurLine(0),
- m_iTotalLines(0),
m_iCurPiece(0),
+ m_iTotalLines(0),
m_pCharPos(NULL),
m_iCharPosSize(0),
m_pRenderDevice(NULL) {
diff --git a/xfa/src/fdp/src/tto/fde_textout.h b/xfa/src/fdp/src/tto/fde_textout.h
index ecb2c73666..7edd05b0e1 100644
--- a/xfa/src/fdp/src/tto/fde_textout.h
+++ b/xfa/src/fdp/src/tto/fde_textout.h
@@ -137,7 +137,6 @@ class CFDE_TextOut : public IFDE_TextOut, public CFX_Target {
FX_FLOAT m_fLineSpace;
FX_FLOAT m_fLinePos;
FX_FLOAT m_fTolerance;
-
int32_t m_iAlignment;
int32_t m_iTxtBkAlignment;
int32_t* m_pCharWidths;
diff --git a/xfa/src/fdp/src/xml/fde_xml.cpp b/xfa/src/fdp/src/xml/fde_xml.cpp
index 056254a149..1931a57d11 100644
--- a/xfa/src/fdp/src/xml/fde_xml.cpp
+++ b/xfa/src/fdp/src/xml/fde_xml.cpp
@@ -506,7 +506,7 @@ IFDE_XMLInstruction* IFDE_XMLInstruction::Create(
return (IFDE_XMLInstruction*)new CFDE_XMLInstruction(wsTarget);
}
CFDE_XMLInstruction::CFDE_XMLInstruction(const CFX_WideString& wsTarget)
- : CFDE_XMLNode(), m_wsTarget(wsTarget), m_TargetData(), m_Attributes() {
+ : m_wsTarget(wsTarget) {
FXSYS_assert(m_wsTarget.GetLength() > 0);
}
CFDE_XMLNode* CFDE_XMLInstruction::Clone(FX_BOOL bRecursive) {
@@ -1316,10 +1316,11 @@ inline void CFDE_XMLSAXParser::Pop() {
}
#ifdef _FDE_BLOCK_BUFFER
CFDE_BlockBuffer::CFDE_BlockBuffer(int32_t iAllocStep)
- : m_iAllocStep(iAllocStep),
- m_iStartPosition(0),
+ : m_iDataLength(0),
m_iBufferSize(0),
- m_iDataLength(0) {}
+ m_iAllocStep(iAllocStep),
+ m_iStartPosition(0) {
+}
CFDE_BlockBuffer::~CFDE_BlockBuffer() {
ClearBuffer();
}
diff --git a/xfa/src/fee/src/fee/fde_txtedtbuf.cpp b/xfa/src/fee/src/fee/fde_txtedtbuf.cpp
index 86ff1f3e1b..cedc5b2517 100644
--- a/xfa/src/fee/src/fee/fde_txtedtbuf.cpp
+++ b/xfa/src/fee/src/fee/fde_txtedtbuf.cpp
@@ -18,17 +18,15 @@ CFDE_TxtEdtBufIter::CFDE_TxtEdtBufIter(CFDE_TxtEdtBuf* pBuf,
#else
CFDE_TxtEdtBufIter::CFDE_TxtEdtBufIter(CFDE_TxtEdtBuf* pBuf, FX_WCHAR wcAlias)
#endif
- : m_nCurChunk(0),
+ : m_pBuf(pBuf),
+ m_nCurChunk(0),
m_nCurIndex(0),
m_nIndex(0),
- m_pBuf(pBuf)
+ m_bInField(FALSE),
#ifdef FDE_USEFORMATBLOCK
- ,
m_bForDisplay(bForDisplay),
- m_nAliasCount(0)
+ m_nAliasCount(0),
#endif
- ,
- m_bInField(FALSE),
m_Alias(wcAlias) {
FXSYS_assert(m_pBuf);
}
diff --git a/xfa/src/fee/src/fee/fde_txtedtengine.cpp b/xfa/src/fee/src/fee/fde_txtedtengine.cpp
index 7efd95d54a..2eb3f1ae4f 100644
--- a/xfa/src/fee/src/fee/fde_txtedtengine.cpp
+++ b/xfa/src/fee/src/fee/fde_txtedtengine.cpp
@@ -31,7 +31,8 @@ IFDE_TxtEdtEngine* IFDE_TxtEdtEngine::Create() {
return new CFDE_TxtEdtEngine();
}
CFDE_TxtEdtEngine::CFDE_TxtEdtEngine()
- : m_nPageLineCount(20),
+ : m_pTextBreak(nullptr),
+ m_nPageLineCount(20),
m_nLineCount(0),
m_nAnchorPos(-1),
m_nLayoutPos(0),
@@ -39,19 +40,16 @@ CFDE_TxtEdtEngine::CFDE_TxtEdtEngine()
m_nCaret(0),
m_bBefore(TRUE),
m_nCaretPage(0),
+ m_dwFindFlags(0),
m_bLock(FALSE),
m_nLimit(0),
m_wcAliasChar(L'*'),
- m_pTextBreak(NULL)
#ifdef FDE_USEFORMATBLOCK
- ,
- m_nFixLength(-1)
+ m_nFixLength(-1), // FIXME: no such member => USEFORMATBLOCK can't work.
#endif
- ,
- m_dwFindFlags(0),
m_nFirstLineEnd(FDE_TXTEDIT_LINEEND_Auto),
- m_wLineEnd(FDE_UNICODE_PARAGRAPH_SPERATOR),
- m_bAutoLineEnd(TRUE) {
+ m_bAutoLineEnd(TRUE),
+ m_wLineEnd(FDE_UNICODE_PARAGRAPH_SPERATOR) {
FXSYS_memset(&m_rtCaret, 0, sizeof(CFX_RectF));
m_pTxtBuf = new CFDE_TxtEdtBuf();
m_bAutoLineEnd = (m_Param.nLineEnd == FDE_TXTEDIT_LINEEND_Auto);
@@ -278,8 +276,6 @@ int32_t CFDE_TxtEdtEngine::MoveCaretPos(FDE_TXTEDTMOVECARET eMoveCaret,
m_nAnchorPos = -1;
}
FX_BOOL bVertical = m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_DocVertical;
- int32_t nCaret = m_nCaret;
- int32_t nCaretPage = m_nCaretPage;
switch (eMoveCaret) {
case MC_Left: {
if (bVertical) {
@@ -575,7 +571,6 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart,
FX_BOOL bPart = FALSE;
if (m_nLimit > 0) {
int32_t nTotalLength = GetTextBufLength();
- int32_t nDelLength = 0;
int32_t nCount = m_SelRangePtrArr.GetSize();
for (int32_t i = 0; i < nCount; i++) {
FDE_LPTXTEDTSELRANGE lpSelRange = m_SelRangePtrArr.GetAt(i);
@@ -1346,7 +1341,6 @@ void CFDE_TxtEdtEngine::Inner_DeleteRange(int32_t nStart, int32_t nCount) {
nTotalCharCount += pParag->m_nCharCount;
}
m_pTxtBuf->Delete(nStart, nCount);
- CFDE_TxtEdtParag* pEndParag = m_ParagPtrArray[ParagPosEnd.nParagIndex];
int32_t nNextParagIndex = (ParagPosBgn.nCharIndex == 0 && bLastParag)
? ParagPosBgn.nParagIndex
: (ParagPosBgn.nParagIndex + 1);
@@ -1411,11 +1405,8 @@ void CFDE_TxtEdtEngine::ResetEngine() {
void CFDE_TxtEdtEngine::RebuildParagraphs() {
RemoveAllParags();
FX_WCHAR wChar = L' ';
- FX_WCHAR wCharPre = L' ';
int32_t nParagStart = 0;
- int32_t nCount = m_pTxtBuf->GetTextLength();
int32_t nIndex = 0;
- CFDE_TxtEdtParag* pParag = NULL;
IFX_CharIter* pIter = new CFDE_TxtEdtBufIter((CFDE_TxtEdtBuf*)m_pTxtBuf);
pIter->SetAt(0);
do {
@@ -2508,10 +2499,10 @@ CFDE_TxtEdtDoRecord_DeleteRange::CFDE_TxtEdtDoRecord_DeleteRange(
const CFX_WideString& wsRange,
FX_BOOL bSel)
: m_pEngine(pEngine),
+ m_bSel(bSel),
m_nIndex(nIndex),
m_nCaret(nCaret),
- m_wsRange(wsRange),
- m_bSel(bSel) {
+ m_wsRange(wsRange) {
FXSYS_assert(pEngine);
}
CFDE_TxtEdtDoRecord_DeleteRange::~CFDE_TxtEdtDoRecord_DeleteRange() {}
diff --git a/xfa/src/fee/src/fee/fde_txtedtengine.h b/xfa/src/fee/src/fee/fde_txtedtengine.h
index eef5129e38..086168d7ae 100644
--- a/xfa/src/fee/src/fee/fde_txtedtengine.h
+++ b/xfa/src/fee/src/fee/fde_txtedtengine.h
@@ -199,6 +199,7 @@ class CFDE_TxtEdtEngine : public IFDE_TxtEdtEngine {
FX_BOOL IsSelect();
void DeleteSelect();
+
IFDE_TxtEdtBuf* m_pTxtBuf;
IFX_TxtBreak* m_pTextBreak;
FDE_TXTEDTPARAMS m_Param;
@@ -215,14 +216,12 @@ class CFDE_TxtEdtEngine : public IFDE_TxtEdtEngine {
int32_t m_nCaretPage;
CFX_RectF m_rtCaret;
FX_DWORD m_dwFindFlags;
-
FX_BOOL m_bLock;
int32_t m_nLimit;
FX_WCHAR m_wcAliasChar;
int32_t m_nFirstLineEnd;
FX_BOOL m_bAutoLineEnd;
FX_WCHAR m_wLineEnd;
-
FDE_TXTEDT_TEXTCHANGE_INFO m_ChangeInfo;
};
class CFDE_TxtEdtDoRecord_Insert : public IFDE_TxtEdtDoRecord {
diff --git a/xfa/src/fee/src/fee/fde_txtedtpage.cpp b/xfa/src/fee/src/fee/fde_txtedtpage.cpp
index cc1013e962..d6ec7df252 100644
--- a/xfa/src/fee/src/fee/fde_txtedtpage.cpp
+++ b/xfa/src/fee/src/fee/fde_txtedtpage.cpp
@@ -123,17 +123,17 @@ int32_t CFDE_TxtEdtTextSet::GetCharRects_Impl(FDE_HVISUALOBJ hText,
return pEngine->GetTextBreak()->GetCharRects(&tr, rtArray, bBBox);
}
CFDE_TxtEdtPage::CFDE_TxtEdtPage(IFDE_TxtEdtEngine* pEngine, int32_t nPageIndex)
- : m_pIter(NULL),
- m_pTextSet(NULL),
+ : m_pIter(nullptr),
+ m_pTextSet(nullptr),
+ m_pBgnParag(nullptr),
+ m_pEndParag(nullptr),
m_nRefCount(0),
m_nPageStart(-1),
m_nCharCount(0),
m_nPageIndex(nPageIndex),
m_bLoaded(FALSE),
m_bLastPage(FALSE),
- m_pCharWidth(NULL),
- m_pBgnParag(NULL),
- m_pEndParag(NULL) {
+ m_pCharWidth(nullptr) {
FXSYS_memset(&m_rtPage, 0, sizeof(CFX_RectF));
FXSYS_memset(&m_rtPageMargin, 0, sizeof(CFX_RectF));
FXSYS_memset(&m_rtPageContents, 0, sizeof(CFX_RectF));
@@ -331,7 +331,6 @@ void CFDE_TxtEdtPage::CalcRangeRectArray(int32_t nStart,
}
CFX_RectFArray rcArr;
m_pTextSet->GetCharRects((FDE_HVISUALOBJ)piece, rcArr);
- int32_t nSize = rcArr.GetSize();
CFX_RectF rectPiece = rcArr[nStart - piece->nStart];
rectPiece.Union(rcArr[nRangeEnd]);
RectFArr.Add(rectPiece);
@@ -396,9 +395,7 @@ int32_t CFDE_TxtEdtPage::LoadPage(FX_LPCRECTF pClipBox, IFX_Pause* pPause) {
IFX_TxtBreak* pBreak = m_pEditEngine->GetTextBreak();
pBreak->EndBreak(FX_TXTBREAK_ParagraphBreak);
pBreak->ClearBreakPieces();
- int32_t nLineCount = m_pEditEngine->GetLineCount();
int32_t nPageLineCount = m_pEditEngine->GetPageLineCount();
- int32_t nLength = pBuf->GetTextLength();
int32_t nStartLine = nPageLineCount * m_nPageIndex;
int32_t nEndLine = FX_MIN((nStartLine + nPageLineCount - 1),
(m_pEditEngine->GetLineCount() - 1));
@@ -429,7 +426,6 @@ int32_t CFDE_TxtEdtPage::LoadPage(FX_LPCRECTF pClipBox, IFX_Pause* pPause) {
}
m_PieceMassArr.RemoveAll(TRUE);
FX_DWORD dwBreakStatus = FX_TXTBREAK_None;
- int32_t nLineStart = nPageStart;
int32_t nPieceStart = 0;
if (m_pCharWidth != NULL) {
delete[] m_pCharWidth;
@@ -444,7 +440,6 @@ int32_t CFDE_TxtEdtPage::LoadPage(FX_LPCRECTF pClipBox, IFX_Pause* pPause) {
IFX_CharIter* pIter = m_pIter->Clone();
pIter->SetAt(nPageStart);
m_pIter->SetAt(nPageStart);
- int32_t nTextEnd = m_pEditEngine->GetTextBufLength();
FX_BOOL bFirstPiece = TRUE;
do {
if (bReload) {
diff --git a/xfa/src/fee/src/fee/fde_txtedtpage.h b/xfa/src/fee/src/fee/fde_txtedtpage.h
index 30f717e8bc..67e2e982b9 100644
--- a/xfa/src/fee/src/fee/fde_txtedtpage.h
+++ b/xfa/src/fee/src/fee/fde_txtedtpage.h
@@ -22,7 +22,7 @@ enum FDE_TXTEDT_CHARTYPE {
FDE_TXTEDT_CHARTYPE_Char,
FDE_TXTEDT_CHARTYPE_CJK,
};
-static FDE_TXTEDT_CHARTYPE FDE_GetEditSelCharType(FX_WCHAR wChar) {
+inline FDE_TXTEDT_CHARTYPE FDE_GetEditSelCharType(FX_WCHAR wChar) {
if (wChar == 0x9) {
return FDE_TXTEDT_CHARTYPE_Tab;
} else if (wChar == 0x20 || wChar == 0xA0) {
diff --git a/xfa/src/fee/src/fee/fde_txtedtparag.cpp b/xfa/src/fee/src/fee/fde_txtedtparag.cpp
index 9c9f5b10cd..cf6fa77acc 100644
--- a/xfa/src/fee/src/fee/fde_txtedtparag.cpp
+++ b/xfa/src/fee/src/fee/fde_txtedtparag.cpp
@@ -12,9 +12,9 @@
#include "fde_txtedtengine.h"
#include "fde_txtedtbuf.h"
CFDE_TxtEdtParag::CFDE_TxtEdtParag(CFDE_TxtEdtEngine* pEngine)
- : m_nLineCount(0),
- m_nCharStart(0),
+ : m_nCharStart(0),
m_nCharCount(0),
+ m_nLineCount(0),
m_lpData(NULL),
m_pEngine(pEngine) {
FXSYS_assert(m_pEngine);
@@ -43,7 +43,6 @@ void CFDE_TxtEdtParag::LoadParag() {
CFX_ArrayTemplate<int32_t> LineBaseArr;
FX_BOOL bReload = FALSE;
FX_DWORD dwBreakStatus = FX_TXTBREAK_None;
- int32_t nTextEnd = m_pEngine->GetTextBufLength();
do {
if (bReload) {
dwBreakStatus = pTxtBreak->EndBreak(FX_TXTBREAK_ParagraphBreak);
@@ -108,7 +107,6 @@ void CFDE_TxtEdtParag::CalcLines() {
int32_t nEndIndex = m_nCharStart + m_nCharCount;
pIter->SetAt(m_nCharStart);
FX_BOOL bReload = FALSE;
- int32_t nTextEnd = m_pEngine->GetTextBufLength();
do {
if (bReload) {
dwBreakStatus = pTxtBreak->EndBreak(FX_TXTBREAK_ParagraphBreak);
diff --git a/xfa/src/fgas/src/layout/fx_rtfbreak.cpp b/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
index 4e1866b8e4..15fa5c3b53 100644
--- a/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
+++ b/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
@@ -1446,7 +1446,6 @@ int32_t CFX_RTFBreak::GetCharRects(FX_LPCRTFTEXTOBJ pText,
rtArray.SetSize(iLength);
FX_DWORD dwStyles = pText->dwLayoutStyles;
FX_BOOL bVertical = (dwStyles & FX_RTFLAYOUTSTYLE_VerticalLayout) != 0;
- FX_BOOL bMBCSCode = (dwStyles & FX_RTFLAYOUTSTYLE_MBCSCode) != 0;
FX_BOOL bSingleLine = (dwStyles & FX_RTFLAYOUTSTYLE_SingleLine) != 0;
FX_BOOL bCombText = (dwStyles & FX_TXTLAYOUTSTYLE_CombText) != 0;
FX_WCHAR wch, wLineBreakChar = pText->wLineBreakChar;
diff --git a/xfa/src/fgas/src/localization/fx_locale.cpp b/xfa/src/fgas/src/localization/fx_locale.cpp
index fc3ba78bd0..1227086bb5 100644
--- a/xfa/src/fgas/src/localization/fx_locale.cpp
+++ b/xfa/src/fgas/src/localization/fx_locale.cpp
@@ -935,8 +935,7 @@ FX_BOOL CFX_FormatString::ParseText(const CFX_WideString& wsSrcText,
return FALSE;
}
CFX_WideString wsTextFormat;
- IFX_Locale* pLocale =
- GetTextFormat(wsPattern, FX_WSTRC(L"text"), wsTextFormat);
+ GetTextFormat(wsPattern, FX_WSTRC(L"text"), wsTextFormat);
if (wsTextFormat.IsEmpty()) {
return FALSE;
}
@@ -1018,7 +1017,6 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum,
int32_t iExponent = 0;
CFX_WideString wsDotSymbol;
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Decimal, wsDotSymbol);
- int32_t iDotLen = wsDotSymbol.GetLength();
CFX_WideString wsGroupSymbol;
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Grouping, wsGroupSymbol);
int32_t iGroupLen = wsGroupSymbol.GetLength();
@@ -1785,7 +1783,6 @@ FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum,
int32_t iExponent = 0;
CFX_WideString wsDotSymbol;
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Decimal, wsDotSymbol);
- int32_t iDotLen = wsDotSymbol.GetLength();
CFX_WideString wsGroupSymbol;
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Grouping, wsGroupSymbol);
int32_t iGroupLen = wsGroupSymbol.GetLength();
@@ -2864,8 +2861,7 @@ FX_BOOL CFX_FormatString::ParseDateTime(const CFX_WideString& wsSrcDateTime,
FX_BOOL CFX_FormatString::ParseZero(const CFX_WideString& wsSrcText,
const CFX_WideString& wsPattern) {
CFX_WideString wsTextFormat;
- IFX_Locale* pLocale =
- GetTextFormat(wsPattern, FX_WSTRC(L"zero"), wsTextFormat);
+ GetTextFormat(wsPattern, FX_WSTRC(L"zero"), wsTextFormat);
int32_t iText = 0, iPattern = 0;
const FX_WCHAR* pStrText = (const FX_WCHAR*)wsSrcText;
int32_t iLenText = wsSrcText.GetLength();
@@ -2896,8 +2892,7 @@ FX_BOOL CFX_FormatString::ParseZero(const CFX_WideString& wsSrcText,
FX_BOOL CFX_FormatString::ParseNull(const CFX_WideString& wsSrcText,
const CFX_WideString& wsPattern) {
CFX_WideString wsTextFormat;
- IFX_Locale* pLocale =
- GetTextFormat(wsPattern, FX_WSTRC(L"null"), wsTextFormat);
+ GetTextFormat(wsPattern, FX_WSTRC(L"null"), wsTextFormat);
int32_t iText = 0, iPattern = 0;
const FX_WCHAR* pStrText = (const FX_WCHAR*)wsSrcText;
int32_t iLenText = wsSrcText.GetLength();
@@ -2936,8 +2931,7 @@ FX_BOOL CFX_FormatString::FormatText(const CFX_WideString& wsSrcText,
return FALSE;
}
CFX_WideString wsTextFormat;
- IFX_Locale* pLocale =
- GetTextFormat(wsPattern, FX_WSTRC(L"text"), wsTextFormat);
+ GetTextFormat(wsPattern, FX_WSTRC(L"text"), wsTextFormat);
int32_t iText = 0, iPattern = 0;
const FX_WCHAR* pStrText = (const FX_WCHAR*)wsSrcText;
const FX_WCHAR* pStrPattern = (const FX_WCHAR*)wsTextFormat;
@@ -4441,8 +4435,7 @@ FX_BOOL CFX_FormatString::FormatZero(const CFX_WideString& wsPattern,
return FALSE;
}
CFX_WideString wsTextFormat;
- IFX_Locale* pLocale =
- GetTextFormat(wsPattern, FX_WSTRC(L"zero"), wsTextFormat);
+ GetTextFormat(wsPattern, FX_WSTRC(L"zero"), wsTextFormat);
int32_t iPattern = 0;
const FX_WCHAR* pStrPattern = (const FX_WCHAR*)wsTextFormat;
int32_t iLenPattern = wsTextFormat.GetLength();
@@ -4464,8 +4457,7 @@ FX_BOOL CFX_FormatString::FormatNull(const CFX_WideString& wsPattern,
return FALSE;
}
CFX_WideString wsTextFormat;
- IFX_Locale* pLocale =
- GetTextFormat(wsPattern, FX_WSTRC(L"null"), wsTextFormat);
+ GetTextFormat(wsPattern, FX_WSTRC(L"null"), wsTextFormat);
int32_t iPattern = 0;
const FX_WCHAR* pStrPattern = (const FX_WCHAR*)wsTextFormat;
int32_t iLenPattern = wsTextFormat.GetLength();
diff --git a/xfa/src/fgas/src/xml/fx_sax_imp.cpp b/xfa/src/fgas/src/xml/fx_sax_imp.cpp
index 20d65d3f74..6a4ad34b8c 100644
--- a/xfa/src/fgas/src/xml/fx_sax_imp.cpp
+++ b/xfa/src/fgas/src/xml/fx_sax_imp.cpp
@@ -66,32 +66,17 @@ void CFX_SAXFile::Reset() {
}
m_pFile = NULL;
}
-#define FX_SAXCHARTYPE_Normal 0
-#define FX_SAXCHARTYPE_Space 1
-static uint8_t g_SAX_CharType[256] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-};
CFX_SAXReader::CFX_SAXReader()
: m_File(),
- m_pHandler(NULL),
+ m_pHandler(nullptr),
m_iState(-1),
- m_pRoot(NULL),
- m_pCurItem(NULL),
+ m_pRoot(nullptr),
+ m_pCurItem(nullptr),
m_dwItemID(0),
m_iDataSize(256),
m_iNameSize(256),
- m_pCommentContext(NULL),
- m_dwParseMode(0) {
+ m_dwParseMode(0),
+ m_pCommentContext(nullptr) {
m_pszData = (uint8_t*)FX_Alloc(uint8_t, m_iDataSize);
m_pszName = (uint8_t*)FX_Alloc(uint8_t, m_iNameSize);
}
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);
diff --git a/xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp b/xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp
index 6edbac1e53..8a4687036e 100644
--- a/xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp
+++ b/xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.cpp
@@ -32,14 +32,15 @@ CBC_CommonPerspectiveTransform::CBC_CommonPerspectiveTransform(FX_FLOAT a11,
FX_FLOAT a23,
FX_FLOAT a33)
: m_a11(a11),
- m_a21(a21),
- m_a31(a31),
m_a12(a12),
- m_a22(a22),
- m_a32(a32),
m_a13(a13),
+ m_a21(a21),
+ m_a22(a22),
m_a23(a23),
- m_a33(a33) {}
+ m_a31(a31),
+ m_a32(a32),
+ m_a33(a33) {
+}
CBC_CommonPerspectiveTransform::~CBC_CommonPerspectiveTransform() {}
CBC_CommonPerspectiveTransform*
CBC_CommonPerspectiveTransform::QuadrilateralToQuadrilateral(FX_FLOAT x0,