summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_filespec.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-28 17:51:28 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-28 17:51:28 +0000
commitfffdeebfd0ed9806d32eb5609e0fdd015c25c5ac (patch)
tree7461043e508179a7d33b850486f312c58048e4a8 /core/fpdfdoc/cpdf_filespec.h
parent45a55241d315d25067582d29fcdc1ff8b818965f (diff)
downloadpdfium-fffdeebfd0ed9806d32eb5609e0fdd015c25c5ac.tar.xz
Add const/non-const versions of remaining CPDF_Dictionary methods.
GetObjectFor() and GetDirectObjectFor(). Change-Id: I588cd994dfccf0ffd4c8f91362a4806dc109251e Reviewed-on: https://pdfium-review.googlesource.com/32991 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
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_