summaryrefslogtreecommitdiff
path: root/core/fpdftext/cpdf_textpage.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-08-30 10:32:36 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-30 10:32:36 -0700
commitfbda17d61de1e02799f5d77dceb23df3688b764e (patch)
treead15940f6c9bf31ca390a711636981ecd0e52ff6 /core/fpdftext/cpdf_textpage.cpp
parentf7252a074ed013e2ad3cc11e08eba90502262ce0 (diff)
downloadpdfium-fbda17d61de1e02799f5d77dceb23df3688b764e.tar.xz
Make CPDF_TextState have a CPDF_TextStateData rather than inheriting one.
Review-Url: https://codereview.chromium.org/2287313004
Diffstat (limited to 'core/fpdftext/cpdf_textpage.cpp')
-rw-r--r--core/fpdftext/cpdf_textpage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index 3981cfee40..909e029262 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -45,10 +45,10 @@ FX_FLOAT CalculateBaseSpace(const CPDF_TextObject* pTextObj,
const CFX_Matrix& matrix) {
FX_FLOAT baseSpace = 0.0;
const int nItems = pTextObj->CountItems();
- if (pTextObj->m_TextState.GetObject()->m_CharSpace && nItems >= 3) {
+ if (pTextObj->m_TextState.GetCharSpace() && nItems >= 3) {
bool bAllChar = true;
- FX_FLOAT spacing = matrix.TransformDistance(
- pTextObj->m_TextState.GetObject()->m_CharSpace);
+ FX_FLOAT spacing =
+ matrix.TransformDistance(pTextObj->m_TextState.GetCharSpace());
baseSpace = spacing;
for (int i = 0; i < nItems; i++) {
CPDF_TextObjectItem item;
@@ -1088,7 +1088,7 @@ void CPDF_TextPage::ProcessTextObject(PDFTEXT_Obj Obj) {
spacing = -fontsize_h * item.m_OriginX / 1000;
continue;
}
- FX_FLOAT charSpace = pTextObj->m_TextState.GetObject()->m_CharSpace;
+ FX_FLOAT charSpace = pTextObj->m_TextState.GetCharSpace();
if (charSpace > 0.001)
spacing += matrix.TransformDistance(charSpace);
else if (charSpace < -0.001)