summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/include
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/include')
-rw-r--r--core/fpdfdoc/include/cpdf_variabletext.h10
-rw-r--r--core/fpdfdoc/include/cpvt_word.h20
-rw-r--r--core/fpdfdoc/include/fpdf_doc.h32
3 files changed, 28 insertions, 34 deletions
diff --git a/core/fpdfdoc/include/cpdf_variabletext.h b/core/fpdfdoc/include/cpdf_variabletext.h
index 06b41f186c..5e64ab29a9 100644
--- a/core/fpdfdoc/include/cpdf_variabletext.h
+++ b/core/fpdfdoc/include/cpdf_variabletext.h
@@ -87,13 +87,9 @@ class CPDF_VariableText : private CPDF_EditContainer {
CPDF_VariableText::Iterator* GetIterator();
// CPDF_EditContainer.
- void SetPlateRect(const CFX_FloatRect& rect) override {
- CPDF_EditContainer::SetPlateRect(rect);
- }
+ void SetPlateRect(const CFX_FloatRect& rect) override;
CFX_FloatRect GetContentRect() const override;
- const CFX_FloatRect& GetPlateRect() const override {
- return CPDF_EditContainer::GetPlateRect();
- }
+ const CFX_FloatRect& GetPlateRect() const override;
void SetAlignment(int32_t nFormat = 0) { m_nAlignment = nFormat; }
void SetPasswordChar(uint16_t wSubWord = '*') { m_wSubWord = wSubWord; }
@@ -108,8 +104,10 @@ class CPDF_VariableText : private CPDF_EditContainer {
void SetRichText(FX_BOOL bRichText) { m_bRichText = bRichText; }
void SetLineLeading(FX_FLOAT fLineLeading) { m_fLineLeading = fLineLeading; }
void Initialize();
+
FX_BOOL IsValid() const { return m_bInitial; }
FX_BOOL IsRichText() const { return m_bRichText; }
+
void RearrangeAll();
void RearrangePart(const CPVT_WordRange& PlaceRange);
void ResetAll();
diff --git a/core/fpdfdoc/include/cpvt_word.h b/core/fpdfdoc/include/cpvt_word.h
index 7d022dda5d..f7b7b23dac 100644
--- a/core/fpdfdoc/include/cpvt_word.h
+++ b/core/fpdfdoc/include/cpvt_word.h
@@ -12,15 +12,7 @@
#include "core/fxcrt/include/fx_system.h"
struct CPVT_Word {
- CPVT_Word()
- : Word(0),
- nCharset(0),
- ptWord(0, 0),
- fAscent(0.0f),
- fDescent(0.0f),
- fWidth(0.0f),
- fFontSize(0),
- WordProps() {}
+ CPVT_Word();
uint16_t Word;
int32_t nCharset;
@@ -34,4 +26,14 @@ struct CPVT_Word {
CPVT_WordProps WordProps;
};
+inline CPVT_Word::CPVT_Word()
+ : Word(0),
+ nCharset(0),
+ ptWord(0.0f, 0.0f),
+ fAscent(0.0f),
+ fDescent(0.0f),
+ fWidth(0.0f),
+ nFontIndex(-1),
+ fFontSize(0.0f) {}
+
#endif // CORE_FPDFDOC_INCLUDE_CPVT_WORD_H_
diff --git a/core/fpdfdoc/include/fpdf_doc.h b/core/fpdfdoc/include/fpdf_doc.h
index 2722003743..afa5a30b18 100644
--- a/core/fpdfdoc/include/fpdf_doc.h
+++ b/core/fpdfdoc/include/fpdf_doc.h
@@ -738,7 +738,7 @@ class CPDF_FormControl {
CPDF_InterForm* GetInterForm() const { return m_pForm; }
CPDF_FormField* GetField() const { return m_pField; }
CPDF_Dictionary* GetWidget() const { return m_pWidgetDict; }
- CFX_FloatRect GetRect() const;
+ CFX_FloatRect GetRect() const { return m_pWidgetDict->GetRectBy("Rect"); }
void DrawControl(CFX_RenderDevice* pDevice,
CFX_Matrix* pMatrix,
@@ -756,9 +756,7 @@ class CPDF_FormControl {
bool HasMKEntry(const CFX_ByteString& csEntry) const;
int GetRotation();
- inline FX_ARGB GetBorderColor(int& iColorType) {
- return GetColor(iColorType, "BC");
- }
+ FX_ARGB GetBorderColor(int& iColorType) { return GetColor(iColorType, "BC"); }
FX_FLOAT GetOriginalBorderColor(int index) {
return GetOriginalColor(index, "BC");
@@ -823,28 +821,24 @@ class CPDF_FormControl {
class IPDF_FormNotify {
public:
- virtual ~IPDF_FormNotify() {}
+ virtual ~IPDF_FormNotify();
virtual int BeforeValueChange(CPDF_FormField* pField,
- const CFX_WideString& csValue) {
- return 0;
- }
- virtual void AfterValueChange(CPDF_FormField* pField) {}
+ const CFX_WideString& csValue);
+ virtual void AfterValueChange(CPDF_FormField* pField);
virtual int BeforeSelectionChange(CPDF_FormField* pField,
- const CFX_WideString& csValue) {
- return 0;
- }
- virtual void AfterSelectionChange(CPDF_FormField* pField) {}
- virtual void AfterCheckedStatusChange(CPDF_FormField* pField) {}
- virtual int BeforeFormReset(CPDF_InterForm* pForm) { return 0; }
- virtual void AfterFormReset(CPDF_InterForm* pForm) {}
- virtual int BeforeFormImportData(CPDF_InterForm* pForm) { return 0; }
- virtual void AfterFormImportData(CPDF_InterForm* pForm) {}
+ const CFX_WideString& csValue);
+ virtual void AfterSelectionChange(CPDF_FormField* pField);
+ virtual void AfterCheckedStatusChange(CPDF_FormField* pField);
+ virtual int BeforeFormReset(CPDF_InterForm* pForm);
+ virtual void AfterFormReset(CPDF_InterForm* pForm);
+ virtual int BeforeFormImportData(CPDF_InterForm* pForm);
+ virtual void AfterFormImportData(CPDF_InterForm* pForm);
};
class CPDF_PageLabel {
public:
- explicit CPDF_PageLabel(CPDF_Document* pDocument) : m_pDocument(pDocument) {}
+ explicit CPDF_PageLabel(CPDF_Document* pDocument);
CFX_WideString GetLabel(int nPage) const;
int32_t GetPageByLabel(const CFX_ByteStringC& bsLabel) const;