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

Side by Side Diff: core/fpdfapi/fpdf_page/cpdf_allstates.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, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_page/cpdf_graphicstates.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fpdfapi/fpdf_page/cpdf_allstates.h" 7 #include "core/fpdfapi/fpdf_page/cpdf_allstates.h"
8 8
9 #include "core/fpdfapi/fpdf_page/pageint.h" 9 #include "core/fpdfapi/fpdf_page/pageint.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 break; 91 break;
92 } 92 }
93 case FXBSTR_ID('R', 'I', 0, 0): 93 case FXBSTR_ID('R', 'I', 0, 0):
94 m_GeneralState.SetRenderIntent(pObject->GetString()); 94 m_GeneralState.SetRenderIntent(pObject->GetString());
95 break; 95 break;
96 case FXBSTR_ID('F', 'o', 'n', 't'): { 96 case FXBSTR_ID('F', 'o', 'n', 't'): {
97 CPDF_Array* pFont = pObject->AsArray(); 97 CPDF_Array* pFont = pObject->AsArray();
98 if (!pFont) 98 if (!pFont)
99 break; 99 break;
100 100
101 m_TextState.GetPrivateCopy()->m_FontSize = pFont->GetNumberAt(1); 101 m_TextState.SetFontSize(pFont->GetNumberAt(1));
102 m_TextState.SetFont(pParser->FindFont(pFont->GetStringAt(0))); 102 m_TextState.SetFont(pParser->FindFont(pFont->GetStringAt(0)));
103 break; 103 break;
104 } 104 }
105 case FXBSTR_ID('T', 'R', 0, 0): 105 case FXBSTR_ID('T', 'R', 0, 0):
106 if (pGS->KeyExist("TR2")) { 106 if (pGS->KeyExist("TR2")) {
107 continue; 107 continue;
108 } 108 }
109 case FXBSTR_ID('T', 'R', '2', 0): 109 case FXBSTR_ID('T', 'R', '2', 0):
110 pGeneralState->m_pTR = 110 pGeneralState->m_pTR =
111 (pObject && !pObject->IsName()) ? pObject : nullptr; 111 (pObject && !pObject->IsName()) ? pObject : nullptr;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 case FXBSTR_ID('A', 'I', 'S', 0): 177 case FXBSTR_ID('A', 'I', 'S', 0):
178 pGeneralState->m_AlphaSource = pObject->GetInteger(); 178 pGeneralState->m_AlphaSource = pObject->GetInteger();
179 break; 179 break;
180 case FXBSTR_ID('T', 'K', 0, 0): 180 case FXBSTR_ID('T', 'K', 0, 0):
181 pGeneralState->m_TextKnockout = pObject->GetInteger(); 181 pGeneralState->m_TextKnockout = pObject->GetInteger();
182 break; 182 break;
183 } 183 }
184 } 184 }
185 pGeneralState->m_Matrix = m_CTM; 185 pGeneralState->m_Matrix = m_CTM;
186 } 186 }
OLDNEW
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_page/cpdf_graphicstates.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698