diff options
Diffstat (limited to 'xfa/src')
19 files changed, 80 insertions, 61 deletions
diff --git a/xfa/src/fdp/src/css/fde_cssdatatable.cpp b/xfa/src/fdp/src/css/fde_cssdatatable.cpp index 28b925dda2..322835f294 100644 --- a/xfa/src/fdp/src/css/fde_cssdatatable.cpp +++ b/xfa/src/fdp/src/css/fde_cssdatatable.cpp @@ -843,16 +843,20 @@ int32_t CFDE_CSSValueListParser::SkipTo(FX_WCHAR wch, FX_BOOL bBrContinue) { const FX_WCHAR* pStart = m_pCur; if (!bBrContinue) { - if (bWSSeparator) - while (++m_pCur<m_pEnd&& * m_pCur != wch&& * m_pCur> ' ') - ; - else - while (++m_pCur < m_pEnd && *m_pCur != wch) - ; + if (bWSSeparator) { + while ((++m_pCur < m_pEnd) && (*m_pCur != wch) && (*m_pCur > ' ')) { + continue; + } + } else { + while (++m_pCur < m_pEnd && *m_pCur != wch) { + continue; + } + } + } else { int32_t iBracketCount = 0; if (bWSSeparator) { - while (m_pCur<m_pEnd&& * m_pCur != wch&& * m_pCur> ' ') { + while ((m_pCur < m_pEnd) && (*m_pCur != wch) && (*m_pCur > ' ')) { if (*m_pCur == '(') { iBracketCount++; } else if (*m_pCur == ')') { diff --git a/xfa/src/fdp/src/tto/fde_textout.cpp b/xfa/src/fdp/src/tto/fde_textout.cpp index b10a6ecbd7..8d54574274 100644 --- a/xfa/src/fdp/src/tto/fde_textout.cpp +++ b/xfa/src/fdp/src/tto/fde_textout.cpp @@ -869,7 +869,6 @@ void CFDE_TextOut::DrawLine(const FDE_LPTTOPIECE pPiece, IFDE_Pen*& pPen) { if (bVertical) { pt1.x = rtText.left + rtText.width * 2.0f / 5.0f; pt1.y = rtText.top; - ; pt2.x = pt1.x; pt2.y = rtText.bottom(); } else { diff --git a/xfa/src/fee/src/fee/fde_txtedtblock.cpp b/xfa/src/fee/src/fee/fde_txtedtblock.cpp index 99b23753cc..9e61fcc969 100644 --- a/xfa/src/fee/src/fee/fde_txtedtblock.cpp +++ b/xfa/src/fee/src/fee/fde_txtedtblock.cpp @@ -42,8 +42,10 @@ CFDE_TxtEdtBlock::CFDE_TxtEdtBlock(CFDE_TxtEdtEngine* pEngine, wsFix.Empty(); } int32_t nPos = i - 1; - while (lpBuf[i++] != L')') - ; + while (lpBuf[i++] != L')') { + continue; + } + i++; CFX_WideStringC wsField(lpBuf + nPos, i - nPos); CFDE_TxtEdtField* pField = CFDE_TxtEdtField::Create(wsField, j, this); diff --git a/xfa/src/fee/src/fx_wordbreak/fx_wordbreakdata.cpp b/xfa/src/fee/src/fx_wordbreak/fx_wordbreakdata.cpp index c1342b8981..5596aac7bc 100644 --- a/xfa/src/fee/src/fx_wordbreak/fx_wordbreakdata.cpp +++ b/xfa/src/fee/src/fx_wordbreak/fx_wordbreakdata.cpp @@ -10,7 +10,9 @@ extern const FX_WORD gs_FX_WordBreak_Table[16] = { 0xFFFF, 0xFFF9, 0xFFFB, 0xFFFB, 0xFFFB, 0xFFFB, 0xEFBB, 0xE77B, 0xFFFB, 0xFFFB, 0xFFFB, 0xE77B, 0xE73B, 0xFFFB, 0xFFFB, 0xFFFB, }; + extern const uint8_t gs_FX_WordBreak_CodePointProperties[(0xFFFF - 1) / 2 + 1] = + // NOLINTNEXTLINE { 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x90, 0xA0, diff --git a/xfa/src/fgas/src/font/fx_gefont.h b/xfa/src/fgas/src/font/fx_gefont.h index 88688f00d5..32edcaa30b 100644 --- a/xfa/src/fgas/src/font/fx_gefont.h +++ b/xfa/src/fgas/src/font/fx_gefont.h @@ -54,6 +54,7 @@ class CFX_GEFont : public IFX_Font { m_dwLogFontStyle = dwLogFontStyle; }; #endif + protected: #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ FX_BOOL m_bUseLogFontStyle; diff --git a/xfa/src/fwl/src/basewidget/include/fwl_monthcalendarimp.h b/xfa/src/fwl/src/basewidget/include/fwl_monthcalendarimp.h index 26a472b17b..607af804a5 100644 --- a/xfa/src/fwl/src/basewidget/include/fwl_monthcalendarimp.h +++ b/xfa/src/fwl/src/basewidget/include/fwl_monthcalendarimp.h @@ -13,9 +13,10 @@ class CFWL_WidgetImpProperties; class IFWL_Widget; class IFDE_DateTime; class CFDE_DateTime; -extern uint8_t FX_DaysInMonth(int32_t iYear, uint8_t iMonth); class CFWL_MonthCalendarImpDelegate; +extern uint8_t FX_DaysInMonth(int32_t iYear, uint8_t iMonth); + class CFWL_MonthCalendarImp : public CFWL_WidgetImp { public: CFWL_MonthCalendarImp(const CFWL_WidgetImpProperties& properties, diff --git a/xfa/src/fwl/src/core/fwl_appimp.cpp b/xfa/src/fwl/src/core/fwl_appimp.cpp index 6d71825d5f..1dd66e152f 100644 --- a/xfa/src/fwl/src/core/fwl_appimp.cpp +++ b/xfa/src/fwl/src/core/fwl_appimp.cpp @@ -72,8 +72,9 @@ FWL_ERR CFWL_AppImp::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { return FWL_ERR_Succeeded; } FWL_ERR CFWL_AppImp::Exit(int32_t iExitCode) { - while (m_pNoteDriver->PopNoteLoop()) - ; + while (m_pNoteDriver->PopNoteLoop()) { + continue; + } return m_pWidgetMgr->GetAdapterWidgetMgr()->Exit(0); } IFWL_ThemeProvider* CFWL_AppImp::GetThemeProvider() const { diff --git a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp index b7ad14d592..be2a71b1ef 100644 --- a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp +++ b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp @@ -36,7 +36,6 @@ CBC_OneDimWriter::CBC_OneDimWriter() { m_bCalcChecksum = FALSE; m_pFont = NULL; m_fFontSize = 10; - ; m_iFontStyle = 0; m_fontColor = 0xff000000; m_iContentLen = 0; diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp index 844a0ca255..c4c65e24bf 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp @@ -94,7 +94,7 @@ int32_t CBC_PDF417ECErrorCorrection::decode(CFX_Int32Array& received, } for (int32_t i = 0; i < errorLocations->GetSize(); i++) { int32_t log = m_field->log(errorLocations->GetAt(i), e); - ; + BC_EXCEPTION_CHECK_ReturnValue(e, -1); int32_t position = received.GetSize() - 1 - log; if (position < 0) { diff --git a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp index bb04debe46..c9de17729d 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp @@ -37,9 +37,7 @@ CBC_QRAlignmentPatternFinder::CBC_QRAlignmentPatternFinder( m_startY(startY), m_width(width), m_height(height), - m_moduleSize(moduleSize) - -{ + m_moduleSize(moduleSize) { m_crossCheckStateCount.SetSize(3); } CBC_QRAlignmentPatternFinder::~CBC_QRAlignmentPatternFinder() { diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp index 2c707ea306..e8c8373242 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp @@ -32,6 +32,7 @@ int32_t CBC_QRCoderMaskUtil::ApplyMaskPenaltyRule1( return ApplyMaskPenaltyRule1Internal(matrix, TRUE) + ApplyMaskPenaltyRule1Internal(matrix, FALSE); } + int32_t CBC_QRCoderMaskUtil::ApplyMaskPenaltyRule2( CBC_CommonByteMatrix* matrix) { int32_t penalty = 0; @@ -50,6 +51,7 @@ int32_t CBC_QRCoderMaskUtil::ApplyMaskPenaltyRule2( } return 3 * penalty; } + int32_t CBC_QRCoderMaskUtil::ApplyMaskPenaltyRule3( CBC_CommonByteMatrix* matrix) { int32_t penalty = 0; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp index 44cfe8d91f..0fd46d5bbb 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp @@ -47,27 +47,28 @@ const int32_t CBC_QRCoderMatrixUtil::POSITION_ADJUSTMENT_PATTERN[5][5] = { {1, 1, 1, 1, 1}}; const int32_t CBC_QRCoderMatrixUtil::POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[40][7] = - { - {-1, -1, -1, -1, -1, -1, -1}, {6, 18, -1, -1, -1, -1, -1}, - {6, 22, -1, -1, -1, -1, -1}, {6, 26, -1, -1, -1, -1, -1}, - {6, 30, -1, -1, -1, -1, -1}, {6, 34, -1, -1, -1, -1, -1}, - {6, 22, 38, -1, -1, -1, -1}, {6, 24, 42, -1, -1, -1, -1}, - {6, 26, 46, -1, -1, -1, -1}, {6, 28, 50, -1, -1, -1, -1}, - {6, 30, 54, -1, -1, -1, -1}, {6, 32, 58, -1, -1, -1, -1}, - {6, 34, 62, -1, -1, -1, -1}, {6, 26, 46, 66, -1, -1, -1}, - {6, 26, 48, 70, -1, -1, -1}, {6, 26, 50, 74, -1, -1, -1}, - {6, 30, 54, 78, -1, -1, -1}, {6, 30, 56, 82, -1, -1, -1}, - {6, 30, 58, 86, -1, -1, -1}, {6, 34, 62, 90, -1, -1, -1}, - {6, 28, 50, 72, 94, -1, -1}, {6, 26, 50, 74, 98, -1, -1}, - {6, 30, 54, 78, 102, -1, -1}, {6, 28, 54, 80, 106, -1, -1}, - {6, 32, 58, 84, 110, -1, -1}, {6, 30, 58, 86, 114, -1, -1}, - {6, 34, 62, 90, 118, -1, -1}, {6, 26, 50, 74, 98, 122, -1}, - {6, 30, 54, 78, 102, 126, -1}, {6, 26, 52, 78, 104, 130, -1}, - {6, 30, 56, 82, 108, 134, -1}, {6, 34, 60, 86, 112, 138, -1}, - {6, 30, 58, 86, 114, 142, -1}, {6, 34, 62, 90, 118, 146, -1}, - {6, 30, 54, 78, 102, 126, 150}, {6, 24, 50, 76, 102, 128, 154}, - {6, 28, 54, 80, 106, 132, 158}, {6, 32, 58, 84, 110, 136, 162}, - {6, 26, 54, 82, 110, 138, 166}, {6, 30, 58, 86, 114, 142, 170}, + // NOLINTNEXTLINE + { + {-1, -1, -1, -1, -1, -1, -1}, {6, 18, -1, -1, -1, -1, -1}, + {6, 22, -1, -1, -1, -1, -1}, {6, 26, -1, -1, -1, -1, -1}, + {6, 30, -1, -1, -1, -1, -1}, {6, 34, -1, -1, -1, -1, -1}, + {6, 22, 38, -1, -1, -1, -1}, {6, 24, 42, -1, -1, -1, -1}, + {6, 26, 46, -1, -1, -1, -1}, {6, 28, 50, -1, -1, -1, -1}, + {6, 30, 54, -1, -1, -1, -1}, {6, 32, 58, -1, -1, -1, -1}, + {6, 34, 62, -1, -1, -1, -1}, {6, 26, 46, 66, -1, -1, -1}, + {6, 26, 48, 70, -1, -1, -1}, {6, 26, 50, 74, -1, -1, -1}, + {6, 30, 54, 78, -1, -1, -1}, {6, 30, 56, 82, -1, -1, -1}, + {6, 30, 58, 86, -1, -1, -1}, {6, 34, 62, 90, -1, -1, -1}, + {6, 28, 50, 72, 94, -1, -1}, {6, 26, 50, 74, 98, -1, -1}, + {6, 30, 54, 78, 102, -1, -1}, {6, 28, 54, 80, 106, -1, -1}, + {6, 32, 58, 84, 110, -1, -1}, {6, 30, 58, 86, 114, -1, -1}, + {6, 34, 62, 90, 118, -1, -1}, {6, 26, 50, 74, 98, 122, -1}, + {6, 30, 54, 78, 102, 126, -1}, {6, 26, 52, 78, 104, 130, -1}, + {6, 30, 56, 82, 108, 134, -1}, {6, 34, 60, 86, 112, 138, -1}, + {6, 30, 58, 86, 114, 142, -1}, {6, 34, 62, 90, 118, 146, -1}, + {6, 30, 54, 78, 102, 126, 150}, {6, 24, 50, 76, 102, 128, 154}, + {6, 28, 54, 80, 106, 132, 158}, {6, 32, 58, 84, 110, 136, 162}, + {6, 26, 54, 82, 110, 138, 166}, {6, 30, 58, 86, 114, 142, 170}, }; const int32_t CBC_QRCoderMatrixUtil::TYPE_INFO_COORDINATES[15][2] = { {8, 0}, {8, 1}, {8, 2}, {8, 3}, {8, 4}, {8, 5}, {8, 7}, {8, 8}, diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp index c93e945071..a26bc0ba46 100644 --- a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp @@ -1060,7 +1060,6 @@ CFX_DIBitmap* XFA_LoadImageFromBuffer(IFX_FileRead* pImageFileRead, dibAttr.m_nXDPI = (int32_t)(dibAttr.m_nXDPI / (FX_FLOAT)100 * 2.54f); dibAttr.m_nYDPI = (int32_t)(dibAttr.m_nYDPI / (FX_FLOAT)100 * 2.54f); break; - ; default: break; } diff --git a/xfa/src/fxfa/src/app/xfa_textlayout.cpp b/xfa/src/fxfa/src/app/xfa_textlayout.cpp index 37260bba0a..8c53248a65 100644 --- a/xfa/src/fxfa/src/app/xfa_textlayout.cpp +++ b/xfa/src/fxfa/src/app/xfa_textlayout.cpp @@ -1460,11 +1460,10 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode* pXMLNode, wsText = 0x00B7 + FX_WSTRC(L" "); } } else if (!bContentNode) { - if (iTabCount > 0) - while (iTabCount-- > 0) { + if (iTabCount > 0) { + while (iTabCount-- > 0) wsText += L'\t'; - } - else { + } else { m_textParser.GetEmbbedObj(m_pTextProvider, pXMLNode, wsText); } } @@ -1485,9 +1484,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode* pXMLNode, } else if (wsText.GetLength() > 0 && (0x20 == wsText.GetAt(wsText.GetLength() - 1))) { m_pLoader->m_dwFlags |= XFA_LOADERCNTXTFLG_FILTERSPACE; - } else if (wsText.GetLength() == 0) - ; - else { + } else if (wsText.GetLength() != 0) { m_pLoader->m_dwFlags &= ~XFA_LOADERCNTXTFLG_FILTERSPACE; } } diff --git a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp index 3f5e47d214..2066a9fb8c 100644 --- a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp +++ b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp @@ -521,7 +521,6 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() { CXFA_ContainerRecord* pRecord = CreateContainerRecord(); AddPageAreaLayoutItem(pRecord, pNode); break; - ; } } FX_BOOL bUsable = TRUE; @@ -670,7 +669,6 @@ FX_BOOL CXFA_LayoutPageMgr::RunBreak(XFA_ELEMENT eBreakType, case XFA_ATTRIBUTEENUM_Auto: default: break; - ; } return bRet; } diff --git a/xfa/src/fxfa/src/parser/xfa_parser_imp_embeddertest.cpp b/xfa/src/fxfa/src/parser/xfa_parser_imp_embeddertest.cpp index 7c50b4dab7..63fe272872 100644 --- a/xfa/src/fxfa/src/parser/xfa_parser_imp_embeddertest.cpp +++ b/xfa/src/fxfa/src/parser/xfa_parser_imp_embeddertest.cpp @@ -12,4 +12,4 @@ TEST_F(XFAParserImpEmbeddertest, Bug_216) { FPDF_PAGE page = LoadPage(0); EXPECT_NE(nullptr, page); UnloadPage(page); -}
\ No newline at end of file +} diff --git a/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp b/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp index 1574ef5148..243dae8c2d 100644 --- a/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp +++ b/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp @@ -307,8 +307,8 @@ FX_BOOL CXFA_NodeHelper::XFA_CreateNode_ForCondition( CFX_WideString& wsCondition) { int32_t iLen = wsCondition.GetLength(); CFX_WideString wsIndex = FX_WSTRC(L"0"); - ; FX_BOOL bAll = FALSE; + if (iLen == 0) { m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeOne; return FALSE; diff --git a/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp b/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp index be096d08ee..1ca7b64faa 100644 --- a/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp +++ b/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp @@ -47,7 +47,6 @@ CXFA_Node* XFA_CreateUIChild(CXFA_Node* pNode, XFA_ELEMENT& eWidgetType) { eUIType = XFA_ELEMENT_ImageEdit; eWidgetType = XFA_ELEMENT_Image; break; - ; case XFA_ELEMENT_Arc: case XFA_ELEMENT_Line: case XFA_ELEMENT_Rectangle: diff --git a/xfa/src/fxjse/src/context.cpp b/xfa/src/fxjse/src/context.cpp index 269e817cd6..ba76cb2b19 100644 --- a/xfa/src/fxjse/src/context.cpp +++ b/xfa/src/fxjse/src/context.cpp @@ -40,15 +40,31 @@ FXJSE_HRUNTIME FXJSE_Context_GetRuntime(FXJSE_HCONTEXT hContext) { : NULL; } static const FX_CHAR* szCompatibleModeScripts[] = { - "(function (global, list) { 'use strict'; var objname; for (objname in list) { var globalobj = global[objname];\n\ - if (globalobj) { list[objname].forEach( function (name) { if (!globalobj[name]) { Object.defineProperty(globalobj, name, {writable: true, enumerable: false, value: \n\ - (function (obj) {\n\ - if (arguments.length === 0) {\n\ - throw new TypeError('missing argument 0 when calling function ' + objname + '.' + name);\n\ - }\n\ - return globalobj.prototype[name].apply(obj, Array.prototype.slice.call(arguments, 1));\n\ -})});}});}}}(this, {String: ['substr', 'toUpperCase']}));", -}; + "(function(global, list) {\n" + " 'use strict';\n" + " var objname;\n" + " for (objname in list) {\n" + " var globalobj = global[objname];\n" + " if (globalobj) {\n" + " list[objname].forEach(function(name) {\n" + " if (!globalobj[name]) {\n" + " Object.defineProperty(globalobj, name, {\n" + " writable: true,\n" + " enumerable: false,\n" + " value: (function(obj) {\n" + " if (arguments.length === 0) {\n" + " throw new TypeError('missing argument 0 when calling " + " function ' + objname + '.' + name);\n" + " }\n" + " return globalobj.prototype[name].apply(obj, " + " Array.prototype.slice.call(arguments, 1));\n" + " })\n" + " });\n" + " }\n" + " });\n" + " }\n" + " }\n" + "}(this, {String: ['substr', 'toUpperCase']}));"}; void FXJSE_Context_EnableCompatibleMode(FXJSE_HCONTEXT hContext, FX_DWORD dwCompatibleFlags) { for (uint32_t i = 0; i < (uint32_t)FXJSE_COMPATIBLEMODEFLAGCOUNT; i++) { |