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

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

Issue 23902018: pdfviewer: do not submit, uploaded for backup, and will be done actually after I refactor the param… Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 3 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
Index: experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.h
===================================================================
--- experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.h (revision 11117)
+++ experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.h (working copy)
@@ -38,25 +38,31 @@
class SkPdfNativeObject {
public:
enum ObjectType {
- kInvalid_PdfObjectType,
+ // The type will have only one of these values, but for error reporting, we make it an enum
+ // so it can easily report that something was expected to be one of a few types
+ kInvalid_PdfObjectType = 1 << 1,
- kBoolean_PdfObjectType,
- kInteger_PdfObjectType,
- kReal_PdfObjectType,
- kString_PdfObjectType,
- kHexString_PdfObjectType,
- kName_PdfObjectType,
- kKeyword_PdfObjectType,
- //kStream_PdfObjectType, // attached to a Dictionary
- kArray_PdfObjectType,
- kDictionary_PdfObjectType,
- kNull_PdfObjectType,
+ kBoolean_PdfObjectType = 1 << 2,
+ kInteger_PdfObjectType = 1 << 3,
+ kReal_PdfObjectType = 1 << 4,
+ _kNumber_PdfObjectType = kInteger_PdfObjectType | kReal_PdfObjectType,
+ kString_PdfObjectType = 1 << 5,
+ kHexString_PdfObjectType = 1 << 6,
+ _kAnyString_PdfObjectType = kString_PdfObjectType | kHexString_PdfObjectType,
+ kName_PdfObjectType = 1 << 7,
+ kKeyword_PdfObjectType = 1 << 8,
+ _kStream_PdfObjectType = 1 << 9, // attached to a Dictionary, do not use
+ kArray_PdfObjectType = 1 << 10,
+ kDictionary_PdfObjectType = 1 << 11,
+ kNull_PdfObjectType = 1 << 12,
// TODO(edisonn): after the pdf has been loaded completely, resolve all references
// try the same thing with delayed loaded ...
- kReference_PdfObjectType,
+ kReference_PdfObjectType = 1 << 13,
- kUndefined_PdfObjectType, // per 1.4 spec, if the same key appear twice in the dictionary, the value is undefined
+ kUndefined_PdfObjectType = 1 << 14, // per 1.4 spec, if the same key appear twice in the dictionary, the value is undefined
+
+ _kObject_PdfObjectType = -1,
};
enum DataType {

Powered by Google App Engine
This is Rietveld 408576698