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

Side by Side Diff: xfa/fgas/font/fgas_stdfontmgr.cpp

Issue 2430743003: in the attempt to fix 627393, changed IFX_FileRead's readBlock to return the length it reads
Patch Set: delete the include folder Created 4 years, 1 month 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 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 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 "xfa/fgas/font/fgas_stdfontmgr.h" 7 #include "xfa/fgas/font/fgas_stdfontmgr.h"
8 8
9 #include "core/fxcrt/fx_stream.h" 9 #include "core/fxcrt/fx_stream.h"
10 #include "core/fxge/cfx_fontmapper.h" 10 #include "core/fxge/cfx_fontmapper.h"
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 862
863 unsigned long _ftStreamRead(FXFT_Stream stream, 863 unsigned long _ftStreamRead(FXFT_Stream stream,
864 unsigned long offset, 864 unsigned long offset,
865 unsigned char* buffer, 865 unsigned char* buffer,
866 unsigned long count) { 866 unsigned long count) {
867 if (count == 0) 867 if (count == 0)
868 return 0; 868 return 0;
869 869
870 IFX_SeekableReadStream* pFile = 870 IFX_SeekableReadStream* pFile =
871 (IFX_SeekableReadStream*)stream->descriptor.pointer; 871 (IFX_SeekableReadStream*)stream->descriptor.pointer;
872 int res = pFile->ReadBlock(buffer, offset, count); 872 if (pFile->ReadBlock(buffer, offset, count) == static_cast<size_t>(count) ||
873 if (res) 873 pFile->IsEOF())
874 return count; 874 return count;
875 return 0; 875 return 0;
876 } 876 }
877 877
878 void _ftStreamClose(FXFT_Stream stream) {} 878 void _ftStreamClose(FXFT_Stream stream) {}
879 879
880 }; // extern "C" 880 }; // extern "C"
881 881
882 FXFT_Face CFGAS_FontMgrImp::LoadFace(IFX_SeekableReadStream* pFontStream, 882 FXFT_Face CFGAS_FontMgrImp::LoadFace(IFX_SeekableReadStream* pFontStream,
883 int32_t iFaceIndex) { 883 int32_t iFaceIndex) {
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 1375
1376 int32_t CFGAS_FontMgrImp::IsPartName(const CFX_WideString& Name1, 1376 int32_t CFGAS_FontMgrImp::IsPartName(const CFX_WideString& Name1,
1377 const CFX_WideString& Name2) { 1377 const CFX_WideString& Name2) {
1378 if (Name1.Find(Name2.c_str()) != -1) { 1378 if (Name1.Find(Name2.c_str()) != -1) {
1379 return 1; 1379 return 1;
1380 } 1380 }
1381 return 0; 1381 return 0;
1382 } 1382 }
1383 1383
1384 #endif 1384 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698