From 92cb5e580cecf0412b74d51e8863ed557e2bd47a Mon Sep 17 00:00:00 2001 From: dsinclair Date: Mon, 16 May 2016 11:38:28 -0700 Subject: Convert border style defines to an enum class. There were two defines, BBS_ and PBS_ for the various border styles in the system. They were the same, except PBS_ had an extra SHADOW define which was never used. This CL combines both of those into a single BorderStyle enum class and updates the code as needed. Also, removes ADDBIT, GETBIT unused defines. Updates barcode code to use the util.h defines instead of redefinition. fsdk_baseannot names starting with _ were cleaned up and some #defines moved to constants. Review-Url: https://codereview.chromium.org/1980973002 --- fpdfsdk/include/fsdk_baseannot.h | 17 +++-------------- fpdfsdk/include/fsdk_common.h | 6 ------ 2 files changed, 3 insertions(+), 20 deletions(-) (limited to 'fpdfsdk/include') diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h index cb7d49e789..236e2c7868 100644 --- a/fpdfsdk/include/fsdk_baseannot.h +++ b/fpdfsdk/include/fsdk_baseannot.h @@ -16,6 +16,7 @@ #include "core/fpdfdoc/include/fpdf_doc.h" #include "core/fxcrt/include/fx_basic.h" #include "fpdfsdk/cfx_systemhandler.h" +#include "fpdfsdk/include/fsdk_common.h" #include "fpdfsdk/include/fsdk_define.h" class CPDFSDK_PageView; @@ -155,29 +156,17 @@ class CPDFSDK_BAAnnot : public CPDFSDK_Annot { void SetStructParent(int key); int GetStructParent() const; - // border void SetBorderWidth(int nWidth); int GetBorderWidth() const; - // BBS_SOLID - // BBS_DASH - // BBS_BEVELED - // BBS_INSET - // BBS_UNDERLINE - - void SetBorderStyle(int nStyle); - int GetBorderStyle() const; - - // The background of the annotation's icon when closed - // The title bar of the annotation's pop-up window - // The border of a link annotation + void SetBorderStyle(BorderStyle nStyle); + BorderStyle GetBorderStyle() const; void SetColor(FX_COLORREF color); void RemoveColor(); FX_BOOL GetColor(FX_COLORREF& color) const; FX_BOOL IsVisible() const; - // action CPDF_Action GetAction() const; void SetAction(const CPDF_Action& a); diff --git a/fpdfsdk/include/fsdk_common.h b/fpdfsdk/include/fsdk_common.h index c20262dae8..5c5d24f2c8 100644 --- a/fpdfsdk/include/fsdk_common.h +++ b/fpdfsdk/include/fsdk_common.h @@ -33,10 +33,4 @@ #define FIELDFLAG_MULTISELECT (1 << 21) #define FIELDFLAG_COMMITONSELCHANGE (1 << 26) -#define BBS_SOLID 0 -#define BBS_DASH 1 -#define BBS_BEVELED 2 -#define BBS_INSET 3 -#define BBS_UNDERLINE 4 - #endif // FPDFSDK_INCLUDE_FSDK_COMMON_H_ -- cgit v1.2.3