summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-06-13 00:31:30 -0700
committerLei Zhang <thestig@chromium.org>2015-06-13 00:31:30 -0700
commit4999f914be6c390bbc6d709c5b65d8955a827970 (patch)
treeb98be7bda6310b5c4bd1c5de1018850b4a4a08aa /core/src
parent7dac05808121e6ac40a9911e71e6391c88432a62 (diff)
downloadpdfium-4999f914be6c390bbc6d709c5b65d8955a827970.tar.xz
Merge to XFA: Cleanup: Remove uses of "this->" in core/
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1173223002. (cherry picked from commit 2b5e0d5b20654d116045484868c9e015ed698124) Review URL: https://codereview.chromium.org/1186673004.
Diffstat (limited to 'core/src')
-rw-r--r--core/src/fpdfdoc/doc_vt.cpp18
-rw-r--r--core/src/fpdfdoc/pdf_vt.h46
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp2
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpx_opj.cpp8
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Context.cpp2
-rw-r--r--core/src/fxcrt/fx_basic_coords.cpp33
-rw-r--r--core/src/fxge/skia/fx_skia_blitter_new.cpp12
-rw-r--r--core/src/reflow/layoutprovider_taggedpdf.cpp2
-rw-r--r--core/src/reflow/reflowedpage.cpp4
9 files changed, 62 insertions, 65 deletions
diff --git a/core/src/fpdfdoc/doc_vt.cpp b/core/src/fpdfdoc/doc_vt.cpp
index 94dc1126da..f89090bada 100644
--- a/core/src/fpdfdoc/doc_vt.cpp
+++ b/core/src/fpdfdoc/doc_vt.cpp
@@ -78,7 +78,7 @@ void CSection::ResetLinePlace()
CPVT_WordPlace CSection::AddWord(const CPVT_WordPlace & place, const CPVT_WordInfo & wordinfo)
{
if (CPVT_WordInfo * pWord = FX_NEW CPVT_WordInfo(wordinfo)) {
- int32_t nWordIndex = FPDF_MAX(FPDF_MIN(place.nWordIndex, this->m_WordArray.GetSize()), 0);
+ int32_t nWordIndex = FPDF_MAX(FPDF_MIN(place.nWordIndex, m_WordArray.GetSize()), 0);
if (nWordIndex == m_WordArray.GetSize()) {
m_WordArray.Add(pWord);
} else {
@@ -117,7 +117,7 @@ CPVT_WordPlace CSection::GetEndWordPlace() const
if (CLine * pLine = m_LineArray.GetAt(m_LineArray.GetSize() - 1)) {
return pLine->GetEndWordPlace();
} else {
- return this->SecPlace;
+ return SecPlace;
}
}
CPVT_WordPlace CSection::GetPrevWordPlace(const CPVT_WordPlace & place) const
@@ -858,7 +858,7 @@ void CPDF_VariableText::ResetAll()
CPVT_WordPlace CPDF_VariableText::InsertWord(const CPVT_WordPlace & place, FX_WORD word, int32_t charset,
const CPVT_WordProps * pWordProps)
{
- int32_t nTotlaWords = this->GetTotalWords();
+ int32_t nTotlaWords = GetTotalWords();
if (m_nLimitChar > 0 && nTotlaWords >= m_nLimitChar) {
return place;
}
@@ -882,7 +882,7 @@ CPVT_WordPlace CPDF_VariableText::InsertWord(const CPVT_WordPlace & place, FX_WO
CPVT_WordPlace CPDF_VariableText::InsertSection(const CPVT_WordPlace & place, const CPVT_SecProps * pSecProps,
const CPVT_WordProps * pWordProps)
{
- int32_t nTotlaWords = this->GetTotalWords();
+ int32_t nTotlaWords = GetTotalWords();
if (m_nLimitChar > 0 && nTotlaWords >= m_nLimitChar) {
return place;
}
@@ -1418,7 +1418,7 @@ FX_FLOAT CPDF_VariableText::GetLineIndent(const CPVT_SectionInfo & SecInfo)
}
int32_t CPDF_VariableText::GetAlignment(const CPVT_SectionInfo& SecInfo)
{
- return m_bRichText && SecInfo.pSecProps ? SecInfo.pSecProps->nAlignment : this->m_nAlignment;
+ return m_bRichText && SecInfo.pSecProps ? SecInfo.pSecProps->nAlignment : m_nAlignment;
}
FX_FLOAT CPDF_VariableText::GetCharSpace(const CPVT_WordInfo & WordInfo)
{
@@ -1501,13 +1501,13 @@ void CPDF_VariableText::ClearWords(const CPVT_WordRange & PlaceRange)
CPVT_WordPlace CPDF_VariableText::ClearLeftWord(const CPVT_WordPlace & place)
{
if (CSection * pSection = m_SectionArray.GetAt(place.nSecIndex)) {
- CPVT_WordPlace leftplace = this->GetPrevWordPlace(place);
+ CPVT_WordPlace leftplace = GetPrevWordPlace(place);
if (leftplace != place) {
if (leftplace.nSecIndex != place.nSecIndex) {
if (pSection->m_WordArray.GetSize() == 0) {
- this->ClearEmptySection(place);
+ ClearEmptySection(place);
} else {
- this->LinkLatterSection(leftplace);
+ LinkLatterSection(leftplace);
}
} else {
pSection->ClearWord(place);
@@ -1520,7 +1520,7 @@ CPVT_WordPlace CPDF_VariableText::ClearLeftWord(const CPVT_WordPlace & place)
CPVT_WordPlace CPDF_VariableText::ClearRightWord(const CPVT_WordPlace & place)
{
if (CSection * pSection = m_SectionArray.GetAt(place.nSecIndex)) {
- CPVT_WordPlace rightplace = AjustLineHeader(this->GetNextWordPlace(place), FALSE);
+ CPVT_WordPlace rightplace = AjustLineHeader(GetNextWordPlace(place), FALSE);
if (rightplace != place) {
if(rightplace.nSecIndex != place.nSecIndex) {
LinkLatterSection(place);
diff --git a/core/src/fpdfdoc/pdf_vt.h b/core/src/fpdfdoc/pdf_vt.h
index b66c2ed3b5..d555daad3c 100644
--- a/core/src/fpdfdoc/pdf_vt.h
+++ b/core/src/fpdfdoc/pdf_vt.h
@@ -36,10 +36,10 @@ public:
CPVT_Size() : x(0.0f), y(0.0f)
{
}
- CPVT_Size(FX_FLOAT x, FX_FLOAT y)
+ CPVT_Size(FX_FLOAT other_x, FX_FLOAT other_y)
{
- this->x = x;
- this->y = y;
+ x = other_x;
+ y = other_y;
}
FX_FLOAT x, y;
};
@@ -50,20 +50,22 @@ public:
{
left = top = right = bottom = 0.0f;
}
- CPVT_FloatRect(FX_FLOAT left, FX_FLOAT top,
- FX_FLOAT right, FX_FLOAT bottom)
+ CPVT_FloatRect(FX_FLOAT other_left,
+ FX_FLOAT other_top,
+ FX_FLOAT other_right,
+ FX_FLOAT other_bottom)
{
- this->left = left;
- this->top = top;
- this->right = right;
- this->bottom = bottom;
+ left = other_left;
+ top = other_top;
+ right = other_right;
+ bottom = other_bottom;
}
CPVT_FloatRect(const CPDF_Rect & rect)
{
- this->left = rect.left;
- this->top = rect.top;
- this->right = rect.right;
- this->bottom = rect.bottom;
+ left = rect.left;
+ top = rect.top;
+ right = rect.right;
+ bottom = rect.bottom;
}
void Default()
{
@@ -71,11 +73,9 @@ public:
}
FX_FLOAT Height() const
{
- if(this->top > this->bottom) {
- return this->top - this->bottom;
- } else {
- return this->bottom - this->top;
- }
+ if (top > bottom)
+ return top - bottom;
+ return bottom - top;
}
};
struct CPVT_SectionInfo {
@@ -100,8 +100,8 @@ struct CPVT_SectionInfo {
if (this == &other) {
return;
}
- this->rcSection = other.rcSection;
- this->nTotalLine = other.nTotalLine;
+ rcSection = other.rcSection;
+ nTotalLine = other.nTotalLine;
if (other.pSecProps) {
if (pSecProps) {
*pSecProps = *other.pSecProps;
@@ -162,9 +162,9 @@ struct CPVT_WordInfo {
if (this == &word) {
return;
}
- this->Word = word.Word;
- this->nCharset = word.nCharset;
- this->nFontIndex = word.nFontIndex;
+ Word = word.Word;
+ nCharset = word.nCharset;
+ nFontIndex = word.nFontIndex;
if (word.pWordProps) {
if (pWordProps) {
*pWordProps = *word.pWordProps;
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index a9e8169b7b..d7e8263728 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -1279,7 +1279,7 @@ void CPDF_TextPage::CloseTempLine()
if(nR2L > 0 && nR2L >= nL2R) {
bR2L = TRUE;
}
- if(this->m_parserflag == FPDFTEXT_RLTB || bR2L) {
+ if (m_parserflag == FPDFTEXT_RLTB || bR2L) {
int count = order.GetSize();
for(int i = count - 1; i > 0; i -= 3) {
int ret = order.GetAt(i);
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index a397a4504a..7dd91b3289 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -649,13 +649,6 @@ FX_BOOL CJPX_Decoder::Init(const unsigned char* src_data, int src_size)
image = NULL;
return FALSE;
}
-/*
- if(this->m_useColorSpace) {
- image->useColorSpace = 1;
- } else {
- image->useColorSpace = 0;
- }
-*/
if (!parameters.nb_tile_to_decode) {
if (!opj_set_decode_area(l_codec, image, parameters.DA_x0,
parameters.DA_y0, parameters.DA_x1, parameters.DA_y1)) {
@@ -685,7 +678,6 @@ FX_BOOL CJPX_Decoder::Init(const unsigned char* src_data, int src_size)
if(image->color_space == OPJ_CLRSPC_SYCC) {
color_sycc_to_rgb(image);
}
- //if(image->icc_profile_buf && !image->useColorSpace) {
if(image->icc_profile_buf) {
FX_Free(image->icc_profile_buf);
image->icc_profile_buf = NULL;
diff --git a/core/src/fxcodec/jbig2/JBig2_Context.cpp b/core/src/fxcodec/jbig2/JBig2_Context.cpp
index 1c7592778d..f58b7f36f5 100644
--- a/core/src/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_Context.cpp
@@ -1621,7 +1621,7 @@ FX_BOOL CJBig2_Context::parseGenericRefinementRegion(CJBig2_Segment *pSegment)
pSeg = NULL;
if(pSegment->m_nReferred_to_segment_count > 0) {
for(i = 0; i < pSegment->m_nReferred_to_segment_count; i++) {
- pSeg = this->findSegmentByNumber(pSegment->m_pReferred_to_segment_numbers[0]);
+ pSeg = findSegmentByNumber(pSegment->m_pReferred_to_segment_numbers[0]);
if(pSeg == NULL) {
m_pModule->JBig2_Error("generic refinement region segment : can't find refered to segments");
nRet = JBIG2_ERROR_FETAL;
diff --git a/core/src/fxcrt/fx_basic_coords.cpp b/core/src/fxcrt/fx_basic_coords.cpp
index 496b1443d1..652f62c71c 100644
--- a/core/src/fxcrt/fx_basic_coords.cpp
+++ b/core/src/fxcrt/fx_basic_coords.cpp
@@ -249,23 +249,28 @@ CFX_FloatRect CFX_FloatRect::GetBBox(const CFX_FloatPoint* pPoints, int nPoints)
}
return CFX_FloatRect(min_x, min_y, max_x, max_y);
}
-void CFX_Matrix::Set(FX_FLOAT a, FX_FLOAT b, FX_FLOAT c, FX_FLOAT d, FX_FLOAT e, FX_FLOAT f)
-{
- this->a = a;
- this->b = b;
- this->c = c;
- this->d = d;
- this->e = e;
- this->f = f;
+void CFX_Matrix::Set(FX_FLOAT other_a,
+ FX_FLOAT other_b,
+ FX_FLOAT other_c,
+ FX_FLOAT other_d,
+ FX_FLOAT other_e,
+ FX_FLOAT other_f)
+{
+ a = other_a;
+ b = other_b;
+ c = other_c;
+ d = other_d;
+ e = other_e;
+ f = other_f;
}
void CFX_Matrix::Set(const FX_FLOAT n[6])
{
- this->a = n[0];
- this->b = n[1];
- this->c = n[2];
- this->d = n[3];
- this->e = n[4];
- this->f = n[5];
+ a = n[0];
+ b = n[1];
+ c = n[2];
+ d = n[3];
+ e = n[4];
+ f = n[5];
}
void CFX_Matrix::SetReverse(const CFX_Matrix &m)
{
diff --git a/core/src/fxge/skia/fx_skia_blitter_new.cpp b/core/src/fxge/skia/fx_skia_blitter_new.cpp
index 5087b62b7c..e87092f90f 100644
--- a/core/src/fxge/skia/fx_skia_blitter_new.cpp
+++ b/core/src/fxge/skia/fx_skia_blitter_new.cpp
@@ -22,7 +22,7 @@
return;
unsigned aa = antialias[0];
if (aa)
- (this->*composite_span)(m_pDestScan, m_pOriScan, 0, x, width, y, aa, m_ClipBox.top, m_ClipBox.left, m_ClipBox.right, m_pClipScan, m_pDestExtraAlphaScan);
+ (*composite_span)(m_pDestScan, m_pOriScan, 0, x, width, y, aa, m_ClipBox.top, m_ClipBox.left, m_ClipBox.right, m_pClipScan, m_pDestExtraAlphaScan);
runs += width;
antialias += width;
x += width;
@@ -33,14 +33,14 @@
{
FXSYS_assert(m_Alpha && width);
if (y < m_ClipBox.top || y >= m_ClipBox.bottom) return;
- (this->*composite_span)(m_pDestScan, m_pOriScan, 0, x, width, y, 255, m_ClipBox.top, m_ClipBox.left, m_ClipBox.right, m_pClipScan, m_pDestExtraAlphaScan);
+ (*composite_span)(m_pDestScan, m_pOriScan, 0, x, width, y, 255, m_ClipBox.top, m_ClipBox.left, m_ClipBox.right, m_pClipScan, m_pDestExtraAlphaScan);
}
void CFX_SkiaRenderer::blitV(int x, int y, int height, SkAlpha alpha)
{
FXSYS_assert(m_Alpha && alpha);
if (alpha == 255) {
- this->blitRect(x, y, 1, height);
+ blitRect(x, y, 1, height);
} else {
int16_t runs[2];
runs[0] = 1;
@@ -48,7 +48,7 @@
while (--height >= 0) {
if (y >= m_ClipBox.bottom)
return;
- this->blitAntiH(x, y ++, &alpha, runs);
+ blitAntiH(x, y ++, &alpha, runs);
}
}
}
@@ -1563,7 +1563,7 @@
{
FXSYS_assert(alpha);
if (alpha == 255) {
- this->blitRect(x, y, 1, height);
+ blitRect(x, y, 1, height);
} else {
int16_t runs[2];
runs[0] = 1;
@@ -1571,7 +1571,7 @@
while (--height >= 0) {
if (y >= m_dstHeight)
return;
- this->blitAntiH(x, y ++, &alpha, runs);
+ blitAntiH(x, y ++, &alpha, runs);
}
}
}
diff --git a/core/src/reflow/layoutprovider_taggedpdf.cpp b/core/src/reflow/layoutprovider_taggedpdf.cpp
index 3893144ab2..785b0e281b 100644
--- a/core/src/reflow/layoutprovider_taggedpdf.cpp
+++ b/core/src/reflow/layoutprovider_taggedpdf.cpp
@@ -450,7 +450,7 @@ LayoutType CPDF_LayoutElement::GetType()
return LayoutUnknown;
}
CFX_ByteString name = m_pTaggedElement->GetType();
- return this->ConvertLayoutType(name);
+ return ConvertLayoutType(name);
}
int CPDF_LayoutElement::CountAttrValues(LayoutAttr attr_type)
{
diff --git a/core/src/reflow/reflowedpage.cpp b/core/src/reflow/reflowedpage.cpp
index b7048b6840..3335eed678 100644
--- a/core/src/reflow/reflowedpage.cpp
+++ b/core/src/reflow/reflowedpage.cpp
@@ -226,7 +226,7 @@ void CPDF_ReflowedPage::FocusGetData(const CFX_AffineMatrix matrix, int32_t x, i
if(FXSYS_fabs(tempdy - dy) < 1) {
continue;
}
- CFX_FloatRect rect (0, pData->m_PosY + pData->m_Height, this->m_PageWidth, pData->m_PosY);
+ CFX_FloatRect rect (0, pData->m_PosY + pData->m_Height, m_PageWidth, pData->m_PosY);
if(rect.Contains(x1, y1)) {
pos = i;
dx = 0;
@@ -321,7 +321,7 @@ void CPDF_ProgressiveReflowPageParser::Continue(IFX_Pause* pPause)
}
void CPDF_ProgressiveReflowPageParser::Clear()
{
- this->Init();
+ Init();
return;
}
FX_BOOL IPDF_ProgressiveReflowPageParser::IsTaggedPage(CPDF_PageObjects*pPage)