summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/include
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-09-28 14:14:26 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-28 14:14:26 -0700
commit7c292e0f67e0f0bf4062e0b2adf244e17d7dacb5 (patch)
treedeb84d05a8eb6d4f194f608ebbb004842b57623b /core/fpdfdoc/include
parent8c41b1bf9fb7dd525f3a6b81d38f61d83500894d (diff)
downloadpdfium-7c292e0f67e0f0bf4062e0b2adf244e17d7dacb5.tar.xz
Remove dead code from CPDF_InterForm.
Remove default arguments. Review-Url: https://codereview.chromium.org/2380753003
Diffstat (limited to 'core/fpdfdoc/include')
-rw-r--r--core/fpdfdoc/include/cpdf_interform.h84
1 files changed, 22 insertions, 62 deletions
diff --git a/core/fpdfdoc/include/cpdf_interform.h b/core/fpdfdoc/include/cpdf_interform.h
index 6d9d616c89..9c07ee996f 100644
--- a/core/fpdfdoc/include/cpdf_interform.h
+++ b/core/fpdfdoc/include/cpdf_interform.h
@@ -36,30 +36,22 @@ class CPDF_InterForm {
explicit CPDF_InterForm(CPDF_Document* pDocument);
~CPDF_InterForm();
- static void SetUpdateAP(FX_BOOL bUpdateAP);
- static FX_BOOL IsUpdateAPEnabled();
+ static void SetUpdateAP(bool bUpdateAP);
+ static bool IsUpdateAPEnabled();
static CFX_ByteString GenerateNewResourceName(const CPDF_Dictionary* pResDict,
const FX_CHAR* csType,
- int iMinLen = 2,
- const FX_CHAR* csPrefix = "");
+ int iMinLen,
+ const FX_CHAR* csPrefix);
static CPDF_Font* AddStandardFont(CPDF_Document* pDocument,
CFX_ByteString csFontName);
- static CFX_ByteString GetNativeFont(uint8_t iCharSet,
- void* pLogFont = nullptr);
- static CFX_ByteString GetNativeFont(void* pLogFont = nullptr);
+ static CFX_ByteString GetNativeFont(uint8_t iCharSet, void* pLogFont);
static uint8_t GetNativeCharSet();
static CPDF_Font* AddNativeFont(uint8_t iCharSet, CPDF_Document* pDocument);
static CPDF_Font* AddNativeFont(CPDF_Document* pDocument);
- FX_BOOL ValidateFieldName(CFX_WideString& csNewFieldName, int iType);
- FX_BOOL ValidateFieldName(const CPDF_FormField* pField,
- CFX_WideString& csNewFieldName);
- FX_BOOL ValidateFieldName(const CPDF_FormControl* pControl,
- CFX_WideString& csNewFieldName);
-
- uint32_t CountFields(const CFX_WideString& csFieldName = L"");
+ size_t CountFields(const CFX_WideString& csFieldName) const;
CPDF_FormField* GetField(uint32_t index,
- const CFX_WideString& csFieldName = L"");
+ const CFX_WideString& csFieldName) const;
CPDF_FormField* GetFieldByDict(CPDF_Dictionary* pFieldDict) const;
CPDF_FormControl* GetControlAtPoint(CPDF_Page* pPage,
@@ -68,57 +60,30 @@ class CPDF_InterForm {
int* z_order) const;
CPDF_FormControl* GetControlByDict(const CPDF_Dictionary* pWidgetDict) const;
- CPDF_Document* GetDocument() const { return m_pDocument; }
- CPDF_Dictionary* GetFormDict() const { return m_pFormDict; }
FX_BOOL NeedConstructAP() const;
int CountFieldsInCalculationOrder();
CPDF_FormField* GetFieldInCalculationOrder(int index);
int FindFieldInCalculationOrder(const CPDF_FormField* pField);
- uint32_t CountFormFonts();
- CPDF_Font* GetFormFont(uint32_t index, CFX_ByteString& csNameTag);
CPDF_Font* GetFormFont(CFX_ByteString csNameTag);
- CPDF_Font* GetFormFont(CFX_ByteString csFontName, CFX_ByteString& csNameTag);
- CPDF_Font* GetNativeFormFont(uint8_t iCharSet, CFX_ByteString& csNameTag);
- CPDF_Font* GetNativeFormFont(CFX_ByteString& csNameTag);
- FX_BOOL FindFormFont(const CPDF_Font* pFont, CFX_ByteString& csNameTag);
- FX_BOOL FindFormFont(CFX_ByteString csFontName,
- CPDF_Font*& pFont,
- CFX_ByteString& csNameTag);
-
- FX_BOOL FindFormFont(CFX_WideString csFontName,
- CPDF_Font*& pFont,
- CFX_ByteString& csNameTag) {
- return FindFormFont(PDF_EncodeText(csFontName), pFont, csNameTag);
- }
-
- void AddFormFont(const CPDF_Font* pFont, CFX_ByteString& csNameTag);
- CPDF_Font* AddNativeFormFont(uint8_t iCharSet, CFX_ByteString& csNameTag);
- CPDF_Font* AddNativeFormFont(CFX_ByteString& csNameTag);
-
- void RemoveFormFont(const CPDF_Font* pFont);
- void RemoveFormFont(CFX_ByteString csNameTag);
-
- CPDF_DefaultAppearance GetDefaultAppearance();
- CPDF_Font* GetDefaultFormFont();
- int GetFormAlignment();
+ CPDF_DefaultAppearance GetDefaultAppearance() const;
+ int GetFormAlignment() const;
CPDF_FormField* CheckRequiredFields(
const std::vector<CPDF_FormField*>* fields,
bool bIncludeOrExclude) const;
CFDF_Document* ExportToFDF(const CFX_WideStringC& pdf_path,
- bool bSimpleFileSpec = false) const;
+ bool bSimpleFileSpec) const;
CFDF_Document* ExportToFDF(const CFX_WideStringC& pdf_path,
const std::vector<CPDF_FormField*>& fields,
- bool bIncludeOrExclude = true,
- bool bSimpleFileSpec = false) const;
- FX_BOOL ImportFromFDF(const CFDF_Document* pFDFDoc, FX_BOOL bNotify = FALSE);
+ bool bIncludeOrExclude,
+ bool bSimpleFileSpec) const;
bool ResetForm(const std::vector<CPDF_FormField*>& fields,
- bool bIncludeOrExclude = true,
- bool bNotify = false);
- bool ResetForm(bool bNotify = false);
+ bool bIncludeOrExclude,
+ bool bNotify);
+ bool ResetForm(bool bNotify);
void SetFormNotify(IPDF_FormNotify* pNotify);
FX_BOOL HasXFAForm() const;
@@ -128,8 +93,7 @@ class CPDF_InterForm {
friend class CPDF_FormControl;
friend class CPDF_FormField;
- void LoadField(CPDF_Dictionary* pFieldDict, int nLevel = 0);
- CPDF_Object* GetFieldAttr(CPDF_Dictionary* pFieldDict, const FX_CHAR* name);
+ void LoadField(CPDF_Dictionary* pFieldDict, int nLevel);
CPDF_FormField* AddTerminalField(CPDF_Dictionary* pFieldDict);
CPDF_FormControl* AddControl(CPDF_FormField* pField,
CPDF_Dictionary* pWidgetDict);
@@ -137,16 +101,12 @@ class CPDF_InterForm {
const CFX_WideString& parent_name,
FX_BOOL bNotify = FALSE,
int nLevel = 0);
- FX_BOOL ValidateFieldName(CFX_WideString& csNewFieldName,
- int iType,
- const CPDF_FormField* pExcludedField,
- const CPDF_FormControl* pExcludedControl);
- int CompareFieldName(const CFX_WideString& name1,
- const CFX_WideString& name2);
- int CompareFieldName(const CFX_ByteString& name1,
- const CFX_ByteString& name2);
-
- static FX_BOOL s_bUpdateAP;
+ bool ValidateFieldName(CFX_WideString& csNewFieldName,
+ int iType,
+ const CPDF_FormField* pExcludedField,
+ const CPDF_FormControl* pExcludedControl) const;
+
+ static bool s_bUpdateAP;
CPDF_Document* const m_pDocument;
CPDF_Dictionary* m_pFormDict;