summaryrefslogtreecommitdiff
path: root/xfa/fde/fde_visualset.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fde/fde_visualset.h')
-rw-r--r--xfa/fde/fde_visualset.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/xfa/fde/fde_visualset.h b/xfa/fde/fde_visualset.h
index 3260caee79..5cf02cde9c 100644
--- a/xfa/fde/fde_visualset.h
+++ b/xfa/fde/fde_visualset.h
@@ -26,6 +26,7 @@ enum FDE_VISUALOBJTYPE {
struct FDE_TEXTEDITPIECE {
FDE_TEXTEDITPIECE();
+ FDE_TEXTEDITPIECE(const FDE_TEXTEDITPIECE& that);
~FDE_TEXTEDITPIECE();
int32_t nStart;
@@ -35,13 +36,15 @@ struct FDE_TEXTEDITPIECE {
uint32_t dwCharStyles;
};
inline FDE_TEXTEDITPIECE::FDE_TEXTEDITPIECE() = default;
+inline FDE_TEXTEDITPIECE::FDE_TEXTEDITPIECE(const FDE_TEXTEDITPIECE& that) =
+ default;
inline FDE_TEXTEDITPIECE::~FDE_TEXTEDITPIECE() = default;
class IFDE_VisualSet {
public:
virtual ~IFDE_VisualSet() {}
virtual FDE_VISUALOBJTYPE GetType() = 0;
- virtual void GetRect(FDE_TEXTEDITPIECE* hVisualObj, CFX_RectF& rt) = 0;
+ virtual CFX_RectF GetRect(const FDE_TEXTEDITPIECE& hVisualObj) = 0;
};
class IFDE_CanvasSet : public IFDE_VisualSet {
@@ -58,13 +61,12 @@ class IFDE_TextSet : public IFDE_VisualSet {
virtual CFX_RetainPtr<CFGAS_GEFont> GetFont() = 0;
virtual FX_FLOAT GetFontSize() = 0;
virtual FX_ARGB GetFontColor() = 0;
- virtual int32_t GetDisplayPos(FDE_TEXTEDITPIECE* hText,
+ virtual int32_t GetDisplayPos(const FDE_TEXTEDITPIECE& hText,
FXTEXT_CHARPOS* pCharPos,
bool bCharCode = false,
CFX_WideString* pWSForms = nullptr) = 0;
- virtual int32_t GetCharRects(const FDE_TEXTEDITPIECE* hText,
- std::vector<CFX_RectF>* rtArray,
- bool bbox) = 0;
+ virtual std::vector<CFX_RectF> GetCharRects(const FDE_TEXTEDITPIECE* hText,
+ bool bbox) = 0;
};
#endif // XFA_FDE_FDE_VISUALSET_H_