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

Unified Diff: fpdfsdk/include/fsdk_baseform.h

Issue 1477583002: Inflict PDF_ENABLE_XFA ifdefs on XFA fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Remove fsdk_actionhandler.cpp Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/include/fsdk_baseannot.h ('k') | fpdfsdk/include/fsdk_define.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/include/fsdk_baseform.h
diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h
index e648558a3ae7af4b8137a7b3b6e09b7032a69d4b..0b6a04eb52a1933af25972df939b273f059105f9 100644
--- a/fpdfsdk/include/fsdk_baseform.h
+++ b/fpdfsdk/include/fsdk_baseform.h
@@ -31,6 +31,7 @@ class CPDF_Action;
class CPDF_FormField;
struct CPWL_Color;
+#ifdef PDF_ENABLE_XFA
typedef enum _PDFSDK_XFAAActionType {
PDFSDK_XFA_Click = 0,
PDFSDK_XFA_Full,
@@ -38,6 +39,7 @@ typedef enum _PDFSDK_XFAAActionType {
PDFSDK_XFA_PostOpen
} PDFSDK_XFAAActionType;
+#endif
typedef struct _PDFSDK_FieldAction {
_PDFSDK_FieldAction() {
bModifier = FALSE;
@@ -66,6 +68,7 @@ typedef struct _PDFSDK_FieldAction {
class CPDFSDK_Widget : public CPDFSDK_BAAnnot {
public:
+#ifdef PDF_ENABLE_XFA
IXFA_Widget* GetMixXFAWidget() const;
IXFA_Widget* GetGroupMixXFAWidget();
IXFA_WidgetHandler* GetXFAWidgetHandler() const;
@@ -88,6 +91,7 @@ class CPDFSDK_Widget : public CPDFSDK_BAAnnot {
CPDF_FormField* pFormField,
CPDF_FormControl* pFormControl);
+#endif
CPDFSDK_Widget(CPDF_Annot* pAnnot,
CPDFSDK_PageView* pPageView,
CPDFSDK_InterForm* pInterForm);
@@ -115,7 +119,11 @@ class CPDFSDK_Widget : public CPDFSDK_BAAnnot {
FX_FLOAT GetFontSize() const;
int GetSelectedIndex(int nIndex) const;
+#ifndef PDF_ENABLE_XFA
+ CFX_WideString GetValue() const;
+#else
CFX_WideString GetValue(FX_BOOL bDisplay = TRUE) const;
+#endif
CFX_WideString GetDefaultValue() const;
CFX_WideString GetOptionLabel(int nIndex) const;
int CountOptions() const;
@@ -129,7 +137,9 @@ class CPDFSDK_Widget : public CPDFSDK_BAAnnot {
*/
int GetAlignment() const;
int GetMaxLen() const;
+#ifdef PDF_ENABLE_XFA
CFX_WideString GetName() const;
+#endif
CFX_WideString GetAlternateName() const;
// Set Properties.
@@ -140,7 +150,9 @@ class CPDFSDK_Widget : public CPDFSDK_BAAnnot {
void ClearSelection(FX_BOOL bNotify);
void SetTopVisibleIndex(int index);
+#ifdef PDF_ENABLE_XFA
void ResetAppearance(FX_BOOL bValueChanged);
+#endif
void ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged);
void ResetFieldAppearance(FX_BOOL bValueChanged);
void UpdateField();
@@ -197,15 +209,21 @@ class CPDFSDK_Widget : public CPDFSDK_BAAnnot {
FX_BOOL HitTest(FX_FLOAT pageX, FX_FLOAT pageY);
+#ifndef PDF_ENABLE_XFA
+ private:
+#endif
CPDFSDK_InterForm* m_pInterForm;
FX_BOOL m_bAppModified;
int32_t m_nAppAge;
int32_t m_nValueAge;
+#ifdef PDF_ENABLE_XFA
mutable IXFA_Widget* m_hMixXFAWidget;
mutable IXFA_WidgetHandler* m_pWidgetHandler;
+#endif
};
+#ifdef PDF_ENABLE_XFA
class CPDFSDK_XFAWidget : public CPDFSDK_Annot {
public:
CPDFSDK_XFAWidget(IXFA_Widget* pAnnot,
@@ -230,6 +248,7 @@ class CPDFSDK_XFAWidget : public CPDFSDK_Annot {
CFX_MapPtrTemplate<IXFA_Widget*, CPDFSDK_XFAWidget*>
#define CPDFSDK_FieldSynchronizeMap CFX_MapPtrTemplate<CPDF_FormField*, int>
+#endif
class CPDFSDK_InterForm : public CPDF_FormNotify {
public:
explicit CPDFSDK_InterForm(CPDFSDK_Document* pDocument);
@@ -250,19 +269,23 @@ class CPDFSDK_InterForm : public CPDF_FormNotify {
void AddMap(CPDF_FormControl* pControl, CPDFSDK_Widget* pWidget);
void RemoveMap(CPDF_FormControl* pControl);
+#ifdef PDF_ENABLE_XFA
void AddXFAMap(IXFA_Widget* hWidget, CPDFSDK_XFAWidget* pWidget);
void RemoveXFAMap(IXFA_Widget* hWidget);
CPDFSDK_XFAWidget* GetXFAWidget(IXFA_Widget* hWidget);
+#endif
void EnableCalculate(FX_BOOL bEnabled);
FX_BOOL IsCalculateEnabled() const;
+#ifdef PDF_ENABLE_XFA
void XfaEnableCalculate(FX_BOOL bEnabled);
FX_BOOL IsXfaCalculateEnabled() const;
FX_BOOL IsXfaValidationsEnabled();
void XfaSetValidationsEnabled(FX_BOOL bEnabled);
+#endif
#ifdef _WIN32
CPDF_Stream* LoadImageFromFile(const CFX_WideString& sFile);
#endif
@@ -300,8 +323,10 @@ class CPDFSDK_InterForm : public CPDF_FormNotify {
CFX_ByteTextBuf& textBuf);
CFX_WideString GetTemporaryFileName(const CFX_WideString& sFileExt);
+#ifdef PDF_ENABLE_XFA
void SynchronizeField(CPDF_FormField* pFormField, FX_BOOL bSynchronizeElse);
+#endif
private:
// CPDF_FormNotify
int BeforeValueChange(const CPDF_FormField* pField,
@@ -328,11 +353,15 @@ class CPDFSDK_InterForm : public CPDF_FormNotify {
CPDFSDK_Document* m_pDocument;
CPDF_InterForm* m_pInterForm;
CPDFSDK_WidgetMap m_Map;
+#ifdef PDF_ENABLE_XFA
CPDFSDK_XFAWidgetMap m_XFAMap;
CPDFSDK_FieldSynchronizeMap m_FieldSynchronizeMap;
+#endif
FX_BOOL m_bCalculate;
+#ifdef PDF_ENABLE_XFA
FX_BOOL m_bXfaCalculate;
FX_BOOL m_bXfaValidationsEnabled;
+#endif
FX_BOOL m_bBusy;
public:
@@ -344,7 +373,11 @@ class CPDFSDK_InterForm : public CPDF_FormNotify {
FX_COLORREF GetHighlightColor(int nFieldType);
private:
+#ifndef PDF_ENABLE_XFA
+ static const int kNumFieldTypes = 6;
+#else
static const int kNumFieldTypes = 7;
+#endif
FX_COLORREF m_aHighlightColor[kNumFieldTypes];
uint8_t m_iHighlightAlpha;
FX_BOOL m_bNeedHightlight[kNumFieldTypes];
« no previous file with comments | « fpdfsdk/include/fsdk_baseannot.h ('k') | fpdfsdk/include/fsdk_define.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698