| 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 "SkPdfTableAttributesDictionary_autogen.h" | 8 #include "SkPdfTableAttributesDictionary_autogen.h" |
| 2 | 9 |
| 3 | 10 |
| 4 #include "SkPdfNativeDoc.h" | 11 #include "SkPdfNativeDoc.h" |
| 5 int64_t SkPdfTableAttributesDictionary::RowSpan(SkPdfNativeDoc* doc) { | 12 int64_t SkPdfTableAttributesDictionary::RowSpan(SkPdfNativeDoc* doc) { |
| 6 SkPdfNativeObject* ret = get("RowSpan", ""); | 13 SkPdfNativeObject* ret = get("RowSpan", ""); |
| 7 if (doc) {ret = doc->resolveReference(ret);} | 14 if (doc) {ret = doc->resolveReference(ret);} |
| 8 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); | 15 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); |
| 9 // TODO(edisonn): warn about missing default value for optional fields | 16 // TODO(edisonn): warn about missing default value for optional fields |
| 10 return 0; | 17 return 0; |
| 11 } | 18 } |
| 12 | 19 |
| 13 bool SkPdfTableAttributesDictionary::has_RowSpan() const { | 20 bool SkPdfTableAttributesDictionary::has_RowSpan() const { |
| 14 return get("RowSpan", "") != NULL; | 21 return get("RowSpan", "") != NULL; |
| 15 } | 22 } |
| 16 | 23 |
| 17 int64_t SkPdfTableAttributesDictionary::ColSpan(SkPdfNativeDoc* doc) { | 24 int64_t SkPdfTableAttributesDictionary::ColSpan(SkPdfNativeDoc* doc) { |
| 18 SkPdfNativeObject* ret = get("ColSpan", ""); | 25 SkPdfNativeObject* ret = get("ColSpan", ""); |
| 19 if (doc) {ret = doc->resolveReference(ret);} | 26 if (doc) {ret = doc->resolveReference(ret);} |
| 20 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); | 27 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); |
| 21 // TODO(edisonn): warn about missing default value for optional fields | 28 // TODO(edisonn): warn about missing default value for optional fields |
| 22 return 0; | 29 return 0; |
| 23 } | 30 } |
| 24 | 31 |
| 25 bool SkPdfTableAttributesDictionary::has_ColSpan() const { | 32 bool SkPdfTableAttributesDictionary::has_ColSpan() const { |
| 26 return get("ColSpan", "") != NULL; | 33 return get("ColSpan", "") != NULL; |
| 27 } | 34 } |
| 28 | 35 |
| OLD | NEW |