| Index: core/include/fpdfapi/fpdf_objects.h
|
| diff --git a/core/include/fpdfapi/fpdf_objects.h b/core/include/fpdfapi/fpdf_objects.h
|
| index 4141ec854a5b9800aca60a581ef72e3f52b64078..a52132f6b96885286b56b0068e1cb5b12698d1e1 100644
|
| --- a/core/include/fpdfapi/fpdf_objects.h
|
| +++ b/core/include/fpdfapi/fpdf_objects.h
|
| @@ -78,8 +78,12 @@ class CPDF_Object {
|
|
|
| FX_BOOL IsModified() const { return FALSE; }
|
|
|
| + bool IsBoolean() const { return m_Type == PDFOBJ_BOOLEAN; }
|
| bool IsDictionary() const { return m_Type == PDFOBJ_DICTIONARY; }
|
|
|
| + CPDF_Boolean* AsBoolean();
|
| + const CPDF_Boolean* AsBoolean() const;
|
| +
|
| CPDF_Dictionary* AsDictionary();
|
| const CPDF_Dictionary* AsDictionary() const;
|
|
|
| @@ -117,6 +121,13 @@ class CPDF_Boolean : public CPDF_Object {
|
| FX_BOOL m_bValue;
|
| friend class CPDF_Object;
|
| };
|
| +inline CPDF_Boolean* ToBoolean(CPDF_Object* obj) {
|
| + return obj ? obj->AsBoolean() : nullptr;
|
| +}
|
| +inline const CPDF_Boolean* ToBoolean(const CPDF_Object* obj) {
|
| + return obj ? obj->AsBoolean() : nullptr;
|
| +}
|
| +
|
| class CPDF_Number : public CPDF_Object {
|
| public:
|
| static CPDF_Number* Create(int value) { return new CPDF_Number(value); }
|
|
|