From d09a09751f724ecdb1a0bc307447a3d0c212ebff Mon Sep 17 00:00:00 2001 From: tsepez Date: Mon, 29 Aug 2016 10:24:19 -0700 Subject: Replace wrapper methods in CPDF_Path with -> operator. These just invoked exaclty the same methodes in the underlying xxxData class, which we can now do with just a ->() Move some methods to the xxxData class, where they belong. In doing so, put MakePrivateCopy() calls at each callsite for those methods that made a copy. Review-Url: https://codereview.chromium.org/2286983002 --- core/fpdftext/cpdf_textpage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpdftext/cpdf_textpage.cpp') diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp index ca1cbf1925..2ea6509021 100644 --- a/core/fpdftext/cpdf_textpage.cpp +++ b/core/fpdftext/cpdf_textpage.cpp @@ -54,7 +54,7 @@ FX_FLOAT CalculateBaseSpace(const CPDF_TextObject* pTextObj, CPDF_TextObjectItem item; pTextObj->GetItemInfo(i, &item); if (item.m_CharCode == static_cast(-1)) { - FX_FLOAT fontsize_h = pTextObj->m_TextState.GetFontSizeH(); + FX_FLOAT fontsize_h = pTextObj->m_TextState->GetFontSizeH(); FX_FLOAT kerning = -fontsize_h * item.m_OriginX / 1000; baseSpace = std::min(baseSpace, kerning + spacing); bAllChar = false; @@ -1084,7 +1084,7 @@ void CPDF_TextPage::ProcessTextObject(PDFTEXT_Obj Obj) { if (str.IsEmpty() || str.GetAt(str.GetLength() - 1) == TEXT_SPACE_CHAR) continue; - FX_FLOAT fontsize_h = pTextObj->m_TextState.GetFontSizeH(); + FX_FLOAT fontsize_h = pTextObj->m_TextState->GetFontSizeH(); spacing = -fontsize_h * item.m_OriginX / 1000; continue; } @@ -1096,7 +1096,7 @@ void CPDF_TextPage::ProcessTextObject(PDFTEXT_Obj Obj) { spacing -= baseSpace; if (spacing && i > 0) { int last_width = 0; - FX_FLOAT fontsize_h = pTextObj->m_TextState.GetFontSizeH(); + FX_FLOAT fontsize_h = pTextObj->m_TextState->GetFontSizeH(); uint32_t space_charcode = pFont->CharCodeFromUnicode(' '); FX_FLOAT threshold = 0; if (space_charcode != CPDF_Font::kInvalidCharCode) -- cgit v1.2.3