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

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

Issue 1108903002: Merge to XFA: Reduce usage of operator LPCWSTR from CFX_WideString(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 7 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 | « core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp ('k') | core/src/fpdfdoc/doc_ap.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 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 #include "../../../include/fxcrt/fx_string.h" 8 #include "../../../include/fxcrt/fx_string.h"
9 9
10 //static 10 //static
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 CFX_ByteString CPDF_Number::GetString() const 368 CFX_ByteString CPDF_Number::GetString() const
369 { 369 {
370 return m_bInteger ? CFX_ByteString::FormatInteger(m_Integer, FXFORMAT_SIGNED ) : CFX_ByteString::FormatFloat(m_Float); 370 return m_bInteger ? CFX_ByteString::FormatInteger(m_Integer, FXFORMAT_SIGNED ) : CFX_ByteString::FormatFloat(m_Float);
371 } 371 }
372 void CPDF_Number::SetNumber(FX_FLOAT value) 372 void CPDF_Number::SetNumber(FX_FLOAT value)
373 { 373 {
374 m_bInteger = FALSE; 374 m_bInteger = FALSE;
375 m_Float = value; 375 m_Float = value;
376 } 376 }
377 CPDF_String::CPDF_String(const CFX_WideString& str) : CPDF_Object(PDFOBJ_STRING) , m_bHex(FALSE) { 377 CPDF_String::CPDF_String(const CFX_WideString& str) : CPDF_Object(PDFOBJ_STRING) , m_bHex(FALSE) {
378 m_String = PDF_EncodeText(str, str.GetLength()); 378 m_String = PDF_EncodeText(str);
379 } 379 }
380 CPDF_Array::~CPDF_Array() 380 CPDF_Array::~CPDF_Array()
381 { 381 {
382 int size = m_Objects.GetSize(); 382 int size = m_Objects.GetSize();
383 CPDF_Object** pList = (CPDF_Object**)m_Objects.GetData(); 383 CPDF_Object** pList = (CPDF_Object**)m_Objects.GetData();
384 for (int i = 0; i < size; i ++) { 384 for (int i = 0; i < size; i ++) {
385 if (pList[i]) 385 if (pList[i])
386 pList[i]->Release(); 386 pList[i]->Release();
387 } 387 }
388 } 388 }
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 pObj->m_ObjNum = objnum; 1284 pObj->m_ObjNum = objnum;
1285 m_IndirectObjs.SetAt((FX_LPVOID)(FX_UINTPTR)objnum, pObj); 1285 m_IndirectObjs.SetAt((FX_LPVOID)(FX_UINTPTR)objnum, pObj);
1286 if (m_LastObjNum < objnum) { 1286 if (m_LastObjNum < objnum) {
1287 m_LastObjNum = objnum; 1287 m_LastObjNum = objnum;
1288 } 1288 }
1289 } 1289 }
1290 FX_DWORD CPDF_IndirectObjects::GetLastObjNum() const 1290 FX_DWORD CPDF_IndirectObjects::GetLastObjNum() const
1291 { 1291 {
1292 return m_LastObjNum; 1292 return m_LastObjNum;
1293 } 1293 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp ('k') | core/src/fpdfdoc/doc_ap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698