summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc
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/fpdfdoc
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/fpdfdoc')
-rw-r--r--core/src/fpdfdoc/doc_vt.cpp18
-rw-r--r--core/src/fpdfdoc/pdf_vt.h46
2 files changed, 32 insertions, 32 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;