diff options
Diffstat (limited to 'xfa/fde')
-rw-r--r-- | xfa/fde/cfde_txtedtengine.cpp | 17 | ||||
-rw-r--r-- | xfa/fde/css/fde_cssstyleselector.cpp | 2 | ||||
-rw-r--r-- | xfa/fde/css/fde_cssstylesheet.cpp | 2 | ||||
-rw-r--r-- | xfa/fde/xml/fde_xml_imp.cpp | 1 |
4 files changed, 6 insertions, 16 deletions
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp index a99d8087c5..ecdaf67120 100644 --- a/xfa/fde/cfde_txtedtengine.cpp +++ b/xfa/fde/cfde_txtedtengine.cpp @@ -1023,21 +1023,15 @@ void CFDE_TxtEdtEngine::UpdatePages() { return; if (nSize > nPageCount) { - IFDE_TxtEdtPage* pPage = NULL; - int32_t i = 0; - for (i = nSize - 1; i >= nPageCount; i--) { + for (int32_t i = nSize - 1; i >= nPageCount; i--) { delete m_PagePtrArray[i]; m_PagePtrArray.RemoveAt(i); } return; } if (nSize < nPageCount) { - IFDE_TxtEdtPage* pPage = NULL; - int32_t i = 0; - for (i = nSize; i < nPageCount; i++) { - pPage = IFDE_TxtEdtPage::Create(this, i); - m_PagePtrArray.Add(pPage); - } + for (int32_t i = nSize; i < nPageCount; i++) + m_PagePtrArray.Add(IFDE_TxtEdtPage::Create(this, i)); return; } } @@ -1606,10 +1600,9 @@ FX_BOOL CFDE_TxtEdtEngine::IsSelect() { void CFDE_TxtEdtEngine::DeleteSelect() { int32_t nCountRange = CountSelRanges(); if (nCountRange > 0) { - int32_t nSelStart; - int32_t nSelCount; + int32_t nSelStart = 0; while (nCountRange > 0) { - nSelCount = GetSelRange(--nCountRange, nSelStart); + int32_t nSelCount = GetSelRange(--nCountRange, nSelStart); delete m_SelRangePtrArr[nCountRange]; m_SelRangePtrArr.RemoveAt(nCountRange); DeleteRange_DoRecord(nSelStart, nSelCount, TRUE); diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp index 05f036b1f3..bce8f704b8 100644 --- a/xfa/fde/css/fde_cssstyleselector.cpp +++ b/xfa/fde/css/fde_cssstyleselector.cpp @@ -543,7 +543,7 @@ void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration* pDecl, if (!pSyntax->Init(psz, iLen, 32, TRUE)) return; - int32_t iLen2; + int32_t iLen2 = 0; const FX_WCHAR* psz2; FDE_CSSPROPERTYARGS args; args.pStringCache = nullptr; diff --git a/xfa/fde/css/fde_cssstylesheet.cpp b/xfa/fde/css/fde_cssstylesheet.cpp index dcfd302a58..80da3b042e 100644 --- a/xfa/fde/css/fde_cssstylesheet.cpp +++ b/xfa/fde/css/fde_cssstylesheet.cpp @@ -321,7 +321,6 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadFontFaceRule( FDE_CSSSWITCHDEFAULTS(); } } - return FDE_CSSSYNTAXSTATUS_None; } FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadImportRule( CFDE_CSSSyntaxParser* pSyntax) { @@ -353,7 +352,6 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::SkipRuleSet( FDE_CSSSWITCHDEFAULTS(); } } - return FDE_CSSSYNTAXSTATUS_None; } void CFDE_CSSStyleRule::SetSelector(IFX_MemoryAllocator* pStaticStore, const CFDE_CSSSelectorArray& list) { diff --git a/xfa/fde/xml/fde_xml_imp.cpp b/xfa/fde/xml/fde_xml_imp.cpp index 446db86950..d7b22e076f 100644 --- a/xfa/fde/xml/fde_xml_imp.cpp +++ b/xfa/fde/xml/fde_xml_imp.cpp @@ -354,7 +354,6 @@ FX_BOOL CFDE_XMLNode::InsertNodeItem(CFDE_XMLNode::NodeItem eItem, default: return FALSE; } - return FALSE; } CFDE_XMLNode* CFDE_XMLNode::RemoveNodeItem(CFDE_XMLNode::NodeItem eItem) { CFDE_XMLNode* pNode = NULL; |