summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2017-10-19 14:30:15 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-19 20:02:05 +0000
commit111488c5e811a5888f08348ef1b4de1f728785db (patch)
tree98bd3545c4b22eeef494a25f556ed2a00bc41165
parentcbe23dbdff3f6e41843fd99cbf615000b52727ed (diff)
downloadpdfium-111488c5e811a5888f08348ef1b4de1f728785db.tar.xz
Cleanup visiblity in Field
This CL shuffles some methods around in the Field declaration and cleans up the visibility as needed. Change-Id: Icff3bd791d734c3baa69fd092a2f96058eaf62fd Reviewed-on: https://pdfium-review.googlesource.com/16370 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
-rw-r--r--fpdfsdk/javascript/Document.cpp6
-rw-r--r--fpdfsdk/javascript/Field.h13
2 files changed, 9 insertions, 10 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index e7dee1cefa..10947c8032 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -1805,18 +1805,18 @@ void Document::AddDelayData(CJS_DelayData* pData) {
}
void Document::DoFieldDelay(const WideString& sFieldName, int nControlIndex) {
- std::vector<std::unique_ptr<CJS_DelayData>> DelayDataForFieldAndControlIndex;
+ std::vector<std::unique_ptr<CJS_DelayData>> delayed_data;
auto iter = m_DelayData.begin();
while (iter != m_DelayData.end()) {
auto old = iter++;
if ((*old)->sFieldName == sFieldName &&
(*old)->nControlIndex == nControlIndex) {
- DelayDataForFieldAndControlIndex.push_back(std::move(*old));
+ delayed_data.push_back(std::move(*old));
m_DelayData.erase(old);
}
}
- for (const auto& pData : DelayDataForFieldAndControlIndex)
+ for (const auto& pData : delayed_data)
Field::DoDelay(m_pFormFillEnv.Get(), pData.get());
}
diff --git a/fpdfsdk/javascript/Field.h b/fpdfsdk/javascript/Field.h
index bd90ff74df..7284153352 100644
--- a/fpdfsdk/javascript/Field.h
+++ b/fpdfsdk/javascript/Field.h
@@ -74,6 +74,9 @@ struct CJS_DelayData {
class Field : public CJS_EmbedObj {
public:
+ static void DoDelay(CPDFSDK_FormFillEnvironment* pFormFillEnv,
+ CJS_DelayData* pData);
+
explicit Field(CJS_Object* pJSObject);
~Field() override;
@@ -522,6 +525,9 @@ class Field : public CJS_EmbedObj {
CJS_Value& vRet,
WideString& sError);
+ bool AttachField(Document* pDocument, const WideString& csFieldName);
+
+ private:
static void SetAlignment(CPDFSDK_FormFillEnvironment* pFormFillEnv,
const WideString& swFieldName,
int nControlIndex,
@@ -677,13 +683,7 @@ class Field : public CJS_EmbedObj {
CPDFSDK_FormFillEnvironment* pFormFillEnv,
const WideString& csFieldName);
- static void DoDelay(CPDFSDK_FormFillEnvironment* pFormFillEnv,
- CJS_DelayData* pData);
-
- bool AttachField(Document* pDocument, const WideString& csFieldName);
void SetDelay(bool bDelay);
-
- protected:
void ParseFieldName(const std::wstring& strFieldNameParsed,
std::wstring& strFieldName,
int& iControlNo);
@@ -704,7 +704,6 @@ class Field : public CJS_EmbedObj {
void DoDelay();
- public:
Document* m_pJSDoc;
CPDFSDK_FormFillEnvironment::ObservedPtr m_pFormFillEnv;
WideString m_FieldName;