Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Unified Diff: core/include/fpdfdoc/fpdf_ap.h

Issue 1640473002: Merge to Master: War on #defines - part 2 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Pick up build fix. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fpdfapi/fpdf_parser.h ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfdoc/fpdf_ap.h
diff --git a/core/include/fpdfdoc/fpdf_ap.h b/core/include/fpdfdoc/fpdf_ap.h
index 6d0478c23f3700bc886aeb63cd2ea0a40584a857..510b39cb9b9cd82ca81bca34674a585033dab3fa 100644
--- a/core/include/fpdfdoc/fpdf_ap.h
+++ b/core/include/fpdfdoc/fpdf_ap.h
@@ -16,22 +16,20 @@ class IPVT_FontMap {
virtual CPDF_Font* GetPDFFont(int32_t nFontIndex) = 0;
virtual CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) = 0;
};
+
struct CPVT_Dash {
CPVT_Dash(int32_t dash, int32_t gap, int32_t phase)
: nDash(dash), nGap(gap), nPhase(phase) {}
int32_t nDash;
-
int32_t nGap;
-
int32_t nPhase;
};
-#define CT_TRANSPARENT 0
-#define CT_GRAY 1
-#define CT_RGB 2
-#define CT_CMYK 3
+
struct CPVT_Color {
- CPVT_Color(int32_t type = 0,
+ enum Type { kTransparent = 0, kGray, kRGB, kCMYK };
+
+ CPVT_Color(Type type = kTransparent,
FX_FLOAT color1 = 0.0f,
FX_FLOAT color2 = 0.0f,
FX_FLOAT color3 = 0.0f,
@@ -42,12 +40,13 @@ struct CPVT_Color {
fColor3(color3),
fColor4(color4) {}
- int32_t nColorType;
+ Type nColorType;
FX_FLOAT fColor1;
FX_FLOAT fColor2;
FX_FLOAT fColor3;
FX_FLOAT fColor4;
};
+
class CPVT_Provider : public IPDF_VariableText_Provider {
public:
CPVT_Provider(IPVT_FontMap* pFontMap);
@@ -68,11 +67,7 @@ class CPVT_Provider : public IPDF_VariableText_Provider {
private:
IPVT_FontMap* m_pFontMap;
};
-#define PBS_SOLID 0
-#define PBS_DASH 1
-#define PBS_BEVELED 2
-#define PBS_INSET 3
-#define PBS_UNDERLINED 4
+
class CPVT_GenerateAP {
public:
static FX_BOOL GenerateTextFieldAP(CPDF_Document* pDoc,
« no previous file with comments | « core/include/fpdfapi/fpdf_parser.h ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698