Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: fpdfsdk/include/fsdk_baseform.h

Issue 1660633003: Fix prototypes for CPDF_FormNotify. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/include/fpdfdoc/fpdf_doc.h ('k') | fpdfsdk/src/fsdk_baseform.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ 7 #ifndef FPDFSDK_INCLUDE_FSDK_BASEFORM_H_
8 #define FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ 8 #define FPDFSDK_INCLUDE_FSDK_BASEFORM_H_
9 9
10 #if _FX_OS_ == _FX_ANDROID_ 10 #if _FX_OS_ == _FX_ANDROID_
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 std::vector<CPDFSDK_Widget*>* widgets) const; 190 std::vector<CPDFSDK_Widget*>* widgets) const;
191 void GetWidgets(CPDF_FormField* pField, 191 void GetWidgets(CPDF_FormField* pField,
192 std::vector<CPDFSDK_Widget*>* widgets) const; 192 std::vector<CPDFSDK_Widget*>* widgets) const;
193 193
194 void AddMap(CPDF_FormControl* pControl, CPDFSDK_Widget* pWidget); 194 void AddMap(CPDF_FormControl* pControl, CPDFSDK_Widget* pWidget);
195 void RemoveMap(CPDF_FormControl* pControl); 195 void RemoveMap(CPDF_FormControl* pControl);
196 196
197 void EnableCalculate(FX_BOOL bEnabled); 197 void EnableCalculate(FX_BOOL bEnabled);
198 FX_BOOL IsCalculateEnabled() const; 198 FX_BOOL IsCalculateEnabled() const;
199 199
200 void OnKeyStrokeCommit(CPDF_FormField* pFormField, 200 FX_BOOL OnKeyStrokeCommit(CPDF_FormField* pFormField,
201 CFX_WideString& csValue, 201 const CFX_WideString& csValue);
202 FX_BOOL& bRC); 202 FX_BOOL OnValidate(CPDF_FormField* pFormField, const CFX_WideString& csValue);
203 void OnValidate(CPDF_FormField* pFormField,
204 CFX_WideString& csValue,
205 FX_BOOL& bRC);
206 void OnCalculate(CPDF_FormField* pFormField = NULL); 203 void OnCalculate(CPDF_FormField* pFormField = NULL);
207 CFX_WideString OnFormat(CPDF_FormField* pFormField, FX_BOOL& bFormated); 204 CFX_WideString OnFormat(CPDF_FormField* pFormField, FX_BOOL& bFormated);
208 205
209 void ResetFieldAppearance(CPDF_FormField* pFormField, 206 void ResetFieldAppearance(CPDF_FormField* pFormField,
210 const FX_WCHAR* sValue, 207 const FX_WCHAR* sValue,
211 FX_BOOL bValueChanged); 208 FX_BOOL bValueChanged);
212 void UpdateField(CPDF_FormField* pFormField); 209 void UpdateField(CPDF_FormField* pFormField);
213 210
214 FX_BOOL DoAction_Hide(const CPDF_Action& action); 211 FX_BOOL DoAction_Hide(const CPDF_Action& action);
215 FX_BOOL DoAction_SubmitForm(const CPDF_Action& action); 212 FX_BOOL DoAction_SubmitForm(const CPDF_Action& action);
216 FX_BOOL DoAction_ResetForm(const CPDF_Action& action); 213 FX_BOOL DoAction_ResetForm(const CPDF_Action& action);
217 FX_BOOL DoAction_ImportData(const CPDF_Action& action); 214 FX_BOOL DoAction_ImportData(const CPDF_Action& action);
218 215
219 std::vector<CPDF_FormField*> GetFieldFromObjects( 216 std::vector<CPDF_FormField*> GetFieldFromObjects(
220 const std::vector<CPDF_Object*>& objects) const; 217 const std::vector<CPDF_Object*>& objects) const;
221 FX_BOOL IsValidField(CPDF_Dictionary* pFieldDict); 218 FX_BOOL IsValidField(CPDF_Dictionary* pFieldDict);
222 FX_BOOL SubmitFields(const CFX_WideString& csDestination, 219 FX_BOOL SubmitFields(const CFX_WideString& csDestination,
223 const std::vector<CPDF_FormField*>& fields, 220 const std::vector<CPDF_FormField*>& fields,
224 FX_BOOL bIncludeOrExclude, 221 FX_BOOL bIncludeOrExclude,
225 FX_BOOL bUrlEncoded); 222 FX_BOOL bUrlEncoded);
226 FX_BOOL SubmitForm(const CFX_WideString& sDestination, FX_BOOL bUrlEncoded); 223 FX_BOOL SubmitForm(const CFX_WideString& sDestination, FX_BOOL bUrlEncoded);
227 FX_BOOL ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf); 224 FX_BOOL ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf);
228 FX_BOOL ExportFieldsToFDFTextBuf(const std::vector<CPDF_FormField*>& fields, 225 FX_BOOL ExportFieldsToFDFTextBuf(const std::vector<CPDF_FormField*>& fields,
229 FX_BOOL bIncludeOrExclude, 226 FX_BOOL bIncludeOrExclude,
230 CFX_ByteTextBuf& textBuf); 227 CFX_ByteTextBuf& textBuf);
231 CFX_WideString GetTemporaryFileName(const CFX_WideString& sFileExt); 228 CFX_WideString GetTemporaryFileName(const CFX_WideString& sFileExt);
232 229
233 private: 230 private:
234 // CPDF_FormNotify 231 // CPDF_FormNotify:
235 int BeforeValueChange(const CPDF_FormField* pField, 232 int BeforeValueChange(CPDF_FormField* pField,
236 CFX_WideString& csValue) override; 233 const CFX_WideString& csValue) override;
237 int AfterValueChange(const CPDF_FormField* pField) override; 234 void AfterValueChange(CPDF_FormField* pField) override;
238 int BeforeSelectionChange(const CPDF_FormField* pField, 235 int BeforeSelectionChange(CPDF_FormField* pField,
239 CFX_WideString& csValue) override; 236 const CFX_WideString& csValue) override;
240 int AfterSelectionChange(const CPDF_FormField* pField) override; 237 void AfterSelectionChange(CPDF_FormField* pField) override;
241 void AfterCheckedStatusChange(CPDF_FormField* pField) override; 238 void AfterCheckedStatusChange(CPDF_FormField* pField) override;
242 int BeforeFormReset(const CPDF_InterForm* pForm) override; 239 int BeforeFormReset(CPDF_InterForm* pForm) override;
243 int AfterFormReset(const CPDF_InterForm* pForm) override; 240 void AfterFormReset(CPDF_InterForm* pForm) override;
244 int BeforeFormImportData(const CPDF_InterForm* pForm) override; 241 int BeforeFormImportData(CPDF_InterForm* pForm) override;
245 int AfterFormImportData(const CPDF_InterForm* pForm) override; 242 void AfterFormImportData(CPDF_InterForm* pForm) override;
246 243
247 FX_BOOL FDFToURLEncodedData(CFX_WideString csFDFFile, 244 FX_BOOL FDFToURLEncodedData(CFX_WideString csFDFFile,
248 CFX_WideString csTxtFile); 245 CFX_WideString csTxtFile);
249 FX_BOOL FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize); 246 FX_BOOL FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize);
250 int GetPageIndexByAnnotDict(CPDF_Document* pDocument, 247 int GetPageIndexByAnnotDict(CPDF_Document* pDocument,
251 CPDF_Dictionary* pAnnotDict) const; 248 CPDF_Dictionary* pAnnotDict) const;
252 249
253 using CPDFSDK_WidgetMap = std::map<CPDF_FormControl*, CPDFSDK_Widget*>; 250 using CPDFSDK_WidgetMap = std::map<CPDF_FormControl*, CPDFSDK_Widget*>;
254 251
255 CPDFSDK_Document* m_pDocument; 252 CPDFSDK_Document* m_pDocument;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 const CPDFSDK_Annot* p2); 295 const CPDFSDK_Annot* p2);
299 296
300 TabOrder m_eTabOrder; 297 TabOrder m_eTabOrder;
301 CPDFSDK_PageView* m_pPageView; 298 CPDFSDK_PageView* m_pPageView;
302 CFX_ByteString m_sType; 299 CFX_ByteString m_sType;
303 CFX_ByteString m_sSubType; 300 CFX_ByteString m_sSubType;
304 std::vector<CPDFSDK_Annot*> m_Annots; 301 std::vector<CPDFSDK_Annot*> m_Annots;
305 }; 302 };
306 303
307 #endif // FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ 304 #endif // FPDFSDK_INCLUDE_FSDK_BASEFORM_H_
OLDNEW
« no previous file with comments | « core/include/fpdfdoc/fpdf_doc.h ('k') | fpdfsdk/src/fsdk_baseform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698