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

Unified Diff: experimental/PdfViewer/autogen/SkPdfStreamCommonDictionary_autogen.h

Issue 17856004: refactoring for pdf viewer lib (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 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/autogen/SkPdfStreamCommonDictionary_autogen.h
===================================================================
--- experimental/PdfViewer/autogen/SkPdfStreamCommonDictionary_autogen.h (revision 9765)
+++ experimental/PdfViewer/autogen/SkPdfStreamCommonDictionary_autogen.h (working copy)
@@ -536,13 +536,7 @@
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length", "", NULL));
}
- long Length() const {
- long ret;
- if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return 0;
- }
-
+ long Length() const;
/** (Optional) The name of a filter to be applied in processing the stream
* data found between the keywords stream and endstream, or an array
* of such names. Multiple filters should be specified in the order in
@@ -558,26 +552,14 @@
return ret->podofo()->GetDataType() == ePdfDataType_Name;
}
- std::string getFilterAsName() const {
- std::string ret = "";
- if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return "";
- }
-
+ std::string getFilterAsName() const;
bool isFilterAArray() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Array;
}
- SkPdfArray* getFilterAsArray() const {
- SkPdfArray* ret = NULL;
- if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return NULL;
- }
-
+ SkPdfArray* getFilterAsArray() const;
/** (Optional) A parameter dictionary, or an array of such dictionaries,
* used by the filters specified by Filter. If there is only one filter and that
* filter has parameters, DecodeParms must be set to the filter's parame-
@@ -601,26 +583,14 @@
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
}
- SkPdfDictionary* getDecodeParmsAsDictionary() const {
- SkPdfDictionary* ret = NULL;
- if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DecodeParms", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return NULL;
- }
-
+ SkPdfDictionary* getDecodeParmsAsDictionary() const;
bool isDecodeParmsAArray() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DecodeParms", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Array;
}
- SkPdfArray* getDecodeParmsAsArray() const {
- SkPdfArray* ret = NULL;
- if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DecodeParms", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return NULL;
- }
-
+ SkPdfArray* getDecodeParmsAsArray() const;
/** (Optional; PDF 1.2) The file containing the stream data. If this entry
* is present, the bytes between stream and endstream are ignored, the
* filters are specified by FFilter rather than Filter, and the filter parame-
@@ -632,13 +602,7 @@
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
}
- SkPdfFileSpec F() const {
- SkPdfFileSpec ret;
- if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return SkPdfFileSpec();
- }
-
+ SkPdfFileSpec F() const;
/** (Optional; PDF 1.2) The name of a filter to be applied in processing
* the data found in the stream's external file, or an array of such names.
* The same rules apply as for Filter.
@@ -653,26 +617,14 @@
return ret->podofo()->GetDataType() == ePdfDataType_Name;
}
- std::string getFFilterAsName() const {
- std::string ret = "";
- if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FFilter", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return "";
- }
-
+ std::string getFFilterAsName() const;
bool isFFilterAArray() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FFilter", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Array;
}
- SkPdfArray* getFFilterAsArray() const {
- SkPdfArray* ret = NULL;
- if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FFilter", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return NULL;
- }
-
+ SkPdfArray* getFFilterAsArray() const;
/** (Optional; PDF 1.2) A parameter dictionary, or an array of such dic-
* tionaries, used by the filters specified by FFilter. The same rules apply
* as for DecodeParms.
@@ -687,26 +639,14 @@
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
}
- SkPdfDictionary* getFDecodeParmsAsDictionary() const {
- SkPdfDictionary* ret = NULL;
- if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FDecodeParms", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return NULL;
- }
-
+ SkPdfDictionary* getFDecodeParmsAsDictionary() const;
bool isFDecodeParmsAArray() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FDecodeParms", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Array;
}
- SkPdfArray* getFDecodeParmsAsArray() const {
- SkPdfArray* ret = NULL;
- if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FDecodeParms", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return NULL;
- }
-
+ SkPdfArray* getFDecodeParmsAsArray() const;
};
#endif // __DEFINED__SkPdfStreamCommonDictionary

Powered by Google App Engine
This is Rietveld 408576698