Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Unified Diff: core/fpdfapi/fpdf_page/cpdf_textobject.cpp

Issue 2291833002: Revert "Replace wrapper methods in CPDF_Path with -> operator." (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_pathobject.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_textstate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/cpdf_textobject.cpp
diff --git a/core/fpdfapi/fpdf_page/cpdf_textobject.cpp b/core/fpdfapi/fpdf_page/cpdf_textobject.cpp
index 7b39dff9244b62af1803f1910e85b8fdf6dd5592..a3653359de949d427850d002528fc734838ee6df 100644
--- a/core/fpdfapi/fpdf_page/cpdf_textobject.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_textobject.cpp
@@ -35,7 +35,7 @@ void CPDF_TextObject::GetItemInfo(int index, CPDF_TextObjectItem* pInfo) const {
if (pInfo->m_CharCode == CPDF_Font::kInvalidCharCode) {
return;
}
- CPDF_Font* pFont = m_TextState->GetFont();
+ CPDF_Font* pFont = m_TextState.GetFont();
if (!pFont->IsCIDFont()) {
return;
}
@@ -47,7 +47,7 @@ void CPDF_TextObject::GetItemInfo(int index, CPDF_TextObjectItem* pInfo) const {
pInfo->m_OriginX = 0;
short vx, vy;
pFont->AsCIDFont()->GetVertOrigin(CID, vx, vy);
- FX_FLOAT fontsize = m_TextState->GetFontSize();
+ FX_FLOAT fontsize = m_TextState.GetFontSize();
pInfo->m_OriginX -= fontsize * vx / 1000;
pInfo->m_OriginY -= fontsize * vy / 1000;
}
@@ -137,7 +137,7 @@ void CPDF_TextObject::Transform(const CFX_Matrix& matrix) {
CFX_Matrix text_matrix;
GetTextMatrix(&text_matrix);
text_matrix.Concat(matrix);
- FX_FLOAT* pTextMatrix = m_TextState->GetMatrix();
+ FX_FLOAT* pTextMatrix = m_TextState.GetMatrix();
pTextMatrix[0] = text_matrix.GetA();
pTextMatrix[1] = text_matrix.GetC();
pTextMatrix[2] = text_matrix.GetB();
@@ -160,7 +160,7 @@ const CPDF_TextObject* CPDF_TextObject::AsText() const {
}
void CPDF_TextObject::GetTextMatrix(CFX_Matrix* pMatrix) const {
- const FX_FLOAT* pTextMatrix = m_TextState->GetMatrix();
+ const FX_FLOAT* pTextMatrix = m_TextState.GetMatrix();
pMatrix->Set(pTextMatrix[0], pTextMatrix[2], pTextMatrix[1], pTextMatrix[3],
m_PosX, m_PosY);
}
@@ -174,7 +174,7 @@ void CPDF_TextObject::SetSegments(const CFX_ByteString* pStrs,
}
FX_Free(m_pCharPos);
m_pCharPos = nullptr;
- CPDF_Font* pFont = m_TextState->GetFont();
+ CPDF_Font* pFont = m_TextState.GetFont();
m_nChars = 0;
for (int i = 0; i < nsegs; ++i) {
m_nChars += pFont->CountChar(pStrs[i].c_str(), pStrs[i].GetLength());
@@ -209,8 +209,8 @@ void CPDF_TextObject::SetText(const CFX_ByteString& str) {
}
FX_FLOAT CPDF_TextObject::GetCharWidth(uint32_t charcode) const {
- FX_FLOAT fontsize = m_TextState->GetFontSize() / 1000;
- CPDF_Font* pFont = m_TextState->GetFont();
+ FX_FLOAT fontsize = m_TextState.GetFontSize() / 1000;
+ CPDF_Font* pFont = m_TextState.GetFont();
FX_BOOL bVertWriting = FALSE;
CPDF_CIDFont* pCIDFont = pFont->AsCIDFont();
if (pCIDFont) {
@@ -232,11 +232,11 @@ FX_FLOAT CPDF_TextObject::GetPosY() const {
}
CPDF_Font* CPDF_TextObject::GetFont() const {
- return m_TextState->GetFont();
+ return m_TextState.GetFont();
}
FX_FLOAT CPDF_TextObject::GetFontSize() const {
- return m_TextState->GetFontSize();
+ return m_TextState.GetFontSize();
}
void CPDF_TextObject::CalcPositionData(FX_FLOAT* pTextAdvanceX,
@@ -248,13 +248,13 @@ void CPDF_TextObject::CalcPositionData(FX_FLOAT* pTextAdvanceX,
FX_FLOAT max_x = -10000 * 1.0f;
FX_FLOAT min_y = 10000 * 1.0f;
FX_FLOAT max_y = -10000 * 1.0f;
- CPDF_Font* pFont = m_TextState->GetFont();
+ CPDF_Font* pFont = m_TextState.GetFont();
FX_BOOL bVertWriting = FALSE;
CPDF_CIDFont* pCIDFont = pFont->AsCIDFont();
if (pCIDFont) {
bVertWriting = pCIDFont->IsVertWriting();
}
- FX_FLOAT fontsize = m_TextState->GetFontSize();
+ FX_FLOAT fontsize = m_TextState.GetFontSize();
for (int i = 0; i < m_nChars; ++i) {
uint32_t charcode =
m_nChars == 1 ? (uint32_t)(uintptr_t)m_pCharCodes : m_pCharCodes[i];
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_pathobject.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_textstate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698