summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Document.h
diff options
context:
space:
mode:
authortonikitoo <tonikitoo@igalia.com>2016-08-02 11:52:28 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-02 11:52:28 -0700
commitea3ff9eaaa508b9cbc7f52bc92d189eacbc7a935 (patch)
tree286510e2a2aae68e7c1495d7cbed0b6880a805ba /fpdfsdk/javascript/Document.h
parent6faf9f9508b858e27fde9a7f75ff6962048326ca (diff)
downloadpdfium-ea3ff9eaaa508b9cbc7f52bc92d189eacbc7a935.tar.xz
Introduce ::getPropertyInternal method to avoid duplicationchromium/2819chromium/2818chromium/2817
Document.cpp implements "getter" methods for some of the Document object properties. Some of the body of such methods are identical. Patch introduces a ::getPropertyInternal private method that gets rid of this duplication. Namely the following properties' getters are cleaned up: - "author", "creationDate", "creator", "keywords", - "modDate", "producer", "subject" and "title" No behavior change. Review-Url: https://codereview.chromium.org/2202283002
Diffstat (limited to 'fpdfsdk/javascript/Document.h')
-rw-r--r--fpdfsdk/javascript/Document.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fpdfsdk/javascript/Document.h b/fpdfsdk/javascript/Document.h
index c0ef840d4a..7e5d6dfe8a 100644
--- a/fpdfsdk/javascript/Document.h
+++ b/fpdfsdk/javascript/Document.h
@@ -272,6 +272,11 @@ class Document : public CJS_EmbedObj {
int CountWords(CPDF_TextObject* pTextObj);
CFX_WideString GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex);
+ FX_BOOL getPropertyInternal(IJS_Context* cc,
+ CJS_PropValue& vp,
+ const CFX_ByteString& propName,
+ CFX_WideString& sError);
+
v8::Isolate* m_isolate;
std::list<std::unique_ptr<IconElement>> m_IconList;
CPDFSDK_Document* m_pDocument;