Clean up CPDF_AnnotList.
[pdfium.git] / fpdfsdk / include / formfiller / FFL_CBA_Fontmap.h
index 7624596..3e13318 100644 (file)
@@ -1,51 +1,54 @@
-// 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
-#ifndef _RAO_FONTMAP_H_\r
-#define _RAO_FONTMAP_H_\r
-\r
-#if _MSC_VER > 1000\r
-#pragma once\r
-#endif // _MSC_VER > 1000\r
-\r
-class CPDFSDK_Annot;\r
-\r
-class CBA_FontMap : public CPWL_FontMap\r
-{\r
-public:\r
-       CBA_FontMap(CPDFSDK_Annot* pAnnot, IFX_SystemHandler* pSystemHandler);\r
-       CBA_FontMap(CPDF_Document* pDocument, CPDF_Dictionary* pAnnotDict, IFX_SystemHandler* pSystemHandler);\r
-\r
-       virtual ~CBA_FontMap();\r
-\r
-       virtual void                            Initial(FX_LPCSTR fontname = NULL);\r
-\r
-public:\r
-       void                                            SetDefaultFont(CPDF_Font * pFont, const CFX_ByteString & sFontName);\r
-\r
-       void                                            Reset();\r
-       void                                            SetAPType(const CFX_ByteString& sAPType);\r
-\r
-protected:\r
-       virtual CPDF_Font*                      FindFontSameCharset(CFX_ByteString& sFontAlias, FX_INT32 nCharset);\r
-       virtual void                            AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias);\r
-       virtual CPDF_Document*          GetDocument();\r
-private:\r
-       CPDF_Font*                                      FindResFontSameCharset(CPDF_Dictionary* pResDict, CFX_ByteString& sFontAlias,\r
-                                                                       FX_INT32 nCharset);\r
-       CPDF_Font*                                      GetAnnotDefaultFont(CFX_ByteString &csNameTag);\r
-       void                                            AddFontToAnnotDict(CPDF_Font* pFont, const CFX_ByteString& sAlias);\r
-\r
-private:\r
-       CPDF_Document*                          m_pDocument;\r
-       CPDF_Dictionary*                        m_pAnnotDict;\r
-       CPDF_Font*                                      m_pDefaultFont;\r
-       CFX_ByteString                          m_sDefaultFontName;\r
-       \r
-       CFX_ByteString                          m_sAPType;\r
-};\r
-\r
-#endif // _RAO_FONTMAP_H_\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 FPDFSDK_INCLUDE_FORMFILLER_FFL_CBA_FONTMAP_H_
+#define FPDFSDK_INCLUDE_FORMFILLER_FFL_CBA_FONTMAP_H_
+
+#include "../pdfwindow/PWL_FontMap.h"
+
+class CPDF_Dictionary;
+class CPDFSDK_Annot;
+
+class CBA_FontMap : public CPWL_FontMap {
+ public:
+  CBA_FontMap(CPDFSDK_Annot* pAnnot, IFX_SystemHandler* pSystemHandler);
+  CBA_FontMap(CPDF_Document* pDocument,
+              CPDF_Dictionary* pAnnotDict,
+              IFX_SystemHandler* pSystemHandler);
+
+  ~CBA_FontMap() override;
+
+  virtual void Initial(const FX_CHAR* fontname = NULL);
+
+ public:
+  void SetDefaultFont(CPDF_Font* pFont, const CFX_ByteString& sFontName);
+
+  void Reset();
+  void SetAPType(const CFX_ByteString& sAPType);
+
+ protected:
+  virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias,
+                                         int32_t nCharset);
+  virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias);
+  virtual CPDF_Document* GetDocument();
+
+ private:
+  CPDF_Font* FindResFontSameCharset(CPDF_Dictionary* pResDict,
+                                    CFX_ByteString& sFontAlias,
+                                    int32_t nCharset);
+  CPDF_Font* GetAnnotDefaultFont(CFX_ByteString& csNameTag);
+  void AddFontToAnnotDict(CPDF_Font* pFont, const CFX_ByteString& sAlias);
+
+ private:
+  CPDF_Document* m_pDocument;
+  CPDF_Dictionary* m_pAnnotDict;
+  CPDF_Font* m_pDefaultFont;
+  CFX_ByteString m_sDefaultFontName;
+
+  CFX_ByteString m_sAPType;
+};
+
+#endif  // FPDFSDK_INCLUDE_FORMFILLER_FFL_CBA_FONTMAP_H_