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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp

Issue 20538002: pdfviewer: limit the characters we support in ToUnicode, to 0xffff (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 #include "SkPdfNativeTokenizer.h" 2 #include "SkPdfNativeTokenizer.h"
3 #include "SkPdfObject.h" 3 #include "SkPdfObject.h"
4 #include "SkPdfConfig.h" 4 #include "SkPdfConfig.h"
5 5
6 #include "SkPdfStreamCommonDictionary_autogen.h" 6 #include "SkPdfStreamCommonDictionary_autogen.h"
7 #include "SkPdfImageDictionary_autogen.h" 7 #include "SkPdfImageDictionary_autogen.h"
8 8
9 // TODO(edisonn): perf!!! 9 // TODO(edisonn): perf!!!
10 // there could be 0s between start and end! but not in the needle. 10 // there could be 0s between start and end! but not in the needle.
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 // TODO(edisonn): report error 378 // TODO(edisonn): report error
379 if (in >= end) { 379 if (in >= end) {
380 if (hasOut) { *out = code; } 380 if (hasOut) { *out = code; }
381 out++; 381 out++;
382 break; 382 break;
383 } 383 }
384 384
385 if (*in == kClosedInequityBracket_PdfDelimiter) { 385 if (*in == kClosedInequityBracket_PdfDelimiter) {
386 if (hasOut) { *out = code; } 386 if (hasOut) { *out = code; }
387 out++; 387 out++;
388 in++;
388 break; 389 break;
389 } 390 }
390 391
391 switch (*in) { 392 switch (*in) {
392 case '0': 393 case '0':
393 case '1': 394 case '1':
394 case '2': 395 case '2':
395 case '3': 396 case '3':
396 case '4': 397 case '4':
397 case '5': 398 case '5':
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 SkPdfObject* obj = fAllocator->allocObject(); 1069 SkPdfObject* obj = fAllocator->allocObject();
1069 fUncompressedStream = nextObject(0, fUncompressedStream, fUncompress edStreamEnd, obj, fAllocator, fDoc); 1070 fUncompressedStream = nextObject(0, fUncompressedStream, fUncompress edStreamEnd, obj, fAllocator, fDoc);
1070 // TODO(edisonn): perf maybe we should not expand abreviation like t his 1071 // TODO(edisonn): perf maybe we should not expand abreviation like t his
1071 inlineImage->set(inlineImageKeyAbbreviationExpand(key), 1072 inlineImage->set(inlineImageKeyAbbreviationExpand(key),
1072 inlineImageValueAbbreviationExpand(obj)); 1073 inlineImageValueAbbreviationExpand(obj));
1073 } 1074 }
1074 } 1075 }
1075 // TODO(edisonn): report end of data with inline image without an EI 1076 // TODO(edisonn): report end of data with inline image without an EI
1076 return inlineImage; 1077 return inlineImage;
1077 } 1078 }
OLDNEW
« no previous file with comments | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698