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

Unified Diff: experimental/PdfViewer/pdfparser/native/SkPdfObject.h

Issue 21096006: pdfviewer: load files with missing xref (we need in order to help with testing, as most good pdfx i… (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/pdfparser/native/SkPdfObject.h
===================================================================
--- experimental/PdfViewer/pdfparser/native/SkPdfObject.h (revision 10419)
+++ experimental/PdfViewer/pdfparser/native/SkPdfObject.h (working copy)
@@ -527,6 +527,22 @@
return fObjectType == kKeyword_PdfObjectType;
}
+ bool isKeyword(const char* keyword) const {
+ if (!isKeyword()) {
+ return false;
+ }
+
+ if (strlen(keyword) != fStr.fBytes) {
+ return false;
+ }
+
+ if (strncmp(keyword, (const char*)fStr.fBuffer, fStr.fBytes) != 0) {
+ return false;
+ }
+
+ return true;
+ }
+
bool isName() const {
return fObjectType == kName_PdfObjectType;
}
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698