summaryrefslogtreecommitdiff
path: root/core/fpdftext
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-08-26 16:52:33 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-26 16:52:33 -0700
commitc10c23a2b1999b1cb0354fd4db9837dc63a3d833 (patch)
tree2f5b9f35d372de26476411295120146baa93f5fb /core/fpdftext
parent9ed91376d562f3c6e7ca0a99035a74502f648776 (diff)
downloadpdfium-c10c23a2b1999b1cb0354fd4db9837dc63a3d833.tar.xz
Add -> operators to CFX_CountRef.chromium/2842
Allows CFX_CountRefs to behave more like pointers. Rename SetNull() to Clear() for consistency with other ptrs. Change GetPrivateCopy() into MakePrivateCopy() with no return, since the -> operators are clearer than getting an object pointer. Review-Url: https://codereview.chromium.org/2283113002
Diffstat (limited to 'core/fpdftext')
-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..ca1cbf1925 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->m_CharSpace && nItems >= 3) {
bool bAllChar = true;
- FX_FLOAT spacing = matrix.TransformDistance(
- pTextObj->m_TextState.GetObject()->m_CharSpace);
+ FX_FLOAT spacing =
+ matrix.TransformDistance(pTextObj->m_TextState->m_CharSpace);
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->m_CharSpace;
if (charSpace > 0.001)
spacing += matrix.TransformDistance(charSpace);
else if (charSpace < -0.001)