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

Side by Side Diff: xfa/fde/cfde_txtedttextset.h

Issue 2609423003: Properly ref-count CFGAS_GEFont with CFX_RetainPtr. (Closed)
Patch Set: comments Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 XFA_FDE_CFDE_TXTEDTTEXTSET_H_ 7 #ifndef XFA_FDE_CFDE_TXTEDTTEXTSET_H_
8 #define XFA_FDE_CFDE_TXTEDTTEXTSET_H_ 8 #define XFA_FDE_CFDE_TXTEDTTEXTSET_H_
9 9
10 #include "xfa/fde/fde_visualset.h" 10 #include "xfa/fde/fde_visualset.h"
11 11
12 class CFDE_TxtEdtPage; 12 class CFDE_TxtEdtPage;
13 13
14 class CFDE_TxtEdtTextSet : public IFDE_TextSet { 14 class CFDE_TxtEdtTextSet : public IFDE_TextSet {
15 public: 15 public:
16 explicit CFDE_TxtEdtTextSet(CFDE_TxtEdtPage* pPage); 16 explicit CFDE_TxtEdtTextSet(CFDE_TxtEdtPage* pPage);
17 ~CFDE_TxtEdtTextSet() override; 17 ~CFDE_TxtEdtTextSet() override;
18 18
19 // IFDE_VisualSet 19 // IFDE_VisualSet
20 FDE_VISUALOBJTYPE GetType() override; 20 FDE_VISUALOBJTYPE GetType() override;
21 void GetRect(FDE_TEXTEDITPIECE* hVisualObj, CFX_RectF& rt) override; 21 void GetRect(FDE_TEXTEDITPIECE* hVisualObj, CFX_RectF& rt) override;
22 22
23 // IFDE_TextSet 23 // IFDE_TextSet
24 int32_t GetString(FDE_TEXTEDITPIECE* pPiece, CFX_WideString& wsText) override; 24 int32_t GetString(FDE_TEXTEDITPIECE* pPiece, CFX_WideString& wsText) override;
25 CFGAS_GEFont* GetFont() override; 25 CFX_RetainPtr<CFGAS_GEFont> GetFont() override;
26 FX_FLOAT GetFontSize() override; 26 FX_FLOAT GetFontSize() override;
27 FX_ARGB GetFontColor() override; 27 FX_ARGB GetFontColor() override;
28 int32_t GetDisplayPos(FDE_TEXTEDITPIECE* pPiece, 28 int32_t GetDisplayPos(FDE_TEXTEDITPIECE* pPiece,
29 FXTEXT_CHARPOS* pCharPos, 29 FXTEXT_CHARPOS* pCharPos,
30 bool bCharCode = false, 30 bool bCharCode = false,
31 CFX_WideString* pWSForms = nullptr) override; 31 CFX_WideString* pWSForms = nullptr) override;
32 int32_t GetCharRects(const FDE_TEXTEDITPIECE* pPiece, 32 int32_t GetCharRects(const FDE_TEXTEDITPIECE* pPiece,
33 CFX_RectFArray& rtArray, 33 CFX_RectFArray& rtArray,
34 bool bBBox) override; 34 bool bBBox) override;
35 35
36 private: 36 private:
37 CFDE_TxtEdtPage* const m_pPage; 37 CFDE_TxtEdtPage* const m_pPage;
38 }; 38 };
39 39
40 #endif // XFA_FDE_CFDE_TXTEDTTEXTSET_H_ 40 #endif // XFA_FDE_CFDE_TXTEDTTEXTSET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698