| OLD | NEW |
| 1 /* |
| 2 * Copyright 2013 Google Inc. |
| 3 |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 1 #include "SkPdfWebCaptureCommandDictionary_autogen.h" | 8 #include "SkPdfWebCaptureCommandDictionary_autogen.h" |
| 2 | 9 |
| 3 | 10 |
| 4 #include "SkPdfNativeDoc.h" | 11 #include "SkPdfNativeDoc.h" |
| 5 SkString SkPdfWebCaptureCommandDictionary::URL(SkPdfNativeDoc* doc) { | 12 SkString SkPdfWebCaptureCommandDictionary::URL(SkPdfNativeDoc* doc) { |
| 6 SkPdfNativeObject* ret = get("URL", ""); | 13 SkPdfNativeObject* ret = get("URL", ""); |
| 7 if (doc) {ret = doc->resolveReference(ret);} | 14 if (doc) {ret = doc->resolveReference(ret);} |
| 8 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); | 15 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); |
| 9 // TODO(edisonn): warn about missing required field, assert for known good pdf
s | 16 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 10 return SkString(); | 17 return SkString(); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 if (doc) {ret = doc->resolveReference(ret);} | 106 if (doc) {ret = doc->resolveReference(ret);} |
| 100 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; | 107 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; |
| 101 // TODO(edisonn): warn about missing default value for optional fields | 108 // TODO(edisonn): warn about missing default value for optional fields |
| 102 return NULL; | 109 return NULL; |
| 103 } | 110 } |
| 104 | 111 |
| 105 bool SkPdfWebCaptureCommandDictionary::has_S() const { | 112 bool SkPdfWebCaptureCommandDictionary::has_S() const { |
| 106 return get("S", "") != NULL; | 113 return get("S", "") != NULL; |
| 107 } | 114 } |
| 108 | 115 |
| OLD | NEW |