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

Side by Side Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp

Issue 809993004: Get rid of FX_LPCSTR cast. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Indent Created 5 years, 11 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
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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 "../../../include/fpdfapi/fpdf_parser.h" 7 #include "../../../include/fpdfapi/fpdf_parser.h"
8 void CPDF_Object::Release() 8 void CPDF_Object::Release()
9 { 9 {
10 if (m_ObjNum) { 10 if (m_ObjNum) {
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 return PDF_DecodeText(((CPDF_Name*)this)->m_Name, pCharMap); 321 return PDF_DecodeText(((CPDF_Name*)this)->m_Name, pCharMap);
322 } 322 }
323 return CFX_WideString(); 323 return CFX_WideString();
324 } 324 }
325 void CPDF_Object::SetUnicodeText(FX_LPCWSTR pUnicodes, int len) 325 void CPDF_Object::SetUnicodeText(FX_LPCWSTR pUnicodes, int len)
326 { 326 {
327 if (m_Type == PDFOBJ_STRING) { 327 if (m_Type == PDFOBJ_STRING) {
328 ((CPDF_String*)this)->m_String = PDF_EncodeText(pUnicodes, len); 328 ((CPDF_String*)this)->m_String = PDF_EncodeText(pUnicodes, len);
329 } else if (m_Type == PDFOBJ_STREAM) { 329 } else if (m_Type == PDFOBJ_STREAM) {
330 CFX_ByteString result = PDF_EncodeText(pUnicodes, len); 330 CFX_ByteString result = PDF_EncodeText(pUnicodes, len);
331 ((CPDF_Stream*)this)->SetData((FX_LPBYTE)(FX_LPCSTR)result, result.GetLe ngth(), FALSE, FALSE); 331 ((CPDF_Stream*)this)->SetData((FX_LPBYTE)result.c_str(), result.GetLengt h(), FALSE, FALSE);
332 } 332 }
333 } 333 }
334 CPDF_Number::CPDF_Number(int value) 334 CPDF_Number::CPDF_Number(int value)
335 { 335 {
336 m_Type = PDFOBJ_NUMBER; 336 m_Type = PDFOBJ_NUMBER;
337 m_bInteger = TRUE; 337 m_bInteger = TRUE;
338 m_Integer = value; 338 m_Integer = value;
339 } 339 }
340 CPDF_Number::CPDF_Number(FX_FLOAT value) 340 CPDF_Number::CPDF_Number(FX_FLOAT value)
341 { 341 {
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 pObj->m_ObjNum = objnum; 1286 pObj->m_ObjNum = objnum;
1287 m_IndirectObjs.SetAt((FX_LPVOID)(FX_UINTPTR)objnum, pObj); 1287 m_IndirectObjs.SetAt((FX_LPVOID)(FX_UINTPTR)objnum, pObj);
1288 if (m_LastObjNum < objnum) { 1288 if (m_LastObjNum < objnum) {
1289 m_LastObjNum = objnum; 1289 m_LastObjNum = objnum;
1290 } 1290 }
1291 } 1291 }
1292 FX_DWORD CPDF_IndirectObjects::GetLastObjNum() const 1292 FX_DWORD CPDF_IndirectObjects::GetLastObjNum() const
1293 { 1293 {
1294 return m_LastObjNum; 1294 return m_LastObjNum;
1295 } 1295 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698