Remove trailing whitespaces in core.
[pdfium.git] / core / include / fpdfdoc / fpdf_ap.h
index 4b6a371..3385e58 100644 (file)
@@ -1,92 +1,96 @@
-// Copyright 2014 PDFium Authors. All rights reserved.\r
-// Use of this source code is governed by a BSD-style license that can be\r
-// found in the LICENSE file.\r
\r
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
-\r
-#define _FPDF_AP_H_\r
-#include "../fxcrt/fx_basic.h"\r
-#include "../fpdfapi/fpdf_parser.h"\r
-#include "fpdf_vt.h"\r
-class IPVT_FontMap\r
-{\r
-public:\r
-\r
-    virtual CPDF_Font*                                         GetPDFFont(FX_INT32 nFontIndex) = 0;\r
-\r
-    virtual CFX_ByteString                                     GetPDFFontAlias(FX_INT32 nFontIndex) = 0;\r
-};\r
-struct CPVT_Dash {\r
-\r
-    CPVT_Dash(FX_INT32 dash, FX_INT32 gap, FX_INT32 phase) : nDash(dash), nGap(gap), nPhase(phase)\r
-    {}\r
-\r
-    FX_INT32                   nDash;\r
-\r
-    FX_INT32                   nGap;\r
-\r
-    FX_INT32                   nPhase;\r
-};\r
-#define CT_TRANSPARENT         0\r
-#define        CT_GRAY                         1\r
-#define        CT_RGB                          2\r
-#define        CT_CMYK                         3\r
-struct CPVT_Color {\r
-\r
-    CPVT_Color(FX_INT32 type = 0, FX_FLOAT color1 = 0.0f, FX_FLOAT color2 = 0.0f, FX_FLOAT color3 = 0.0f, FX_FLOAT color4 = 0.0f)\r
-        : nColorType(type), fColor1(color1), fColor2(color2), fColor3(color3), fColor4(color4)\r
-    {}\r
-\r
-    FX_INT32                   nColorType;\r
-    FX_FLOAT                   fColor1;\r
-    FX_FLOAT                   fColor2;\r
-    FX_FLOAT                   fColor3;\r
-    FX_FLOAT                   fColor4;\r
-};\r
-class CPVT_Provider : public IPDF_VariableText_Provider\r
-{\r
-public:\r
-\r
-    CPVT_Provider(IPVT_FontMap * pFontMap);\r
-\r
-    virtual ~CPVT_Provider();\r
-\r
-    FX_INT32                                           GetCharWidth(FX_INT32 nFontIndex, FX_WORD word, FX_INT32 nWordStyle);\r
-\r
-    FX_INT32                                           GetTypeAscent(FX_INT32 nFontIndex);\r
-\r
-    FX_INT32                                           GetTypeDescent(FX_INT32 nFontIndex);\r
-\r
-    FX_INT32                                           GetWordFontIndex(FX_WORD word, FX_INT32 charset, FX_INT32 nFontIndex);\r
-\r
-    FX_BOOL                                                    IsLatinWord(FX_WORD word);\r
-\r
-    FX_INT32                                           GetDefaultFontIndex();\r
-private:\r
-\r
-    IPVT_FontMap *     m_pFontMap;\r
-};\r
-#define PBS_SOLID                      0\r
-#define PBS_DASH                       1\r
-#define PBS_BEVELED                    2\r
-#define PBS_INSET                      3\r
-#define PBS_UNDERLINED         4\r
-class CPVT_GenerateAP\r
-{\r
-public:\r
-\r
-    static FX_BOOL                                                     GenerateTextFieldAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);\r
-\r
-    static FX_BOOL                                                     GenerateComboBoxAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);\r
-\r
-    static FX_BOOL                                                     GenerateListBoxAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);\r
-\r
-    static CFX_ByteString                                      GenerateEditAP(IPVT_FontMap * pFontMap, IPDF_VariableText_Iterator * pIterator,\r
-            const CPDF_Point & ptOffset, FX_BOOL bContinuous, FX_WORD SubWord = 0, const CPVT_WordRange * pVisible = NULL);\r
-\r
-    static CFX_ByteString                                      GenerateBorderAP(const CPDF_Rect & rect, FX_FLOAT fWidth,\r
-            const CPVT_Color & color, const CPVT_Color & crLeftTop, const CPVT_Color & crRightBottom,\r
-            FX_INT32 nStyle, const CPVT_Dash & dash);\r
-\r
-    static CFX_ByteString                                      GenerateColorAP(const CPVT_Color & color, const FX_BOOL & bFillOrStroke);\r
-};\r
+// Copyright 2014 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 CORE_INCLUDE_FPDFDOC_FPDF_AP_H_
+#define CORE_INCLUDE_FPDFDOC_FPDF_AP_H_
+
+#include "../fxcrt/fx_basic.h"
+#include "../fpdfapi/fpdf_parser.h"
+#include "fpdf_vt.h"
+
+class IPVT_FontMap
+{
+public:
+    virtual ~IPVT_FontMap() { }
+    virtual CPDF_Font*                                         GetPDFFont(int32_t nFontIndex) = 0;
+    virtual CFX_ByteString                                     GetPDFFontAlias(int32_t nFontIndex) = 0;
+};
+struct CPVT_Dash {
+
+    CPVT_Dash(int32_t dash, int32_t gap, int32_t phase) : nDash(dash), nGap(gap), nPhase(phase)
+    {}
+
+    int32_t                    nDash;
+
+    int32_t                    nGap;
+
+    int32_t                    nPhase;
+};
+#define CT_TRANSPARENT         0
+#define        CT_GRAY                         1
+#define        CT_RGB                          2
+#define        CT_CMYK                         3
+struct CPVT_Color {
+
+    CPVT_Color(int32_t type = 0, FX_FLOAT color1 = 0.0f, FX_FLOAT color2 = 0.0f, FX_FLOAT color3 = 0.0f, FX_FLOAT color4 = 0.0f)
+        : nColorType(type), fColor1(color1), fColor2(color2), fColor3(color3), fColor4(color4)
+    {}
+
+    int32_t                    nColorType;
+    FX_FLOAT                   fColor1;
+    FX_FLOAT                   fColor2;
+    FX_FLOAT                   fColor3;
+    FX_FLOAT                   fColor4;
+};
+class CPVT_Provider : public IPDF_VariableText_Provider
+{
+public:
+
+    CPVT_Provider(IPVT_FontMap * pFontMap);
+
+    virtual ~CPVT_Provider();
+
+    int32_t                                            GetCharWidth(int32_t nFontIndex, FX_WORD word, int32_t nWordStyle);
+
+    int32_t                                            GetTypeAscent(int32_t nFontIndex);
+
+    int32_t                                            GetTypeDescent(int32_t nFontIndex);
+
+    int32_t                                            GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex);
+
+    FX_BOOL                                                    IsLatinWord(FX_WORD word);
+
+    int32_t                                            GetDefaultFontIndex();
+private:
+
+    IPVT_FontMap *     m_pFontMap;
+};
+#define PBS_SOLID                      0
+#define PBS_DASH                       1
+#define PBS_BEVELED                    2
+#define PBS_INSET                      3
+#define PBS_UNDERLINED         4
+class CPVT_GenerateAP
+{
+public:
+
+    static FX_BOOL                                                     GenerateTextFieldAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);
+
+    static FX_BOOL                                                     GenerateComboBoxAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);
+
+    static FX_BOOL                                                     GenerateListBoxAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);
+
+    static CFX_ByteString                                      GenerateEditAP(IPVT_FontMap * pFontMap, IPDF_VariableText_Iterator * pIterator,
+            const CPDF_Point & ptOffset, FX_BOOL bContinuous, FX_WORD SubWord = 0, const CPVT_WordRange * pVisible = NULL);
+
+    static CFX_ByteString                                      GenerateBorderAP(const CPDF_Rect & rect, FX_FLOAT fWidth,
+            const CPVT_Color & color, const CPVT_Color & crLeftTop, const CPVT_Color & crRightBottom,
+            int32_t nStyle, const CPVT_Dash & dash);
+
+    static CFX_ByteString                                      GenerateColorAP(const CPVT_Color & color, const FX_BOOL & bFillOrStroke);
+};
+
+#endif  // CORE_INCLUDE_FPDFDOC_FPDF_AP_H_