Fix ClangTidy - Naming findings
Fix mismatched declaration/definition parameter names in
/fpdfsdk/
PiperOrigin-RevId: 253054092
Change-Id: I7c1f871d60e43edb2666fc3a621ffd6eb173aa35
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/56191
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_annothandlermgr.h b/fpdfsdk/cpdfsdk_annothandlermgr.h
index 86dc9f8..30fc32c 100644
--- a/fpdfsdk/cpdfsdk_annothandlermgr.h
+++ b/fpdfsdk/cpdfsdk_annothandlermgr.h
@@ -28,7 +28,7 @@
class CPDFSDK_AnnotHandlerMgr {
public:
- explicit CPDFSDK_AnnotHandlerMgr(CPDFSDK_FormFillEnvironment* pApp);
+ explicit CPDFSDK_AnnotHandlerMgr(CPDFSDK_FormFillEnvironment* pFormFillEnv);
~CPDFSDK_AnnotHandlerMgr();
CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView);
@@ -111,7 +111,8 @@
const CFX_PointF& point);
private:
- IPDFSDK_AnnotHandler* GetAnnotHandler(CPDF_Annot::Subtype nSubtype) const;
+ IPDFSDK_AnnotHandler* GetAnnotHandler(
+ CPDF_Annot::Subtype nAnnotSubtype) const;
CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, bool bNext);
std::unique_ptr<CPDFSDK_BAAnnotHandler> m_pBAAnnotHandler;
diff --git a/fpdfsdk/cpdfsdk_baannot.h b/fpdfsdk/cpdfsdk_baannot.h
index 9430c2d..d4b5b5c 100644
--- a/fpdfsdk/cpdfsdk_baannot.h
+++ b/fpdfsdk/cpdfsdk_baannot.h
@@ -66,7 +66,7 @@
CPDF_AAction GetAAction() const;
- void SetOpenState(bool bState);
+ void SetOpenState(bool bOpenState);
protected:
CPDF_Dictionary* GetAPDict() const;
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.h b/fpdfsdk/cpdfsdk_formfillenvironment.h
index 9e85668..ce357d4 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.h
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.h
@@ -54,12 +54,12 @@
static bool IsCTRLKeyDown(uint32_t nFlag);
static bool IsALTKeyDown(uint32_t nFlag);
- CPDFSDK_PageView* GetPageView(IPDF_Page* pPage, bool renew);
+ CPDFSDK_PageView* GetPageView(IPDF_Page* pUnderlyingPage, bool renew);
CPDFSDK_PageView* GetPageView(int nIndex);
#ifdef PDF_ENABLE_V8
CPDFSDK_PageView* GetCurrentView();
#endif
- void RemovePageView(IPDF_Page* pPage);
+ void RemovePageView(IPDF_Page* pUnderlyingPage);
void UpdateAllViews(CPDFSDK_PageView* pSender, CPDFSDK_Annot* pAnnot);
CPDFSDK_Annot* GetFocusAnnot() const { return m_pFocusAnnot.Get(); }
diff --git a/fpdfsdk/cpdfsdk_widgethandler.h b/fpdfsdk/cpdfsdk_widgethandler.h
index ba7649b..747ae2c 100644
--- a/fpdfsdk/cpdfsdk_widgethandler.h
+++ b/fpdfsdk/cpdfsdk_widgethandler.h
@@ -27,7 +27,7 @@
class CPDFSDK_WidgetHandler final : public IPDFSDK_AnnotHandler {
public:
- explicit CPDFSDK_WidgetHandler(CPDFSDK_FormFillEnvironment* pApp);
+ explicit CPDFSDK_WidgetHandler(CPDFSDK_FormFillEnvironment* pFormFillEnv);
~CPDFSDK_WidgetHandler() override;
bool CanAnswer(CPDFSDK_Annot* pAnnot) override;
diff --git a/fpdfsdk/formfiller/cffl_button.cpp b/fpdfsdk/formfiller/cffl_button.cpp
index c961008..06a3542 100644
--- a/fpdfsdk/formfiller/cffl_button.cpp
+++ b/fpdfsdk/formfiller/cffl_button.cpp
@@ -6,9 +6,11 @@
#include "fpdfsdk/formfiller/cffl_button.h"
-CFFL_Button::CFFL_Button(CPDFSDK_FormFillEnvironment* pApp,
+CFFL_Button::CFFL_Button(CPDFSDK_FormFillEnvironment* pFormFillEnv,
CPDFSDK_Widget* pWidget)
- : CFFL_FormFiller(pApp, pWidget), m_bMouseIn(false), m_bMouseDown(false) {}
+ : CFFL_FormFiller(pFormFillEnv, pWidget),
+ m_bMouseIn(false),
+ m_bMouseDown(false) {}
CFFL_Button::~CFFL_Button() {}
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.h b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
index afa12f6..1370b25 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.h
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
@@ -97,7 +97,7 @@
static bool IsFillingAllowed(CPDFSDK_Widget* pWidget);
static bool IsValidAnnot(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot);
- bool OnKeyStrokeCommit(ObservedPtr<CPDFSDK_Annot>* pWidget,
+ bool OnKeyStrokeCommit(ObservedPtr<CPDFSDK_Annot>* pAnnot,
CPDFSDK_PageView* pPageView,
uint32_t nFlag);
bool OnValidate(ObservedPtr<CPDFSDK_Annot>* pAnnot,
diff --git a/fpdfsdk/pwl/cpwl_edit.h b/fpdfsdk/pwl/cpwl_edit.h
index 419a240..3df92b8 100644
--- a/fpdfsdk/pwl/cpwl_edit.h
+++ b/fpdfsdk/pwl/cpwl_edit.h
@@ -76,7 +76,7 @@
void CutText();
void SetText(const WideString& csText);
- void ReplaceSel(const WideString& csText);
+ void ReplaceSel(const WideString& wsText);
bool IsTextFull() const;
diff --git a/fpdfsdk/pwl/cpwl_list_impl.h b/fpdfsdk/pwl/cpwl_list_impl.h
index 010793c..95e4e4e 100644
--- a/fpdfsdk/pwl/cpwl_list_impl.h
+++ b/fpdfsdk/pwl/cpwl_list_impl.h
@@ -145,7 +145,7 @@
void SetScrollPosY(float fy);
void AddItem(const WideString& str);
WideString GetItemText(int32_t nIndex) const;
- void SetItemSelect(int32_t nItemIndex, bool bSelected);
+ void SetItemSelect(int32_t nIndex, bool bSelected);
int32_t GetLastSelected() const;
CFX_PointF GetBTPoint() const {
return CFX_PointF(m_rcPlate.left, m_rcPlate.top);
diff --git a/fpdfsdk/pwl/cpwl_scroll_bar.cpp b/fpdfsdk/pwl/cpwl_scroll_bar.cpp
index 14e977b..42437c7 100644
--- a/fpdfsdk/pwl/cpwl_scroll_bar.cpp
+++ b/fpdfsdk/pwl/cpwl_scroll_bar.cpp
@@ -30,9 +30,9 @@
fMax = 0.0f;
}
-void PWL_FLOATRANGE::Set(float f1, float f2) {
- fMin = std::min(f1, f2);
- fMax = std::max(f1, f2);
+void PWL_FLOATRANGE::Set(float min, float max) {
+ fMin = std::min(min, max);
+ fMax = std::max(min, max);
}
bool PWL_FLOATRANGE::In(float x) const {
diff --git a/fpdfsdk/pwl/cpwl_wnd.h b/fpdfsdk/pwl/cpwl_wnd.h
index c174b90..af1d889 100644
--- a/fpdfsdk/pwl/cpwl_wnd.h
+++ b/fpdfsdk/pwl/cpwl_wnd.h
@@ -206,7 +206,7 @@
CFX_Color GetBorderLeftTopColor(BorderStyle nBorderStyle) const;
CFX_Color GetBorderRightBottomColor(BorderStyle nBorderStyle) const;
- void SetBorderStyle(BorderStyle eBorderStyle);
+ void SetBorderStyle(BorderStyle nBorderStyle);
BorderStyle GetBorderStyle() const;
const CPWL_Dash& GetBorderDash() const;