diff options
author | tsepez <tsepez@chromium.org> | 2016-08-29 10:24:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-29 10:24:19 -0700 |
commit | d09a09751f724ecdb1a0bc307447a3d0c212ebff (patch) | |
tree | 917a2986be9769a6bfaf8ac4cc96a8a4006eed82 /core/fpdfapi/fpdf_page/fpdf_page_parser.cpp | |
parent | a032f7f79c67ddef4db0f44fca8f0d245bfb8e82 (diff) | |
download | pdfium-d09a09751f724ecdb1a0bc307447a3d0c212ebff.tar.xz |
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
Diffstat (limited to 'core/fpdfapi/fpdf_page/fpdf_page_parser.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_page/fpdf_page_parser.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp index 3afcf4b7d1..5d5b75b60e 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp @@ -1144,7 +1144,7 @@ void CPDF_StreamContentParser::Handle_SetFont() { m_pCurStates->m_TextState->m_FontSize = fs; CPDF_Font* pFont = FindFont(GetString(1)); if (pFont) - m_pCurStates->m_TextState.SetFont(pFont); + m_pCurStates->m_TextState->SetFont(pFont); } CPDF_Object* CPDF_StreamContentParser::FindResourceObj( @@ -1231,17 +1231,17 @@ void CPDF_StreamContentParser::AddTextObject(CFX_ByteString* pStrs, FX_FLOAT fInitKerning, FX_FLOAT* pKerning, int nsegs) { - CPDF_Font* pFont = m_pCurStates->m_TextState.GetFont(); + CPDF_Font* pFont = m_pCurStates->m_TextState->GetFont(); if (!pFont) { return; } if (fInitKerning != 0) { if (!pFont->IsVertWriting()) { m_pCurStates->m_TextX -= - (fInitKerning * m_pCurStates->m_TextState.GetFontSize()) / 1000; + (fInitKerning * m_pCurStates->m_TextState->GetFontSize()) / 1000; } else { m_pCurStates->m_TextY -= - (fInitKerning * m_pCurStates->m_TextState.GetFontSize()) / 1000; + (fInitKerning * m_pCurStates->m_TextState->GetFontSize()) / 1000; } } if (nsegs == 0) { @@ -1281,11 +1281,11 @@ void CPDF_StreamContentParser::AddTextObject(CFX_ByteString* pStrs, if (pKerning && pKerning[nsegs - 1] != 0) { if (!pFont->IsVertWriting()) { m_pCurStates->m_TextX -= - (pKerning[nsegs - 1] * m_pCurStates->m_TextState.GetFontSize()) / + (pKerning[nsegs - 1] * m_pCurStates->m_TextState->GetFontSize()) / 1000; } else { m_pCurStates->m_TextY -= - (pKerning[nsegs - 1] * m_pCurStates->m_TextState.GetFontSize()) / + (pKerning[nsegs - 1] * m_pCurStates->m_TextState->GetFontSize()) / 1000; } } @@ -1313,7 +1313,7 @@ void CPDF_StreamContentParser::Handle_ShowText_Positioning() { if (nsegs == 0) { for (size_t i = 0; i < n; i++) { m_pCurStates->m_TextX -= - (pArray->GetNumberAt(i) * m_pCurStates->m_TextState.GetFontSize()) / + (pArray->GetNumberAt(i) * m_pCurStates->m_TextState->GetFontSize()) / 1000; } return; |