summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-02-27 19:49:57 -0800
committerLei Zhang <thestig@chromium.org>2015-02-27 19:49:57 -0800
commit659b8d3a3de770f8dc0e0334bda9748301403bae (patch)
tree9680123aaa4f3836f79b227c8e7395bbfa3f8a74 /core/src/fpdfapi
parent6ebc7515e1e6a75c5aa8c16fc7a1250fc58f44f2 (diff)
downloadpdfium-659b8d3a3de770f8dc0e0334bda9748301403bae.tar.xz
Merge to XFA: Cleanup: Get rid of CRLF line endings.
Original URL: https://codereview.chromium.org/837533003 (cherry picked from commit 256ef88a26cff56fc7c23119d2d9e1b41468bd1a) Review URL: https://codereview.chromium.org/963403002
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp18
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp94
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp2
3 files changed, 57 insertions, 57 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
index 670465673b..86db177ad7 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
@@ -519,8 +519,8 @@ void CPDF_LabCS::TranslateImageLine(FX_LPBYTE pDestBuf, FX_LPCBYTE pSrcBuf, int
}
}
CPDF_IccProfile::CPDF_IccProfile(FX_LPCBYTE pData, FX_DWORD dwSize):
- m_bsRGB(FALSE),
- m_pTransform(NULL),
+ m_bsRGB(FALSE),
+ m_pTransform(NULL),
m_nSrcComponents(0)
{
if (dwSize == 3144 && FXSYS_memcmp32(pData + 0x190, "sRGB IEC61966-2.1", 17) == 0) {
@@ -1376,13 +1376,13 @@ void CPDF_Color::SetValue(CPDF_Pattern* pPattern, FX_FLOAT* comps, int ncomps)
if (ncomps) {
FXSYS_memcpy32(pvalue->m_Comps, comps, ncomps * sizeof(FX_FLOAT));
}
- pvalue->m_pCountedPattern = NULL;
- if (pPattern && pPattern->m_pDocument)
- {
- if (!pDocPageData) {
- pDocPageData = pPattern->m_pDocument->GetPageData();
- }
- pvalue->m_pCountedPattern = pDocPageData->FindPatternPtr(pPattern->m_pPatternObj);
+ pvalue->m_pCountedPattern = NULL;
+ if (pPattern && pPattern->m_pDocument)
+ {
+ if (!pDocPageData) {
+ pDocPageData = pPattern->m_pDocument->GetPageData();
+ }
+ pvalue->m_pCountedPattern = pDocPageData->FindPatternPtr(pPattern->m_pPatternObj);
}
}
void CPDF_Color::Copy(const CPDF_Color* pSrc)
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
index fe5665d1fb..5df664312c 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
@@ -147,32 +147,32 @@ CPDF_DocPageData::~CPDF_DocPageData()
{
Clear(FALSE);
Clear(TRUE);
- FX_POSITION pos = m_PatternMap.GetStartPosition();
- while (pos)
- {
- CPDF_Object* ptObj;
- CPDF_CountedObject<CPDF_Pattern*>* ptData;
- m_PatternMap.GetNextAssoc(pos, ptObj, ptData);
- delete ptData;
- }
- m_PatternMap.RemoveAll();
- pos = m_FontMap.GetStartPosition();
- while (pos)
- {
- CPDF_Dictionary* fontDict;
- CPDF_CountedObject<CPDF_Font*>* fontData;
- m_FontMap.GetNextAssoc(pos, fontDict, fontData);
- delete fontData;
- }
- m_FontMap.RemoveAll();
- pos = m_ColorSpaceMap.GetStartPosition();
- while (pos)
- {
- CPDF_Object* csKey;
- CPDF_CountedObject<CPDF_ColorSpace*>* csData;
- m_ColorSpaceMap.GetNextAssoc(pos, csKey, csData);
- delete csData;
- }
+ FX_POSITION pos = m_PatternMap.GetStartPosition();
+ while (pos)
+ {
+ CPDF_Object* ptObj;
+ CPDF_CountedObject<CPDF_Pattern*>* ptData;
+ m_PatternMap.GetNextAssoc(pos, ptObj, ptData);
+ delete ptData;
+ }
+ m_PatternMap.RemoveAll();
+ pos = m_FontMap.GetStartPosition();
+ while (pos)
+ {
+ CPDF_Dictionary* fontDict;
+ CPDF_CountedObject<CPDF_Font*>* fontData;
+ m_FontMap.GetNextAssoc(pos, fontDict, fontData);
+ delete fontData;
+ }
+ m_FontMap.RemoveAll();
+ pos = m_ColorSpaceMap.GetStartPosition();
+ while (pos)
+ {
+ CPDF_Object* csKey;
+ CPDF_CountedObject<CPDF_ColorSpace*>* csData;
+ m_ColorSpaceMap.GetNextAssoc(pos, csKey, csData);
+ delete csData;
+ }
m_ColorSpaceMap.RemoveAll();
}
void CPDF_DocPageData::Clear(FX_BOOL bForceRelease)
@@ -673,24 +673,24 @@ void CPDF_DocPageData::ReleaseFontFileStreamAcc(CPDF_Stream* pFontStream, FX_BOO
return;
}
PDF_DocPageData_Release<CPDF_Stream*, CPDF_StreamAcc*>(m_FontFileMap, pFontStream, NULL, bForce);
-}
-CPDF_CountedColorSpace* CPDF_DocPageData::FindColorSpacePtr(CPDF_Object* pCSObj) const
-{
- if (!pCSObj) return NULL;
- CPDF_CountedObject<CPDF_ColorSpace*>* csData;
- if (m_ColorSpaceMap.Lookup(pCSObj, csData))
- {
- return csData;
- }
- return NULL;
-}
-CPDF_CountedPattern* CPDF_DocPageData::FindPatternPtr(CPDF_Object* pPatternObj) const
-{
- if (!pPatternObj) return NULL;
- CPDF_CountedObject<CPDF_Pattern*>* ptData;
- if (m_PatternMap.Lookup(pPatternObj, ptData))
- {
- return ptData;
- }
- return NULL;
-}
+}
+CPDF_CountedColorSpace* CPDF_DocPageData::FindColorSpacePtr(CPDF_Object* pCSObj) const
+{
+ if (!pCSObj) return NULL;
+ CPDF_CountedObject<CPDF_ColorSpace*>* csData;
+ if (m_ColorSpaceMap.Lookup(pCSObj, csData))
+ {
+ return csData;
+ }
+ return NULL;
+}
+CPDF_CountedPattern* CPDF_DocPageData::FindPatternPtr(CPDF_Object* pPatternObj) const
+{
+ if (!pPatternObj) return NULL;
+ CPDF_CountedObject<CPDF_Pattern*>* ptData;
+ if (m_PatternMap.Lookup(pPatternObj, ptData))
+ {
+ return ptData;
+ }
+ return NULL;
+}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
index 4644302c5b..9e61ce2f0b 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
@@ -143,7 +143,7 @@ FX_BOOL CPDF_ShadingPattern::Load()
}
CPDF_DocPageData* pDocPageData = m_pDocument->GetPageData();
m_pCS = pDocPageData->GetColorSpace(pCSObj, NULL);
- if (m_pCS) {
+ if (m_pCS) {
m_pCountedCS = pDocPageData->FindColorSpacePtr(m_pCS->GetArray());
}
m_ShadingType = pShadingDict->GetInteger(FX_BSTRC("ShadingType"));