summaryrefslogtreecommitdiff
path: root/fpdfsdk/include
diff options
context:
space:
mode:
authorjaepark <jaepark@google.com>2016-08-11 13:10:39 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-11 13:10:39 -0700
commit2736276deff3abef9d6b226eb9f585abe1384591 (patch)
tree0edcff20dd023d8dceee6a83e3d4d14708af610f /fpdfsdk/include
parent445a94b089c155f79cc8602c724418898dc2a861 (diff)
downloadpdfium-2736276deff3abef9d6b226eb9f585abe1384591.tar.xz
Move CPDFSDK_Annot, CPDFSDK_BAAnnot and CPDFSDK_DateTime to their own files.
Review-Url: https://codereview.chromium.org/2236743002
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r--fpdfsdk/include/cpdfsdk_annot.h68
-rw-r--r--fpdfsdk/include/cpdfsdk_baannot.h (renamed from fpdfsdk/include/fsdk_baseannot.h)107
-rw-r--r--fpdfsdk/include/cpdfsdk_datetime.h52
-rw-r--r--fpdfsdk/include/fsdk_baseform.h3
-rw-r--r--fpdfsdk/include/fsdk_mgr.h2
5 files changed, 133 insertions, 99 deletions
diff --git a/fpdfsdk/include/cpdfsdk_annot.h b/fpdfsdk/include/cpdfsdk_annot.h
new file mode 100644
index 0000000000..5f5cce4728
--- /dev/null
+++ b/fpdfsdk/include/cpdfsdk_annot.h
@@ -0,0 +1,68 @@
+// Copyright 2016 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef FPDFSDK_INCLUDE_CPDFSDK_ANNOT_H_
+#define FPDFSDK_INCLUDE_CPDFSDK_ANNOT_H_
+
+#include "core/fpdfdoc/include/cpdf_aaction.h"
+#include "core/fpdfdoc/include/cpdf_annot.h"
+#include "core/fpdfdoc/include/cpdf_defaultappearance.h"
+#include "core/fxcrt/include/fx_basic.h"
+#include "fpdfsdk/cfx_systemhandler.h"
+#include "fpdfsdk/include/fsdk_common.h"
+#include "fpdfsdk/include/fsdk_define.h"
+
+class CFX_Matrix;
+class CFX_RenderDevice;
+class CPDF_Page;
+class CPDF_RenderOptions;
+class CPDFSDK_PageView;
+
+class CPDFSDK_Annot {
+ public:
+ explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView);
+ virtual ~CPDFSDK_Annot();
+
+#ifdef PDF_ENABLE_XFA
+ virtual FX_BOOL IsXFAField();
+ virtual CXFA_FFWidget* GetXFAWidget() const;
+#endif // PDF_ENABLE_XFA
+
+ virtual FX_FLOAT GetMinWidth() const;
+ virtual FX_FLOAT GetMinHeight() const;
+ virtual int GetLayoutOrder() const;
+ virtual CPDF_Annot* GetPDFAnnot() const;
+ virtual CFX_ByteString GetType() const;
+ virtual CFX_ByteString GetSubType() const;
+ virtual CFX_FloatRect GetRect() const;
+
+ virtual void SetRect(const CFX_FloatRect& rect);
+ virtual void Annot_OnDraw(CFX_RenderDevice* pDevice,
+ CFX_Matrix* pUser2Device,
+ CPDF_RenderOptions* pOptions);
+
+ UnderlyingPageType* GetUnderlyingPage();
+ CPDF_Page* GetPDFPage();
+#ifdef PDF_ENABLE_XFA
+ CPDFXFA_Page* GetPDFXFAPage();
+#endif // PDF_ENABLE_XFA
+
+ void SetPage(CPDFSDK_PageView* pPageView);
+ CPDFSDK_PageView* GetPageView() const { return m_pPageView; }
+
+ int GetTabOrder();
+ void SetTabOrder(int iTabOrder);
+
+ FX_BOOL IsSelected();
+ void SetSelected(FX_BOOL bSelected);
+
+ protected:
+ CPDFSDK_PageView* m_pPageView;
+ FX_BOOL m_bSelected;
+ int m_nTabOrder;
+};
+
+#endif // FPDFSDK_INCLUDE_CPDFSDK_ANNOT_H_
diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/cpdfsdk_baannot.h
index 83bb02de1c..abe23fe1b9 100644
--- a/fpdfsdk/include/fsdk_baseannot.h
+++ b/fpdfsdk/include/cpdfsdk_baannot.h
@@ -4,110 +4,23 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_
-#define FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_
-
-#if _FX_OS_ == _FX_ANDROID_
-#include "time.h"
-#else
-#include <ctime>
-#endif
+#ifndef FPDFSDK_INCLUDE_CPDFSDK_BAANNOT_H_
+#define FPDFSDK_INCLUDE_CPDFSDK_BAANNOT_H_
#include "core/fpdfdoc/include/cpdf_aaction.h"
+#include "core/fpdfdoc/include/cpdf_action.h"
#include "core/fpdfdoc/include/cpdf_annot.h"
#include "core/fpdfdoc/include/cpdf_defaultappearance.h"
-#include "core/fxcrt/include/fx_basic.h"
+#include "core/fxcrt/include/fx_coordinates.h"
+#include "core/fxcrt/include/fx_string.h"
#include "fpdfsdk/cfx_systemhandler.h"
-#include "fpdfsdk/include/fsdk_common.h"
-#include "fpdfsdk/include/fsdk_define.h"
+#include "fpdfsdk/include/cpdfsdk_annot.h"
-class CPDFSDK_PageView;
-class CPDF_Page;
class CFX_Matrix;
-class CPDF_RenderOptions;
class CFX_RenderDevice;
-
-class CPDFSDK_DateTime {
- public:
- CPDFSDK_DateTime();
- explicit CPDFSDK_DateTime(const CFX_ByteString& dtStr);
- explicit CPDFSDK_DateTime(const FX_SYSTEMTIME& st);
- CPDFSDK_DateTime(const CPDFSDK_DateTime& datetime);
-
- CPDFSDK_DateTime& operator=(const CPDFSDK_DateTime& datetime);
- CPDFSDK_DateTime& operator=(const FX_SYSTEMTIME& st);
- bool operator==(const CPDFSDK_DateTime& datetime) const;
- bool operator!=(const CPDFSDK_DateTime& datetime) const;
-
- CPDFSDK_DateTime& FromPDFDateTimeString(const CFX_ByteString& dtStr);
- CFX_ByteString ToCommonDateTimeString();
- CFX_ByteString ToPDFDateTimeString();
- void ToSystemTime(FX_SYSTEMTIME& st);
- time_t ToTime_t() const;
- CPDFSDK_DateTime ToGMT() const;
- CPDFSDK_DateTime& AddDays(short days);
- CPDFSDK_DateTime& AddSeconds(int seconds);
-
- void ResetDateTime();
-
- struct FX_DATETIME {
- int16_t year;
- uint8_t month;
- uint8_t day;
- uint8_t hour;
- uint8_t minute;
- uint8_t second;
- int8_t tzHour;
- uint8_t tzMinute;
- } dt;
-};
-
-class CPDFSDK_Annot {
- public:
- explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView);
- virtual ~CPDFSDK_Annot();
-
-#ifdef PDF_ENABLE_XFA
- virtual FX_BOOL IsXFAField();
- virtual CXFA_FFWidget* GetXFAWidget() const;
-#endif // PDF_ENABLE_XFA
-
- virtual FX_FLOAT GetMinWidth() const;
- virtual FX_FLOAT GetMinHeight() const;
- // define layout order to 5.
- virtual int GetLayoutOrder() const;
- virtual CPDF_Annot* GetPDFAnnot() const;
- virtual CFX_ByteString GetType() const;
- virtual CFX_ByteString GetSubType() const;
- virtual CFX_FloatRect GetRect() const;
-
- virtual void SetRect(const CFX_FloatRect& rect);
- virtual void Annot_OnDraw(CFX_RenderDevice* pDevice,
- CFX_Matrix* pUser2Device,
- CPDF_RenderOptions* pOptions);
-
- UnderlyingPageType* GetUnderlyingPage();
- CPDF_Page* GetPDFPage();
-#ifdef PDF_ENABLE_XFA
- CPDFXFA_Page* GetPDFXFAPage();
-#endif // PDF_ENABLE_XFA
-
- void SetPage(CPDFSDK_PageView* pPageView);
- CPDFSDK_PageView* GetPageView() const { return m_pPageView; }
-
- // Tab Order
- int GetTabOrder();
- void SetTabOrder(int iTabOrder);
-
- // Selection
- FX_BOOL IsSelected();
- void SetSelected(FX_BOOL bSelected);
-
- protected:
- CPDFSDK_PageView* m_pPageView;
- FX_BOOL m_bSelected;
- int m_nTabOrder;
-};
+class CPDF_Dictionary;
+class CPDF_RenderOptions;
+class CPDFSDK_PageView;
class CPDFSDK_BAAnnot : public CPDFSDK_Annot {
public:
@@ -188,4 +101,4 @@ class CPDFSDK_BAAnnot : public CPDFSDK_Annot {
CPDF_Annot* m_pAnnot;
};
-#endif // FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_
+#endif // FPDFSDK_INCLUDE_CPDFSDK_BAANNOT_H_
diff --git a/fpdfsdk/include/cpdfsdk_datetime.h b/fpdfsdk/include/cpdfsdk_datetime.h
new file mode 100644
index 0000000000..785d96adc4
--- /dev/null
+++ b/fpdfsdk/include/cpdfsdk_datetime.h
@@ -0,0 +1,52 @@
+// Copyright 2016 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef FPDFSDK_INCLUDE_CPDFSDK_DATETIME_H_
+#define FPDFSDK_INCLUDE_CPDFSDK_DATETIME_H_
+
+#if _FX_OS_ == _FX_ANDROID_
+#include "time.h"
+#else
+#include <ctime>
+#endif
+
+#include "fpdfsdk/cfx_systemhandler.h"
+
+class CPDFSDK_DateTime {
+ public:
+ CPDFSDK_DateTime();
+ explicit CPDFSDK_DateTime(const CFX_ByteString& dtStr);
+ explicit CPDFSDK_DateTime(const FX_SYSTEMTIME& st);
+ CPDFSDK_DateTime(const CPDFSDK_DateTime& datetime);
+
+ bool operator==(const CPDFSDK_DateTime& datetime) const;
+ bool operator!=(const CPDFSDK_DateTime& datetime) const;
+
+ CPDFSDK_DateTime& FromPDFDateTimeString(const CFX_ByteString& dtStr);
+ CFX_ByteString ToCommonDateTimeString();
+ CFX_ByteString ToPDFDateTimeString();
+ void ToSystemTime(FX_SYSTEMTIME& st);
+ time_t ToTime_t() const;
+ CPDFSDK_DateTime ToGMT() const;
+ CPDFSDK_DateTime& AddDays(short days);
+ CPDFSDK_DateTime& AddSeconds(int seconds);
+
+ void ResetDateTime();
+
+ private:
+ struct FX_DATETIME {
+ int16_t year;
+ uint8_t month;
+ uint8_t day;
+ uint8_t hour;
+ uint8_t minute;
+ uint8_t second;
+ int8_t tzHour;
+ uint8_t tzMinute;
+ } dt;
+};
+
+#endif // FPDFSDK_INCLUDE_CPDFSDK_DATETIME_H_
diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h
index d386c7fa2d..c5f45e75ae 100644
--- a/fpdfsdk/include/fsdk_baseform.h
+++ b/fpdfsdk/include/fsdk_baseform.h
@@ -14,7 +14,8 @@
#include "core/fpdfdoc/include/ipdf_formnotify.h"
#include "core/fxcrt/include/fx_basic.h"
#include "core/fxge/include/fx_dib.h"
-#include "fpdfsdk/include/fsdk_baseannot.h"
+#include "fpdfsdk/include/cpdfsdk_annot.h"
+#include "fpdfsdk/include/cpdfsdk_baannot.h"
#if _FX_OS_ == _FX_ANDROID_
#include "time.h"
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index 1c180db57f..1389d6cbbf 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -15,9 +15,9 @@
#include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
#include "core/fpdfdoc/include/cpdf_occontext.h"
#include "fpdfsdk/cfx_systemhandler.h"
+#include "fpdfsdk/include/cpdfsdk_annot.h"
#include "fpdfsdk/include/fsdk_actionhandler.h"
#include "fpdfsdk/include/fsdk_annothandler.h"
-#include "fpdfsdk/include/fsdk_baseannot.h"
#include "fpdfsdk/include/fsdk_baseform.h"
#include "fpdfsdk/include/fsdk_common.h"
#include "fpdfsdk/include/fsdk_define.h"