summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-19 11:37:20 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-19 11:37:20 -0700
commitf8d8ac4fca2774550f3fbd3a21bbc1e326028c18 (patch)
tree70ab1f2ba023573e5ae076e46ab2621a9411b28b
parentbc8a64029f898286c3dcad3a6cecdc98ef30b139 (diff)
downloadpdfium-f8d8ac4fca2774550f3fbd3a21bbc1e326028c18.tar.xz
Expand some typedefs to the original types
Sevearal typedefs are only used once or twice. Expand and remove the typedef. Review-Url: https://codereview.chromium.org/1995033002
-rw-r--r--xfa/fde/css/fde_csscache.h2
-rw-r--r--xfa/fgas/crt/fgas_utils.h2
-rw-r--r--xfa/fgas/font/fgas_gefont.cpp18
-rw-r--r--xfa/fgas/font/fgas_gefont.h2
-rw-r--r--xfa/fgas/font/fgas_stdfontmgr.h21
5 files changed, 15 insertions, 30 deletions
diff --git a/xfa/fde/css/fde_csscache.h b/xfa/fde/css/fde_csscache.h
index 2cf007db79..28962e45eb 100644
--- a/xfa/fde/css/fde_csscache.h
+++ b/xfa/fde/css/fde_csscache.h
@@ -46,7 +46,7 @@ class FDE_CSSTagCache : public CFX_Target {
uint32_t dwIDHash;
uint32_t dwTagHash;
int32_t iClassIndex;
- CFDE_DWordArray dwClassHashs;
+ CFX_BaseArrayTemplate<uint32_t> dwClassHashs;
};
typedef CFX_ObjectStackTemplate<FDE_CSSTagCache> CFDE_CSSTagStack;
diff --git a/xfa/fgas/crt/fgas_utils.h b/xfa/fgas/crt/fgas_utils.h
index 56fa018ad4..6fef23d968 100644
--- a/xfa/fgas/crt/fgas_utils.h
+++ b/xfa/fgas/crt/fgas_utils.h
@@ -80,7 +80,6 @@ class CFX_BaseArrayTemplate : public CFX_BaseArray {
CFX_BaseArray::RemoveAll(bLeaveMemory);
}
};
-typedef CFX_BaseArrayTemplate<uint32_t> CFDE_DWordArray;
template <class baseType>
class CFX_ObjectBaseArrayTemplate : public CFX_BaseArray {
@@ -275,7 +274,6 @@ class CFX_MassArrayTemplate : public CFX_BaseMassArray {
CFX_BaseMassArray::RemoveAll(bLeaveMemory);
}
};
-typedef CFX_MassArrayTemplate<CFX_Rect> CFX_RectMassArray;
template <class baseType>
class CFX_ObjectMassArrayTemplate : public CFX_BaseMassArray {
diff --git a/xfa/fgas/font/fgas_gefont.cpp b/xfa/fgas/font/fgas_gefont.cpp
index 5dfdb70018..c877080ec1 100644
--- a/xfa/fgas/font/fgas_gefont.cpp
+++ b/xfa/fgas/font/fgas_gefont.cpp
@@ -299,24 +299,20 @@ FX_BOOL CFX_GEFont::LoadFont(CFX_Font* pExtFont, FX_BOOL bTakeOver) {
return bRet;
}
FX_BOOL CFX_GEFont::InitFont() {
- if (!m_pFont) {
+ if (!m_pFont)
return FALSE;
- }
if (!m_pFontEncoding) {
m_pFontEncoding = FX_CreateFontEncodingEx(m_pFont);
- if (!m_pFontEncoding) {
+ if (!m_pFontEncoding)
return FALSE;
- }
}
- if (!m_pCharWidthMap) {
+ if (!m_pCharWidthMap)
m_pCharWidthMap = new CFX_WordDiscreteArray(1024);
- }
- if (!m_pRectArray) {
- m_pRectArray = new CFX_RectMassArray(16);
- }
- if (!m_pBBoxMap) {
+ if (!m_pRectArray)
+ m_pRectArray = new CFX_MassArrayTemplate<CFX_Rect>(16);
+ if (!m_pBBoxMap)
m_pBBoxMap = new CFX_MapPtrToPtr(16);
- }
+
return TRUE;
}
IFX_Font* CFX_GEFont::Derive(uint32_t dwFontStyles, uint16_t wCodePage) {
diff --git a/xfa/fgas/font/fgas_gefont.h b/xfa/fgas/font/fgas_gefont.h
index 491f38bc89..8595782dc3 100644
--- a/xfa/fgas/font/fgas_gefont.h
+++ b/xfa/fgas/font/fgas_gefont.h
@@ -70,7 +70,7 @@ class CFX_GEFont : public IFX_Font {
IFX_FileRead* m_pFileRead;
CFX_UnicodeEncoding* m_pFontEncoding;
CFX_WordDiscreteArray* m_pCharWidthMap;
- CFX_RectMassArray* m_pRectArray;
+ CFX_MassArrayTemplate<CFX_Rect>* m_pRectArray;
CFX_MapPtrToPtr* m_pBBoxMap;
CXFA_PDFFontMgr* m_pProvider;
uint16_t m_wCharSet;
diff --git a/xfa/fgas/font/fgas_stdfontmgr.h b/xfa/fgas/font/fgas_stdfontmgr.h
index 268c61f6ea..bbfa875e5e 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.h
+++ b/xfa/fgas/font/fgas_stdfontmgr.h
@@ -142,15 +142,6 @@ class CFX_FontSourceEnum_File {
CFX_ByteStringArray m_FolderPaths;
};
-typedef CFX_MapPtrTemplate<uint32_t, IFX_FileAccess*> CFX_HashFileMap;
-typedef CFX_MapPtrTemplate<uint32_t, IFX_Font*> CFX_HashFontMap;
-typedef CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*>
- CFX_HashFontDescsMap;
-typedef CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<IFX_Font*>*>
- CFX_HashFontsMap;
-typedef CFX_MapPtrTemplate<FX_WCHAR, IFX_Font*> CFX_UnicodeFontMap;
-typedef CFX_MapPtrTemplate<IFX_Font*, IFX_FileRead*> CFX_FonStreamtMap;
-
class CFX_FontMgrImp : public IFX_FontMgr {
public:
CFX_FontMgrImp(CFX_FontSourceEnum_File* pFontEnum);
@@ -235,12 +226,12 @@ class CFX_FontMgrImp : public IFX_FontMgr {
uint32_t index);
IFX_FileRead* CreateFontStream(const CFX_ByteString& bsFaceName);
- CFX_HashFontDescsMap m_Hash2CandidateList;
- CFX_HashFontsMap m_Hash2Fonts;
- CFX_HashFileMap m_Hash2FileAccess;
- CFX_HashFontMap m_FileAccess2IFXFont;
- CFX_FonStreamtMap m_IFXFont2FileRead;
- CFX_UnicodeFontMap m_FailedUnicodes2NULL;
+ CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*> m_Hash2CandidateList;
+ CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<IFX_Font*>*> m_Hash2Fonts;
+ CFX_MapPtrTemplate<uint32_t, IFX_FileAccess*> m_Hash2FileAccess;
+ CFX_MapPtrTemplate<uint32_t, IFX_Font*> m_FileAccess2IFXFont;
+ CFX_MapPtrTemplate<IFX_Font*, IFX_FileRead*> m_IFXFont2FileRead;
+ CFX_MapPtrTemplate<FX_WCHAR, IFX_Font*> m_FailedUnicodes2NULL;
CFX_FontSourceEnum_File* m_pFontSource;
};
#endif