summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_filespec.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_filespec.h')
-rw-r--r--core/fpdfdoc/cpdf_filespec.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/core/fpdfdoc/cpdf_filespec.h b/core/fpdfdoc/cpdf_filespec.h
index deeccb9619..7050f695bb 100644
--- a/core/fpdfdoc/cpdf_filespec.h
+++ b/core/fpdfdoc/cpdf_filespec.h
@@ -18,6 +18,7 @@ class CPDF_Stream;
class CPDF_FileSpec {
public:
+ explicit CPDF_FileSpec(const CPDF_Object* pObj);
explicit CPDF_FileSpec(CPDF_Object* pObj);
~CPDF_FileSpec();
@@ -27,16 +28,20 @@ class CPDF_FileSpec {
// Convert a pdf file name into platform dependent format.
static WideString DecodeFileName(const WideString& filepath);
- CPDF_Object* GetObj() const { return m_pObj.Get(); }
+ const CPDF_Object* GetObj() const { return m_pObj.Get(); }
+ CPDF_Object* GetObj() { return m_pWritableObj.Get(); }
WideString GetFileName() const;
- CPDF_Stream* GetFileStream() const;
- CPDF_Dictionary* GetParamsDict() const;
+ const CPDF_Stream* GetFileStream() const;
+ CPDF_Stream* GetFileStream();
+ const CPDF_Dictionary* GetParamsDict() const;
+ CPDF_Dictionary* GetParamsDict();
// Set this file spec to refer to a file name (not a url).
void SetFileName(const WideString& wsFileName);
private:
- UnownedPtr<CPDF_Object> const m_pObj;
+ UnownedPtr<const CPDF_Object> const m_pObj;
+ UnownedPtr<CPDF_Object> const m_pWritableObj;
};
#endif // CORE_FPDFDOC_CPDF_FILESPEC_H_