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

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

Issue 2287313004: Make CPDF_TextState have a CPDF_TextStateData rather than inheriting one. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@moar_better_constness
Patch Set: Casts, Casts, New -> Emplace. 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_graphicstates.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 af6ae0674180737f03c3658f8ceb9362a81cb211..f9e6bdaa76ae2f68c2fac766c303a337f0d6ad78 100644
--- a/core/fpdfapi/fpdf_page/cpdf_textobject.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_textobject.cpp
@@ -334,9 +334,9 @@ void CPDF_TextObject::CalcPositionData(FX_FLOAT* pTextAdvanceX,
}
curpos += charwidth;
if (charcode == ' ' && (!pCIDFont || pCIDFont->GetCharSize(32) == 1)) {
- curpos += m_TextState.GetObject()->m_WordSpace;
+ curpos += m_TextState.GetWordSpace();
}
- curpos += m_TextState.GetObject()->m_CharSpace;
+ curpos += m_TextState.GetCharSpace();
}
if (bVertWriting) {
if (pTextAdvanceX) {
@@ -364,7 +364,7 @@ void CPDF_TextObject::CalcPositionData(FX_FLOAT* pTextAdvanceX,
m_Bottom = min_y;
m_Top = max_y;
matrix.TransformRect(m_Left, m_Right, m_Top, m_Bottom);
- if (TextRenderingModeIsStrokeMode(m_TextState.GetObject()->m_TextMode)) {
+ if (TextRenderingModeIsStrokeMode(m_TextState.GetTextMode())) {
FX_FLOAT half_width = m_GraphState.GetObject()->m_LineWidth / 2;
m_Left -= half_width;
m_Right += half_width;
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_graphicstates.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_textstate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698