summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/fpdfapi/font/fpdf_font.cpp2
-rw-r--r--core/fpdfapi/font/ttgsubtable.cpp4
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp2
-rw-r--r--core/fpdfapi/page/fpdf_page_func.cpp6
-rw-r--r--core/fpdfapi/parser/cpdf_array_unittest.cpp12
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp2
-rw-r--r--core/fpdfdoc/cpdf_formfield.cpp2
-rw-r--r--fpdfsdk/cba_annotiterator.cpp2
-rw-r--r--fpdfsdk/cpdfsdk_annotiteration.cpp2
-rw-r--r--fpdfsdk/cpdfsdk_interform.cpp2
-rw-r--r--fpdfsdk/fpdfeditpath.cpp16
-rw-r--r--fpdfsdk/fpdfedittext.cpp2
-rw-r--r--fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp2
-rw-r--r--fpdfsdk/javascript/Field.cpp2
-rw-r--r--fpdfsdk/pdfwindow/PWL_Wnd.cpp18
-rw-r--r--xfa/fde/cfde_txtedttextset.cpp2
-rw-r--r--xfa/fde/css/cfde_cssstyleselector.cpp10
-rw-r--r--xfa/fde/css/cfde_cssstylesheet.cpp2
-rw-r--r--xfa/fde/css/cfde_cssstylesheet_unittest.cpp2
-rw-r--r--xfa/fwl/cfwl_checkbox.cpp2
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp4
-rw-r--r--xfa/fxfa/app/xfa_ffchoicelist.cpp2
-rw-r--r--xfa/fxfa/app/xfa_ffdocview.cpp6
-rw-r--r--xfa/fxfa/app/xfa_ffpageview.cpp4
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_layoutitem.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_layout_itemlayout.cpp6
-rw-r--r--xfa/fxfa/parser/xfa_utils.cpp17
28 files changed, 69 insertions, 68 deletions
diff --git a/core/fpdfapi/font/fpdf_font.cpp b/core/fpdfapi/font/fpdf_font.cpp
index 7bbd637177..86beccaeb4 100644
--- a/core/fpdfapi/font/fpdf_font.cpp
+++ b/core/fpdfapi/font/fpdf_font.cpp
@@ -36,7 +36,7 @@ int TT2PDF(int m, FXFT_Face face) {
}
bool FT_UseTTCharmap(FXFT_Face face, int platform_id, int encoding_id) {
- auto* pCharMap = FXFT_Get_Face_Charmaps(face);
+ auto** pCharMap = FXFT_Get_Face_Charmaps(face);
for (int i = 0; i < FXFT_Get_Face_CharmapCount(face); i++) {
if (FXFT_Get_Charmap_PlatformID(pCharMap[i]) == platform_id &&
FXFT_Get_Charmap_EncodingID(pCharMap[i]) == encoding_id) {
diff --git a/core/fpdfapi/font/ttgsubtable.cpp b/core/fpdfapi/font/ttgsubtable.cpp
index 51e8e9cc20..946ccd7abe 100644
--- a/core/fpdfapi/font/ttgsubtable.cpp
+++ b/core/fpdfapi/font/ttgsubtable.cpp
@@ -144,7 +144,7 @@ bool CFX_CTTGSUBTable::GetVerticalGlyphSub2(uint32_t glyphnum,
for (const auto& subTable : Lookup->SubTables) {
switch (subTable->SubstFormat) {
case 1: {
- auto tbl1 = static_cast<TSingleSubstFormat1*>(subTable.get());
+ auto* tbl1 = static_cast<TSingleSubstFormat1*>(subTable.get());
if (GetCoverageIndex(tbl1->Coverage.get(), glyphnum) >= 0) {
*vglyphnum = glyphnum + tbl1->DeltaGlyphID;
return true;
@@ -152,7 +152,7 @@ bool CFX_CTTGSUBTable::GetVerticalGlyphSub2(uint32_t glyphnum,
break;
}
case 2: {
- auto tbl2 = static_cast<TSingleSubstFormat2*>(subTable.get());
+ auto* tbl2 = static_cast<TSingleSubstFormat2*>(subTable.get());
int index = GetCoverageIndex(tbl2->Coverage.get(), glyphnum);
if (index >= 0 &&
index < pdfium::CollectionSize<int>(tbl2->Substitutes)) {
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 6211b6a4dd..102ec7973a 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -163,7 +163,7 @@ struct AbbrReplacementOp {
CFX_ByteStringC FindFullName(const AbbrPair* table,
size_t count,
const CFX_ByteStringC& abbr) {
- auto it = std::find_if(table, table + count, [abbr](const AbbrPair& pair) {
+ auto* it = std::find_if(table, table + count, [abbr](const AbbrPair& pair) {
return pair.abbr == abbr;
});
return it != table + count ? CFX_ByteStringC(it->full_name)
diff --git a/core/fpdfapi/page/fpdf_page_func.cpp b/core/fpdfapi/page/fpdf_page_func.cpp
index 916641f05d..f81ec9e6bd 100644
--- a/core/fpdfapi/page/fpdf_page_func.cpp
+++ b/core/fpdfapi/page/fpdf_page_func.cpp
@@ -469,9 +469,9 @@ bool CPDF_PSEngine::DoOperator(PDF_PSOP op) {
j %= n;
if (j > 0)
j -= n;
- auto begin_it = std::begin(m_Stack) + m_StackCount - n;
- auto middle_it = begin_it - j;
- auto end_it = std::begin(m_Stack) + m_StackCount;
+ auto* begin_it = std::begin(m_Stack) + m_StackCount - n;
+ auto* middle_it = begin_it - j;
+ auto* end_it = std::begin(m_Stack) + m_StackCount;
std::rotate(begin_it, middle_it, end_it);
break;
}
diff --git a/core/fpdfapi/parser/cpdf_array_unittest.cpp b/core/fpdfapi/parser/cpdf_array_unittest.cpp
index 46777289b5..6d458d83cd 100644
--- a/core/fpdfapi/parser/cpdf_array_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_array_unittest.cpp
@@ -133,9 +133,9 @@ TEST(cpdf_array, Clone) {
EXPECT_NE(arr_elem, arr1_elem);
EXPECT_NE(arr_elem, arr2_elem);
for (size_t j = 0; j < kNumOfRowElems; ++j) {
- auto elem_obj = arr_elem->GetObjectAt(j);
- auto elem_obj1 = arr1_elem->GetObjectAt(j);
- auto elem_obj2 = arr2_elem->GetObjectAt(j);
+ auto* elem_obj = arr_elem->GetObjectAt(j);
+ auto* elem_obj1 = arr1_elem->GetObjectAt(j);
+ auto* elem_obj2 = arr2_elem->GetObjectAt(j);
// Results from not deferencing reference objects.
EXPECT_NE(elem_obj, elem_obj1);
EXPECT_TRUE(elem_obj1->IsReference());
@@ -154,7 +154,7 @@ TEST(cpdf_array, Clone) {
for (size_t i = 0; i < kNumOfRows; ++i) {
for (size_t j = 0; j < kNumOfRowElems; ++j) {
// Results from not deferencing reference objects.
- auto elem_obj1 = arr1->GetObjectAt(i)->AsArray()->GetObjectAt(j);
+ auto* elem_obj1 = arr1->GetObjectAt(i)->AsArray()->GetObjectAt(j);
EXPECT_TRUE(elem_obj1->IsReference());
EXPECT_EQ(elems[i][j], elem_obj1->GetInteger());
// Results from deferencing reference objects.
@@ -166,8 +166,8 @@ TEST(cpdf_array, Clone) {
}
TEST(cpdf_array, Iterator) {
- int elems[] = {-23, -11, 3, 455, 2345877,
- 0, 7895330, -12564334, 10000, -100000};
+ const int elems[] = {-23, -11, 3, 455, 2345877,
+ 0, 7895330, -12564334, 10000, -100000};
std::unique_ptr<CPDF_Array> arr(new CPDF_Array);
for (size_t i = 0; i < FX_ArraySize(elems); ++i)
arr->InsertNewAt<CPDF_Number>(i, elems[i]);
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 9022212ecc..682e6c0c91 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -1993,7 +1993,7 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(const CPDF_TextObject* textobj,
CharPosList.Load(textobj->m_CharCodes, textobj->m_CharPos, pFont, font_size);
for (uint32_t i = 0; i < CharPosList.m_nChars; i++) {
FXTEXT_CHARPOS& charpos = CharPosList.m_pCharPos[i];
- auto font =
+ auto* font =
charpos.m_FallbackFontPosition == -1
? &pFont->m_Font
: pFont->m_FontFallbacks[charpos.m_FallbackFontPosition].get();
diff --git a/core/fpdfdoc/cpdf_formfield.cpp b/core/fpdfdoc/cpdf_formfield.cpp
index b4aa90e2be..f9187d8d27 100644
--- a/core/fpdfdoc/cpdf_formfield.cpp
+++ b/core/fpdfdoc/cpdf_formfield.cpp
@@ -407,7 +407,7 @@ int CPDF_FormField::GetMaxLen() const {
if (CPDF_Object* pObj = FPDF_GetFieldAttr(m_pDict, "MaxLen"))
return pObj->GetInteger();
- for (const auto& pControl : m_ControlList) {
+ for (auto* pControl : m_ControlList) {
if (!pControl)
continue;
CPDF_Dictionary* pWidgetDict = pControl->m_pWidgetDict;
diff --git a/fpdfsdk/cba_annotiterator.cpp b/fpdfsdk/cba_annotiterator.cpp
index cc842babee..409a9282d1 100644
--- a/fpdfsdk/cba_annotiterator.cpp
+++ b/fpdfsdk/cba_annotiterator.cpp
@@ -73,7 +73,7 @@ CPDFSDK_Annot* CBA_AnnotIterator::GetPrevAnnot(CPDFSDK_Annot* pAnnot) {
}
void CBA_AnnotIterator::CollectAnnots(std::vector<CPDFSDK_Annot*>* pArray) {
- for (auto pAnnot : m_pPageView->GetAnnotList()) {
+ for (auto* pAnnot : m_pPageView->GetAnnotList()) {
if (pAnnot->GetAnnotSubtype() == m_nAnnotSubtype &&
!pAnnot->IsSignatureWidget()) {
pArray->push_back(pAnnot);
diff --git a/fpdfsdk/cpdfsdk_annotiteration.cpp b/fpdfsdk/cpdfsdk_annotiteration.cpp
index dd99ade509..d256950658 100644
--- a/fpdfsdk/cpdfsdk_annotiteration.cpp
+++ b/fpdfsdk/cpdfsdk_annotiteration.cpp
@@ -33,7 +33,7 @@ CPDFSDK_AnnotIteration::CPDFSDK_AnnotIteration(CPDFSDK_PageView* pPageView,
std::reverse(copiedList.begin(), copiedList.end());
m_List.reserve(copiedList.size());
- for (const auto& pAnnot : copiedList)
+ for (auto* pAnnot : copiedList)
m_List.emplace_back(pAnnot);
}
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp
index 4ebcf8a2f3..1dbffa4a5a 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -321,7 +321,7 @@ void CPDFSDK_InterForm::ResetFieldAppearance(CPDF_FormField* pFormField,
}
void CPDFSDK_InterForm::UpdateField(CPDF_FormField* pFormField) {
- auto formfiller = m_pFormFillEnv->GetInteractiveFormFiller();
+ auto* formfiller = m_pFormFillEnv->GetInteractiveFormFiller();
for (int i = 0, sz = pFormField->CountControls(); i < sz; i++) {
CPDF_FormControl* pFormCtrl = pFormField->GetControl(i);
ASSERT(pFormCtrl);
diff --git a/fpdfsdk/fpdfeditpath.cpp b/fpdfsdk/fpdfeditpath.cpp
index 074f083bb1..d7ffd8b1f2 100644
--- a/fpdfsdk/fpdfeditpath.cpp
+++ b/fpdfsdk/fpdfeditpath.cpp
@@ -33,7 +33,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
if (!path || R > 255 || G > 255 || B > 255 || A > 255)
return false;
- auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
pPathObj->m_GeneralState.SetStrokeAlpha(A / 255.f);
FX_FLOAT rgb[3] = {R / 255.f, G / 255.f, B / 255.f};
pPathObj->m_ColorState.SetStrokeColor(
@@ -45,7 +45,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width) {
if (!path || width < 0.0f)
return false;
- auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
pPathObj->m_GraphState.SetLineWidth(width);
return true;
}
@@ -58,7 +58,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetFillColor(FPDF_PAGEOBJECT path,
if (!path || R > 255 || G > 255 || B > 255 || A > 255)
return false;
- auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
pPathObj->m_GeneralState.SetFillAlpha(A / 255.f);
FX_FLOAT rgb[3] = {R / 255.f, G / 255.f, B / 255.f};
pPathObj->m_ColorState.SetFillColor(
@@ -70,7 +70,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_MoveTo(FPDF_PAGEOBJECT path, float x, float y) {
if (!path)
return false;
- auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
pPathObj->m_Path.AppendPoint(CFX_PointF(x, y), FXPT_TYPE::MoveTo, false);
return true;
}
@@ -79,7 +79,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_LineTo(FPDF_PAGEOBJECT path, float x, float y) {
if (!path)
return false;
- auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
pPathObj->m_Path.AppendPoint(CFX_PointF(x, y), FXPT_TYPE::LineTo, false);
return true;
}
@@ -94,7 +94,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_BezierTo(FPDF_PAGEOBJECT path,
if (!path)
return false;
- auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
pPathObj->m_Path.AppendPoint(CFX_PointF(x1, y1), FXPT_TYPE::BezierTo, false);
pPathObj->m_Path.AppendPoint(CFX_PointF(x2, y2), FXPT_TYPE::BezierTo, false);
pPathObj->m_Path.AppendPoint(CFX_PointF(x3, y3), FXPT_TYPE::BezierTo, false);
@@ -105,7 +105,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_Close(FPDF_PAGEOBJECT path) {
if (!path)
return false;
- auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
if (pPathObj->m_Path.GetPoints().empty())
return false;
@@ -119,7 +119,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path,
if (!path)
return false;
- auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
if (fillmode == FPDF_FILLMODE_ALTERNATE)
pPathObj->m_FillType = FXFILL_ALTERNATE;
diff --git a/fpdfsdk/fpdfedittext.cpp b/fpdfsdk/fpdfedittext.cpp
index 5ce4be65a1..aec6050d21 100644
--- a/fpdfsdk/fpdfedittext.cpp
+++ b/fpdfsdk/fpdfedittext.cpp
@@ -240,7 +240,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFText_SetText(FPDF_PAGEOBJECT text_object,
if (!text_object)
return false;
- auto pTextObj = reinterpret_cast<CPDF_TextObject*>(text_object);
+ auto* pTextObj = reinterpret_cast<CPDF_TextObject*>(text_object);
pTextObj->SetText(CFX_ByteString(text));
return true;
}
diff --git a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp
index 39aa72be87..c03ee45ac4 100644
--- a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp
+++ b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp
@@ -66,7 +66,7 @@ void CXFA_FWLAdapterTimerMgr::TimerProc(int32_t idEvent) {
if (!s_TimerArray)
return;
- for (const auto info : *s_TimerArray) {
+ for (auto* info : *s_TimerArray) {
CFWL_FWLAdapterTimerInfo* pInfo =
static_cast<CFWL_FWLAdapterTimerInfo*>(info);
if (pInfo->idEvent == idEvent) {
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
index f37b3d486b..61a2538df7 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -1816,7 +1816,7 @@ bool Field::page(CJS_Runtime* pRuntime,
return false;
}
- auto pWidget = static_cast<CPDFSDK_Widget*>(pObserved.Get());
+ auto* pWidget = static_cast<CPDFSDK_Widget*>(pObserved.Get());
CPDFSDK_PageView* pPageView = pWidget->GetPageView();
if (!pPageView)
return false;
diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
index 14024dd5d4..dc307a1be3 100644
--- a/fpdfsdk/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
@@ -15,7 +15,7 @@
static std::map<int32_t, CPWL_Timer*>& GetPWLTimeMap() {
// Leak the object at shutdown.
- static auto timeMap = new std::map<int32_t, CPWL_Timer*>;
+ static auto* timeMap = new std::map<int32_t, CPWL_Timer*>;
return *timeMap;
}
@@ -412,7 +412,7 @@ void CPWL_Wnd::InvalidateRect(CFX_FloatRect* pRect) {
return false; \
if (!IsWndCaptureKeyboard(this)) \
return false; \
- for (const auto& pChild : m_Children) { \
+ for (auto* pChild : m_Children) { \
if (pChild && IsWndCaptureKeyboard(pChild)) \
return pChild->key_method_name(nChar, nFlag); \
} \
@@ -428,7 +428,7 @@ PWL_IMPLEMENT_KEY_METHOD(OnChar)
if (!IsValid() || !IsVisible() || !IsEnabled()) \
return false; \
if (IsWndCaptureMouse(this)) { \
- for (const auto& pChild : m_Children) { \
+ for (auto* pChild : m_Children) { \
if (pChild && IsWndCaptureMouse(pChild)) { \
return pChild->mouse_method_name(pChild->ParentToChild(point), \
nFlag); \
@@ -437,7 +437,7 @@ PWL_IMPLEMENT_KEY_METHOD(OnChar)
SetCursor(); \
return false; \
} \
- for (const auto& pChild : m_Children) { \
+ for (auto* pChild : m_Children) { \
if (pChild && pChild->WndHitTest(pChild->ParentToChild(point))) { \
return pChild->mouse_method_name(pChild->ParentToChild(point), nFlag); \
} \
@@ -465,7 +465,7 @@ bool CPWL_Wnd::OnMouseWheel(short zDelta,
if (!IsWndCaptureKeyboard(this))
return false;
- for (const auto& pChild : m_Children) {
+ for (auto* pChild : m_Children) {
if (pChild && IsWndCaptureKeyboard(pChild))
return pChild->OnMouseWheel(zDelta, pChild->ParentToChild(point), nFlag);
}
@@ -628,7 +628,7 @@ void CPWL_Wnd::SetCapture() {
}
void CPWL_Wnd::ReleaseCapture() {
- for (const auto& pChild : m_Children) {
+ for (auto* pChild : m_Children) {
if (pChild)
pChild->ReleaseCapture();
}
@@ -674,7 +674,7 @@ void CPWL_Wnd::SetVisible(bool bVisible) {
if (!IsValid())
return;
- for (const auto& pChild : m_Children) {
+ for (auto* pChild : m_Children) {
if (pChild)
pChild->SetVisible(bVisible);
}
@@ -818,7 +818,7 @@ int32_t CPWL_Wnd::GetTransparency() {
}
void CPWL_Wnd::SetTransparency(int32_t nTransparency) {
- for (const auto& pChild : m_Children) {
+ for (auto* pChild : m_Children) {
if (pChild)
pChild->SetTransparency(nTransparency);
}
@@ -892,7 +892,7 @@ void CPWL_Wnd::EnableWindow(bool bEnable) {
if (m_bEnabled == bEnable)
return;
- for (const auto& pChild : m_Children) {
+ for (auto* pChild : m_Children) {
if (pChild)
pChild->EnableWindow(bEnable);
}
diff --git a/xfa/fde/cfde_txtedttextset.cpp b/xfa/fde/cfde_txtedttextset.cpp
index 1f86dabcdd..a6503f4022 100644
--- a/xfa/fde/cfde_txtedttextset.cpp
+++ b/xfa/fde/cfde_txtedttextset.cpp
@@ -78,7 +78,7 @@ std::vector<CFX_RectF> CFDE_TxtEdtTextSet::GetCharRects(
if (!pPiece || pPiece->nCount < 1)
return std::vector<CFX_RectF>();
- auto pEngine = static_cast<CFDE_TxtEdtEngine*>(m_pPage->GetEngine());
+ auto* pEngine = static_cast<CFDE_TxtEdtEngine*>(m_pPage->GetEngine());
const FDE_TXTEDTPARAMS* pTextParams = pEngine->GetEditParams();
uint32_t dwLayoutStyle = pEngine->GetTextBreak()->GetLayoutStyles();
FX_TXTRUN tr;
diff --git a/xfa/fde/css/cfde_cssstyleselector.cpp b/xfa/fde/css/cfde_cssstyleselector.cpp
index 5a7aa1b7ff..08cd0e9251 100644
--- a/xfa/fde/css/cfde_cssstyleselector.cpp
+++ b/xfa/fde/css/cfde_cssstyleselector.cpp
@@ -56,7 +56,7 @@ CFDE_CSSStyleSelector::MatchDeclarations(const CFX_WideString& tagname) {
if (m_UARules.CountSelectors() == 0 || tagname.IsEmpty())
return matchedDecls;
- auto rules = m_UARules.GetTagRuleData(tagname);
+ auto* rules = m_UARules.GetTagRuleData(tagname);
if (!rules)
return matchedDecls;
@@ -106,19 +106,19 @@ void CFDE_CSSStyleSelector::ApplyDeclarations(
std::vector<const CFDE_CSSPropertyHolder*> normals;
std::vector<const CFDE_CSSCustomProperty*> customs;
- for (auto& decl : declArray)
+ for (auto* decl : declArray)
ExtractValues(decl, &importants, &normals, &customs);
if (extraDecl)
ExtractValues(extraDecl, &importants, &normals, &customs);
- for (auto& prop : normals)
+ for (auto* prop : normals)
ApplyProperty(prop->eProperty, prop->pValue, pComputedStyle);
- for (auto& prop : customs)
+ for (auto* prop : customs)
pComputedStyle->AddCustomStyle(*prop);
- for (auto& prop : importants)
+ for (auto* prop : importants)
ApplyProperty(prop->eProperty, prop->pValue, pComputedStyle);
}
diff --git a/xfa/fde/css/cfde_cssstylesheet.cpp b/xfa/fde/css/cfde_cssstylesheet.cpp
index c8bf70ec23..e259e2f332 100644
--- a/xfa/fde/css/cfde_cssstylesheet.cpp
+++ b/xfa/fde/css/cfde_cssstylesheet.cpp
@@ -85,7 +85,7 @@ FDE_CSSSyntaxStatus CFDE_CSSStyleSheet::LoadStyleRule(
case FDE_CSSSyntaxStatus::PropertyValue: {
if (propertyTable || iValueLen > 0) {
CFX_WideStringC strValue = pSyntax->GetCurrentString();
- auto decl = pStyleRule->GetDeclaration();
+ auto* decl = pStyleRule->GetDeclaration();
if (!strValue.IsEmpty()) {
if (propertyTable) {
decl->AddProperty(propertyTable, strValue);
diff --git a/xfa/fde/css/cfde_cssstylesheet_unittest.cpp b/xfa/fde/css/cfde_cssstylesheet_unittest.cpp
index fa73a7a9ba..9d8ecb9347 100644
--- a/xfa/fde/css/cfde_cssstylesheet_unittest.cpp
+++ b/xfa/fde/css/cfde_cssstylesheet_unittest.cpp
@@ -143,7 +143,7 @@ TEST_F(CFDE_CSSStyleSheetTest, ParseChildSelectors) {
CFDE_CSSStyleRule* style = sheet_->GetRule(0);
EXPECT_EQ(1UL, style->CountSelectorLists());
- auto sel = style->GetSelectorList(0);
+ auto* sel = style->GetSelectorList(0);
EXPECT_TRUE(sel != nullptr);
EXPECT_EQ(FX_HashCode_GetW(L"c", true), sel->GetNameHash());
diff --git a/xfa/fwl/cfwl_checkbox.cpp b/xfa/fwl/cfwl_checkbox.cpp
index 0102bc7cc4..ca31094fe6 100644
--- a/xfa/fwl/cfwl_checkbox.cpp
+++ b/xfa/fwl/cfwl_checkbox.cpp
@@ -184,7 +184,7 @@ void CFWL_CheckBox::NextStates() {
if (!pWidgetMgr->IsFormDisabled()) {
std::vector<CFWL_Widget*> radioarr =
pWidgetMgr->GetSameGroupRadioButton(this);
- for (const auto& pWidget : radioarr) {
+ for (auto* pWidget : radioarr) {
CFWL_CheckBox* pCheckBox = static_cast<CFWL_CheckBox*>(pWidget);
if (pCheckBox != this &&
pCheckBox->GetStates() & FWL_STATE_CKB_Checked) {
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
index 2c262f006b..3a442bedbb 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
@@ -259,8 +259,8 @@ void CBC_QRCoderEncoder::MergeString(
int32_t& e) {
size_t mergeNum = 0;
for (size_t i = 0; i + 1 < result->size(); i++) {
- auto element1 = &(*result)[i];
- auto element2 = &(*result)[i + 1];
+ auto* element1 = &(*result)[i];
+ auto* element2 = &(*result)[i + 1];
if (element1->first == CBC_QRCoderMode::sALPHANUMERIC) {
int32_t tmp = GetSpanByVersion(CBC_QRCoderMode::sALPHANUMERIC,
CBC_QRCoderMode::sBYTE, versionNum, e);
diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp
index 3aabde870a..66b52fec40 100644
--- a/xfa/fxfa/app/xfa_ffchoicelist.cpp
+++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp
@@ -227,7 +227,7 @@ CFX_RectF CXFA_FFComboBox::GetBBox(uint32_t dwStatus, bool bDrawFocus) {
}
bool CXFA_FFComboBox::PtInActiveRect(const CFX_PointF& point) {
- auto pComboBox = static_cast<CFWL_ComboBox*>(m_pNormalWidget);
+ auto* pComboBox = static_cast<CFWL_ComboBox*>(m_pNormalWidget);
return pComboBox && pComboBox->GetBBox().Contains(point);
}
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index 87441814e5..545afcad00 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -633,12 +633,12 @@ void CXFA_FFDocView::AddCalculateWidgetAcc(CXFA_WidgetAcc* pWidgetAcc) {
}
void CXFA_FFDocView::AddCalculateNodeNotify(CXFA_Node* pNodeChange) {
- auto pGlobalData =
+ auto* pGlobalData =
static_cast<CXFA_CalcData*>(pNodeChange->GetUserData(XFA_CalcData));
if (!pGlobalData)
return;
- for (const auto& pResultAcc : pGlobalData->m_Globals) {
+ for (auto* pResultAcc : pGlobalData->m_Globals) {
if (!pResultAcc->GetNode()->HasRemovedChildren())
AddCalculateWidgetAcc(pResultAcc);
}
@@ -723,7 +723,7 @@ bool CXFA_FFDocView::RunEventLayoutReady() {
return true;
}
void CXFA_FFDocView::RunBindItems() {
- for (const auto& item : m_BindItems) {
+ for (auto* item : m_BindItems) {
if (item->HasRemovedChildren())
continue;
diff --git a/xfa/fxfa/app/xfa_ffpageview.cpp b/xfa/fxfa/app/xfa_ffpageview.cpp
index caff52c6c0..181f0f19a5 100644
--- a/xfa/fxfa/app/xfa_ffpageview.cpp
+++ b/xfa/fxfa/app/xfa_ffpageview.cpp
@@ -363,8 +363,8 @@ void CXFA_FFTabOrderPageWidgetIterator::CreateTabOrderWidgetArray() {
static int32_t XFA_TabOrderWidgetComparator(const void* phWidget1,
const void* phWidget2) {
- auto param1 = *static_cast<CXFA_TabParam**>(const_cast<void*>(phWidget1));
- auto param2 = *static_cast<CXFA_TabParam**>(const_cast<void*>(phWidget2));
+ auto* param1 = *static_cast<CXFA_TabParam**>(const_cast<void*>(phWidget1));
+ auto* param2 = *static_cast<CXFA_TabParam**>(const_cast<void*>(phWidget2));
CFX_RectF rt1 = param1->m_pWidget->GetWidgetRect();
CFX_RectF rt2 = param2->m_pWidget->GetWidgetRect();
FX_FLOAT x1 = rt1.left, y1 = rt1.top, x2 = rt2.left, y2 = rt2.top;
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index adc5c31cc6..960771f9f8 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -1505,7 +1505,7 @@ CFX_RetainPtr<CFGAS_GEFont> CXFA_WidgetAcc::GetFDEFont() {
font.GetTypeface(wsFontName);
}
- auto pDoc = GetDoc();
+ auto* pDoc = GetDoc();
return pDoc->GetApp()->GetXFAFontMgr()->GetFont(pDoc, wsFontName,
dwFontStyle);
}
diff --git a/xfa/fxfa/parser/cxfa_layoutitem.cpp b/xfa/fxfa/parser/cxfa_layoutitem.cpp
index 476d6118ac..5409c4e0c1 100644
--- a/xfa/fxfa/parser/cxfa_layoutitem.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutitem.cpp
@@ -64,7 +64,7 @@ CXFA_ContainerLayoutItem* CXFA_LayoutItem::GetPage() const {
CFX_RectF CXFA_LayoutItem::GetRect(bool bRelative) const {
ASSERT(m_bIsContentLayoutItem);
- auto pThis = static_cast<const CXFA_ContentLayoutItem*>(this);
+ auto* pThis = static_cast<const CXFA_ContentLayoutItem*>(this);
CFX_PointF sPos = pThis->m_sPos;
CFX_SizeF sSize = pThis->m_sSize;
if (bRelative)
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
index dd38c963d6..dd04668a33 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
@@ -182,7 +182,7 @@ void RelocateTableRowCells(
int32_t nCurrentColIdx = 0;
bool bMetWholeRowCell = false;
- for (auto pLayoutChild =
+ for (auto* pLayoutChild =
static_cast<CXFA_ContentLayoutItem*>(pLayoutRow->m_pFirstChild);
pLayoutChild; pLayoutChild = static_cast<CXFA_ContentLayoutItem*>(
pLayoutChild->m_pNextSibling)) {
@@ -1995,7 +1995,7 @@ bool CXFA_ItemLayoutProcessor::ProcessKeepForSplit(
childSize.height, &keepLayoutItems)) {
m_arrayKeepItems.clear();
- for (auto item : keepLayoutItems) {
+ for (auto* item : keepLayoutItems) {
pParentProcessor->m_pLayoutItem->RemoveChild(item);
*fContentCurRowY -= item->m_sSize.height;
m_arrayKeepItems.push_back(item);
@@ -2271,7 +2271,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
case XFA_ItemLayoutProcessorStages::None:
break;
case XFA_ItemLayoutProcessorStages::BreakBefore: {
- for (auto item : m_arrayKeepItems) {
+ for (auto* item : m_arrayKeepItems) {
m_pLayoutItem->RemoveChild(item);
fContentCalculatedHeight -= item->m_sSize.height;
}
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp
index 6f54c0e5fe..216c5a56c4 100644
--- a/xfa/fxfa/parser/xfa_utils.cpp
+++ b/xfa/fxfa/parser/xfa_utils.cpp
@@ -328,10 +328,10 @@ const XFA_PROPERTY* XFA_GetPropertyOfElement(XFA_Element eElement,
if (!pProperties || iCount < 1)
return nullptr;
- auto it = std::find_if(pProperties, pProperties + iCount,
- [eProperty](const XFA_PROPERTY& prop) {
- return prop.eName == eProperty;
- });
+ auto* it = std::find_if(pProperties, pProperties + iCount,
+ [eProperty](const XFA_PROPERTY& prop) {
+ return prop.eName == eProperty;
+ });
if (it == pProperties + iCount)
return nullptr;
@@ -375,10 +375,11 @@ XFA_Element XFA_GetElementTypeForName(const CFX_WideStringC& wsName) {
uint32_t uHash = FX_HashCode_GetW(wsName, false);
const XFA_ELEMENTINFO* pEnd = g_XFAElementData + g_iXFAElementCount;
- auto pInfo = std::lower_bound(g_XFAElementData, pEnd, uHash,
- [](const XFA_ELEMENTINFO& info, uint32_t hash) {
- return info.uHash < hash;
- });
+ auto* pInfo =
+ std::lower_bound(g_XFAElementData, pEnd, uHash,
+ [](const XFA_ELEMENTINFO& info, uint32_t hash) {
+ return info.uHash < hash;
+ });
if (pInfo < pEnd && pInfo->uHash == uHash)
return pInfo->eName;
return XFA_Element::Unknown;