Clean up CPDF_AnnotList.
[pdfium.git] / fpdfsdk / include / fsdk_baseform.h
index b685ae6..f402aae 100644 (file)
@@ -43,39 +43,39 @@ typedef struct _PDFSDK_FieldAction {
     bRC = TRUE;
   }
 
-  FX_BOOL bModifier;  // in
-  FX_BOOL bShift;  // in
-  int nCommitKey;  // in
-  CFX_WideString sChange;  // in[out]
+  FX_BOOL bModifier;         // in
+  FX_BOOL bShift;            // in
+  int nCommitKey;            // in
+  CFX_WideString sChange;    // in[out]
   CFX_WideString sChangeEx;  // in
-  FX_BOOL bKeyDown;  // in
-  int nSelEnd;  // in[out]
-  int nSelStart;  // in[out]
-  CFX_WideString sValue;  // in[out]
-  FX_BOOL bWillCommit;  // in
-  FX_BOOL bFieldFull;  // in
-  FX_BOOL bRC;  // in[out]
+  FX_BOOL bKeyDown;          // in
+  int nSelEnd;               // in[out]
+  int nSelStart;             // in[out]
+  CFX_WideString sValue;     // in[out]
+  FX_BOOL bWillCommit;       // in
+  FX_BOOL bFieldFull;        // in
+  FX_BOOL bRC;               // in[out]
 } PDFSDK_FieldAction;
+
 class CPDFSDK_Widget : public CPDFSDK_Annot {
  public:
   CPDFSDK_Widget(CPDF_Annot* pAnnot,
                  CPDFSDK_PageView* pPageView,
                  CPDFSDK_InterForm* pInterForm);
-  virtual ~CPDFSDK_Widget();
+  ~CPDFSDK_Widget() override;
 
-  virtual CFX_ByteString GetSubType() const;
+  // CPDFSDK_Annot
+  CFX_ByteString GetSubType() const override;
+  CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT) override;
 
-  virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT);
+  int GetLayoutOrder() const override { return 2; }
 
   int GetFieldType() const;
-  // define layout order to 2.
-  virtual int GetLayoutOrder() const { return 2; }
-  /*
-  FIELDFLAG_READONLY
-  FIELDFLAG_REQUIRED
-  FIELDFLAG_NOEXPORT
-  */
 
+  // Possible values from PDF 32000-1:2008, table 221.
+  // FIELDFLAG_READONLY
+  // FIELDFLAG_REQUIRED
+  // FIELDFLAG_NOEXPORT
   int GetFieldFlags() const;
   int GetRotate() const;
 
@@ -123,7 +123,7 @@ class CPDFSDK_Widget : public CPDFSDK_Annot {
   CPDF_FormField* GetFormField() const;
   CPDF_FormControl* GetFormControl() const;
   static CPDF_FormControl* GetFormControl(CPDF_InterForm* pInterForm,
-                                          CPDF_Dictionary* pAnnotDict);
+                                          const CPDF_Dictionary* pAnnotDict);
 
   void DrawShadow(CFX_RenderDevice* pDevice, CPDFSDK_PageView* pPageView);
 
@@ -231,25 +231,25 @@ class CPDFSDK_InterForm : public CPDF_FormNotify {
   CFX_WideString GetTemporaryFileName(const CFX_WideString& sFileExt);
 
  private:
-  virtual int BeforeValueChange(const CPDF_FormField* pField,
-                                CFX_WideString& csValue);
-  virtual int AfterValueChange(const CPDF_FormField* pField);
-  virtual int BeforeSelectionChange(const CPDF_FormField* pField,
-                                    CFX_WideString& csValue);
-  virtual int AfterSelectionChange(const CPDF_FormField* pField);
-  virtual int AfterCheckedStatusChange(const CPDF_FormField* pField,
-                                       const CFX_ByteArray& statusArray);
-  virtual int BeforeFormReset(const CPDF_InterForm* pForm);
-  virtual int AfterFormReset(const CPDF_InterForm* pForm);
-  virtual int BeforeFormImportData(const CPDF_InterForm* pForm);
-  virtual int AfterFormImportData(const CPDF_InterForm* pForm);
+  // CPDF_FormNotify
+  int BeforeValueChange(const CPDF_FormField* pField,
+                        CFX_WideString& csValue) override;
+  int AfterValueChange(const CPDF_FormField* pField) override;
+  int BeforeSelectionChange(const CPDF_FormField* pField,
+                            CFX_WideString& csValue) override;
+  int AfterSelectionChange(const CPDF_FormField* pField) override;
+  int AfterCheckedStatusChange(const CPDF_FormField* pField,
+                               const CFX_ByteArray& statusArray) override;
+  int BeforeFormReset(const CPDF_InterForm* pForm) override;
+  int AfterFormReset(const CPDF_InterForm* pForm) override;
+  int BeforeFormImportData(const CPDF_InterForm* pForm) override;
+  int AfterFormImportData(const CPDF_InterForm* pForm) override;
 
   FX_BOOL FDFToURLEncodedData(CFX_WideString csFDFFile,
                               CFX_WideString csTxtFile);
   FX_BOOL FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize);
   int GetPageIndexByAnnotDict(CPDF_Document* pDocument,
                               CPDF_Dictionary* pAnnotDict) const;
-  void DoFDFBuffer(CFX_ByteString sBuffer);
 
   using CPDFSDK_WidgetMap = std::map<CPDF_FormControl*, CPDFSDK_Widget*>;