summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-23 10:11:11 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-23 10:11:11 -0800
commitd21cddaa7548584bfcebefe9a03e857fee3a846b (patch)
tree0211132f874bfc0ba36b339b4fe961331f88f036 /core/src/fpdfapi
parent2eaa2ef03f7fc9417007d554ee955137fe9ff7b4 (diff)
downloadpdfium-d21cddaa7548584bfcebefe9a03e857fee3a846b.tar.xz
Remove many _CAPS structure names.
They're technically not allowed because they are reserved for the preprocessor. Also get rid of LPC* typedefs along the way. Also provide a header for a data file containing many instance of these found along the way. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1722873002 .
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r--core/src/fpdfapi/fpdf_font/font_int.h12
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp6
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp10
3 files changed, 10 insertions, 18 deletions
diff --git a/core/src/fpdfapi/fpdf_font/font_int.h b/core/src/fpdfapi/fpdf_font/font_int.h
index 7ff97e5a77..1d1f006115 100644
--- a/core/src/fpdfapi/fpdf_font/font_int.h
+++ b/core/src/fpdfapi/fpdf_font/font_int.h
@@ -162,18 +162,6 @@ class CPDF_CMap {
CPDF_CMap* m_pUseMap;
};
-typedef struct _FileHeader {
- uint8_t btTag[4];
- uint8_t btVersion;
- uint8_t btFormat;
- uint8_t btReserved1[2];
- FX_DWORD dwStartIndex;
- FX_DWORD dwEndIndex;
- FX_DWORD dwDataSize;
- FX_DWORD dwDataOffset;
- FX_DWORD dwRecordSize;
-} FXMP_FILEHEADER;
-
class CPDF_CID2UnicodeMap {
public:
CPDF_CID2UnicodeMap();
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
index ba75753c9a..49fb331a94 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
@@ -964,13 +964,15 @@ void CPDF_IndexedCS::EnableStdConversion(FX_BOOL bEnabled) {
m_pBaseCS->EnableStdConversion(bEnabled);
}
}
+
#define MAX_PATTERN_COLORCOMPS 16
-typedef struct _PatternValue {
+struct PatternValue {
CPDF_Pattern* m_pPattern;
CPDF_CountedPattern* m_pCountedPattern;
int m_nComps;
FX_FLOAT m_Comps[MAX_PATTERN_COLORCOMPS];
-} PatternValue;
+};
+
CPDF_PatternCS::~CPDF_PatternCS() {
CPDF_ColorSpace* pCS = m_pCountedBaseCS ? m_pCountedBaseCS->get() : NULL;
if (pCS && m_pDocument) {
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
index 61becaee6a..799e748761 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
@@ -60,12 +60,12 @@ CPDF_CryptoHandler* CPDF_StandardSecurityHandler::CreateCryptoHandler() {
return new CPDF_StandardCryptoHandler;
}
-typedef struct _PDF_CRYPTOITEM {
+struct PDF_CRYPTOITEM {
int32_t m_Cipher;
int32_t m_KeyLen;
FX_BOOL m_bChecked;
CPDF_StandardCryptoHandler* m_pCryptoHandler;
-} PDF_CRYPTOITEM;
+};
CPDF_StandardSecurityHandler::CPDF_StandardSecurityHandler() {
m_Version = 0;
@@ -775,12 +775,14 @@ void CPDF_StandardCryptoHandler::CryptBlock(FX_BOOL bEncrypt,
CRYPT_ArcFourCryptBlock(dest_buf, dest_size, realkey, realkeylen);
}
}
-typedef struct _AESCryptContext {
+
+struct AESCryptContext {
uint8_t m_Context[2048];
FX_BOOL m_bIV;
uint8_t m_Block[16];
FX_DWORD m_BlockOffset;
-} AESCryptContext;
+};
+
void* CPDF_StandardCryptoHandler::CryptStart(FX_DWORD objnum,
FX_DWORD gennum,
FX_BOOL bEncrypt) {