summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2018-10-22 18:28:52 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-22 18:28:52 +0000
commitc320e9c7ad01ab48625e51fb3b6476d98b6167de (patch)
tree4ef9b9083a5969b60c445340a47500c46c5ce623 /core/fpdfdoc
parent8298d25cf3ac41d71a8533700d929cadac1c360d (diff)
downloadpdfium-c320e9c7ad01ab48625e51fb3b6476d98b6167de.tar.xz
Add k prefixes to CPDF_AAction::AActionType enumerators
The GetFocus enumerator was shadowing the GetFocus function in winuser.h. Change the enumerators to all have a k prefix to avoid the warning, and since I believe pdfium wants to move towards that style anyway. Bug: chromium:895475 Change-Id: I740afa4f29d895e7e3cbb488fd311a7487d67a82 Reviewed-on: https://pdfium-review.googlesource.com/c/44470 Commit-Queue: Hans Wennborg <hans@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/cpdf_aaction.cpp50
-rw-r--r--core/fpdfdoc/cpdf_aaction.h46
2 files changed, 48 insertions, 48 deletions
diff --git a/core/fpdfdoc/cpdf_aaction.cpp b/core/fpdfdoc/cpdf_aaction.cpp
index 109e82b406..633161e724 100644
--- a/core/fpdfdoc/cpdf_aaction.cpp
+++ b/core/fpdfdoc/cpdf_aaction.cpp
@@ -11,32 +11,32 @@
namespace {
constexpr const char* g_sAATypes[] = {
- "E", // CursorEnter
- "X", // CursorExit
- "D", // ButtonDown
- "U", // ButtonUp
- "Fo", // GetFocus
- "Bl", // LoseFocus
- "PO", // PageOpen
- "PC", // PageClose
- "PV", // PageVisible
- "PI", // PageInvisible
- "O", // OpenPage
- "C", // ClosePage
- "K", // KeyStroke
- "F", // Format
- "V", // Validate
- "C", // Calculate
- "WC", // CloseDocument
- "WS", // SaveDocument
- "DS", // DocumentSaved
- "WP", // PrintDocument
- "DP", // DocumentPrinted
+ "E", // kCursorEnter
+ "X", // kCursorExit
+ "D", // kButtonDown
+ "U", // kButtonUp
+ "Fo", // kGetFocus
+ "Bl", // kLoseFocus
+ "PO", // kPageOpen
+ "PC", // kPageClose
+ "PV", // kPageVisible
+ "PI", // kPageInvisible
+ "O", // kOpenPage
+ "C", // kClosePage
+ "K", // kKeyStroke
+ "F", // kFormat
+ "V", // kValidate
+ "C", // kCalculate
+ "WC", // kCloseDocument
+ "WS", // kSaveDocument
+ "DS", // kDocumentSaved
+ "WP", // kPrintDocument
+ "DP", // kDocumentPrinted
};
// |g_sAATypes| should have one less element than enum AActionType due to
-// DocumentOpen, which is an artificial type.
-static_assert(FX_ArraySize(g_sAATypes) == CPDF_AAction::NumberOfActions - 1,
+// kDocumentOpen, which is an artificial type.
+static_assert(FX_ArraySize(g_sAATypes) == CPDF_AAction::kNumberOfActions - 1,
"g_sAATypes count mismatch");
} // namespace
@@ -59,8 +59,8 @@ CPDF_Action CPDF_AAction::GetAction(AActionType eType) const {
// static
bool CPDF_AAction::IsUserClick(AActionType eType) {
switch (eType) {
- case ButtonUp:
- case ButtonDown:
+ case kButtonUp:
+ case kButtonDown:
return true;
default:
return false;
diff --git a/core/fpdfdoc/cpdf_aaction.h b/core/fpdfdoc/cpdf_aaction.h
index 90049f5ac4..edd3539745 100644
--- a/core/fpdfdoc/cpdf_aaction.h
+++ b/core/fpdfdoc/cpdf_aaction.h
@@ -14,29 +14,29 @@ class CPDF_Dictionary;
class CPDF_AAction {
public:
enum AActionType {
- CursorEnter = 0,
- CursorExit,
- ButtonDown,
- ButtonUp,
- GetFocus,
- LoseFocus,
- PageOpen,
- PageClose,
- PageVisible,
- PageInvisible,
- OpenPage,
- ClosePage,
- KeyStroke,
- Format,
- Validate,
- Calculate,
- CloseDocument,
- SaveDocument,
- DocumentSaved,
- PrintDocument,
- DocumentPrinted,
- DocumentOpen,
- NumberOfActions // Must be last.
+ kCursorEnter = 0,
+ kCursorExit,
+ kButtonDown,
+ kButtonUp,
+ kGetFocus,
+ kLoseFocus,
+ kPageOpen,
+ kPageClose,
+ kPageVisible,
+ kPageInvisible,
+ kOpenPage,
+ kClosePage,
+ kKeyStroke,
+ kFormat,
+ kValidate,
+ kCalculate,
+ kCloseDocument,
+ kSaveDocument,
+ kDocumentSaved,
+ kPrintDocument,
+ kDocumentPrinted,
+ kDocumentOpen,
+ kNumberOfActions // Must be last.
};
explicit CPDF_AAction(const CPDF_Dictionary* pDict);