summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-14 17:21:14 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-14 17:21:14 -0700
commitf4bb580add3824196dc49cd7de2f7d051019ede8 (patch)
tree15c1db6fb7000330d48c105c66acf1d468ba56bd /core/fpdfdoc
parentee2abec93f22bd10522181dc0362f24d389fc66b (diff)
downloadpdfium-f4bb580add3824196dc49cd7de2f7d051019ede8.tar.xz
Make code compile with clang_use_chrome_plugin (part II)
This change contains files in core directory which were not covered in part I. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2060913003
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/clines.cpp50
-rw-r--r--core/fpdfdoc/clines.h30
-rw-r--r--core/fpdfdoc/cpdf_variabletext.cpp8
-rw-r--r--core/fpdfdoc/csection.h1
-rw-r--r--core/fpdfdoc/doc_basic.cpp40
-rw-r--r--core/fpdfdoc/doc_formcontrol.cpp4
-rw-r--r--core/fpdfdoc/doc_tagged.cpp24
-rw-r--r--core/fpdfdoc/doc_vt.cpp25
-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
-rw-r--r--core/fpdfdoc/pdf_vt.h60
-rw-r--r--core/fpdfdoc/tagged_int.h16
13 files changed, 224 insertions, 96 deletions
diff --git a/core/fpdfdoc/clines.cpp b/core/fpdfdoc/clines.cpp
new file mode 100644
index 0000000000..b11731042d
--- /dev/null
+++ b/core/fpdfdoc/clines.cpp
@@ -0,0 +1,50 @@
+// Copyright 2016 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
+
+#include "core/fpdfdoc/clines.h"
+
+CLines::CLines() : m_nTotal(0) {}
+
+CLines::~CLines() {
+ RemoveAll();
+}
+
+int32_t CLines::GetSize() const {
+ return m_Lines.GetSize();
+}
+
+CLine* CLines::GetAt(int32_t nIndex) const {
+ return m_Lines.GetAt(nIndex);
+}
+
+void CLines::Empty() {
+ m_nTotal = 0;
+}
+
+void CLines::RemoveAll() {
+ for (int32_t i = 0, sz = GetSize(); i < sz; i++)
+ delete GetAt(i);
+ m_Lines.RemoveAll();
+ m_nTotal = 0;
+}
+
+int32_t CLines::Add(const CPVT_LineInfo& lineinfo) {
+ if (m_nTotal >= GetSize()) {
+ CLine* pLine = new CLine;
+ pLine->m_LineInfo = lineinfo;
+ m_Lines.Add(pLine);
+ } else if (CLine* pLine = GetAt(m_nTotal)) {
+ pLine->m_LineInfo = lineinfo;
+ }
+ return m_nTotal++;
+}
+
+void CLines::Clear() {
+ for (int32_t i = GetSize() - 1; i >= m_nTotal; i--) {
+ delete GetAt(i);
+ m_Lines.RemoveAt(i);
+ }
+}
diff --git a/core/fpdfdoc/clines.h b/core/fpdfdoc/clines.h
new file mode 100644
index 0000000000..9d71d3f048
--- /dev/null
+++ b/core/fpdfdoc/clines.h
@@ -0,0 +1,30 @@
+// Copyright 2016 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_FPDFDOC_CLINES_H_
+#define CORE_FPDFDOC_CLINES_H_
+
+#include "core/fpdfdoc/pdf_vt.h"
+
+class CLines final {
+ public:
+ CLines();
+ ~CLines();
+
+ int32_t GetSize() const;
+ CLine* GetAt(int32_t nIndex) const;
+
+ void Empty();
+ void RemoveAll();
+ int32_t Add(const CPVT_LineInfo& lineinfo);
+ void Clear();
+
+ private:
+ CPVT_ArrayTemplate<CLine*> m_Lines;
+ int32_t m_nTotal;
+};
+
+#endif // CORE_FPDFDOC_CLINES_H_
diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp
index 1d5fde289d..010d426cf2 100644
--- a/core/fpdfdoc/cpdf_variabletext.cpp
+++ b/core/fpdfdoc/cpdf_variabletext.cpp
@@ -787,10 +787,18 @@ FX_BOOL CPDF_VariableText::GetSectionInfo(const CPVT_WordPlace& place,
return FALSE;
}
+void CPDF_VariableText::SetPlateRect(const CFX_FloatRect& rect) {
+ CPDF_EditContainer::SetPlateRect(rect);
+}
+
CFX_FloatRect CPDF_VariableText::GetContentRect() const {
return InToOut(CPVT_FloatRect(CPDF_EditContainer::GetContentRect()));
}
+const CFX_FloatRect& CPDF_VariableText::GetPlateRect() const {
+ return CPDF_EditContainer::GetPlateRect();
+}
+
FX_FLOAT CPDF_VariableText::GetWordFontSize(const CPVT_WordInfo& WordInfo,
FX_BOOL bFactFontSize) {
return m_bRichText && WordInfo.pWordProps
diff --git a/core/fpdfdoc/csection.h b/core/fpdfdoc/csection.h
index 4ac345c8df..8629be71a7 100644
--- a/core/fpdfdoc/csection.h
+++ b/core/fpdfdoc/csection.h
@@ -7,6 +7,7 @@
#ifndef CORE_FPDFDOC_CSECTION_H_
#define CORE_FPDFDOC_CSECTION_H_
+#include "core/fpdfdoc/clines.h"
#include "core/fpdfdoc/cpvt_sectioninfo.h"
#include "core/fpdfdoc/ctypeset.h"
#include "core/fxcrt/include/fx_coordinates.h"
diff --git a/core/fpdfdoc/doc_basic.cpp b/core/fpdfdoc/doc_basic.cpp
index 72f2985cef..3fe182ae78 100644
--- a/core/fpdfdoc/doc_basic.cpp
+++ b/core/fpdfdoc/doc_basic.cpp
@@ -31,6 +31,7 @@ int CPDF_Dest::GetPageIndex(CPDF_Document* pDoc) {
return 0;
return pDoc->GetPageIndex(pPage->GetObjNum());
}
+
uint32_t CPDF_Dest::GetPageObjNum() {
CPDF_Array* pArray = ToArray(m_pObj);
if (!pArray)
@@ -68,6 +69,7 @@ FX_FLOAT CPDF_Dest::GetParam(int index) {
CPDF_Array* pArray = ToArray(m_pObj);
return pArray ? pArray->GetNumberAt(2 + index) : 0;
}
+
CFX_ByteString CPDF_Dest::GetRemoteName() {
return m_pObj ? m_pObj->GetString() : CFX_ByteString();
}
@@ -224,6 +226,7 @@ int CPDF_NameTree::GetIndex(const CFX_ByteString& csName) const {
}
return nIndex;
}
+
CPDF_Object* CPDF_NameTree::LookupValue(int nIndex,
CFX_ByteString& csName) const {
if (!m_pRoot) {
@@ -232,6 +235,7 @@ CPDF_Object* CPDF_NameTree::LookupValue(int nIndex,
size_t nCurIndex = 0;
return SearchNameNode(m_pRoot, nIndex, nCurIndex, csName, nullptr);
}
+
CPDF_Object* CPDF_NameTree::LookupValue(const CFX_ByteString& csName) const {
if (!m_pRoot) {
return nullptr;
@@ -239,6 +243,7 @@ CPDF_Object* CPDF_NameTree::LookupValue(const CFX_ByteString& csName) const {
size_t nIndex = 0;
return SearchNameNode(m_pRoot, csName, nIndex, nullptr);
}
+
CPDF_Array* CPDF_NameTree::LookupNamedDest(CPDF_Document* pDoc,
const CFX_ByteString& sName) {
CPDF_Object* pValue = LookupValue(sName);
@@ -442,6 +447,7 @@ static CFX_WideString _MakeLetters(int num) {
}
return wsLetters;
}
+
static CFX_WideString _GetLabelNumPortion(int num,
const CFX_ByteString& bsStyle) {
CFX_WideString wsNumPortion;
@@ -463,6 +469,40 @@ static CFX_WideString _GetLabelNumPortion(int num,
}
return wsNumPortion;
}
+
+IPDF_FormNotify::~IPDF_FormNotify() {}
+
+int IPDF_FormNotify::BeforeValueChange(CPDF_FormField* pField,
+ const CFX_WideString& csValue) {
+ return 0;
+}
+
+void IPDF_FormNotify::AfterValueChange(CPDF_FormField* pField) {}
+
+int IPDF_FormNotify::BeforeSelectionChange(CPDF_FormField* pField,
+ const CFX_WideString& csValue) {
+ return 0;
+}
+
+void IPDF_FormNotify::AfterSelectionChange(CPDF_FormField* pField) {}
+
+void IPDF_FormNotify::AfterCheckedStatusChange(CPDF_FormField* pField) {}
+
+int IPDF_FormNotify::BeforeFormReset(CPDF_InterForm* pForm) {
+ return 0;
+}
+
+void IPDF_FormNotify::AfterFormReset(CPDF_InterForm* pForm) {}
+
+int IPDF_FormNotify::BeforeFormImportData(CPDF_InterForm* pForm) {
+ return 0;
+}
+
+void IPDF_FormNotify::AfterFormImportData(CPDF_InterForm* pForm) {}
+
+CPDF_PageLabel::CPDF_PageLabel(CPDF_Document* pDocument)
+ : m_pDocument(pDocument) {}
+
CFX_WideString CPDF_PageLabel::GetLabel(int nPage) const {
CFX_WideString wsLabel;
if (!m_pDocument) {
diff --git a/core/fpdfdoc/doc_formcontrol.cpp b/core/fpdfdoc/doc_formcontrol.cpp
index 9b3cf1e5de..7e058ae310 100644
--- a/core/fpdfdoc/doc_formcontrol.cpp
+++ b/core/fpdfdoc/doc_formcontrol.cpp
@@ -27,10 +27,6 @@ CPDF_FormControl::CPDF_FormControl(CPDF_FormField* pField,
m_pWidgetDict(pWidgetDict),
m_pForm(m_pField->m_pForm) {}
-CFX_FloatRect CPDF_FormControl::GetRect() const {
- return m_pWidgetDict->GetRectBy("Rect");
-}
-
CFX_ByteString CPDF_FormControl::GetOnStateName() const {
ASSERT(GetType() == CPDF_FormField::CheckBox ||
GetType() == CPDF_FormField::RadioButton);
diff --git a/core/fpdfdoc/doc_tagged.cpp b/core/fpdfdoc/doc_tagged.cpp
index 05109bb747..2bd4347e18 100644
--- a/core/fpdfdoc/doc_tagged.cpp
+++ b/core/fpdfdoc/doc_tagged.cpp
@@ -208,6 +208,30 @@ CPDF_StructElementImpl::CPDF_StructElementImpl(CPDF_StructTreeImpl* pTree,
LoadKids(pDict);
}
+IPDF_StructTree* CPDF_StructElementImpl::GetTree() const {
+ return m_pTree;
+}
+
+const CFX_ByteString& CPDF_StructElementImpl::GetType() const {
+ return m_Type;
+}
+
+IPDF_StructElement* CPDF_StructElementImpl::GetParent() const {
+ return m_pParent;
+}
+
+CPDF_Dictionary* CPDF_StructElementImpl::GetDict() const {
+ return m_pDict;
+}
+
+int CPDF_StructElementImpl::CountKids() const {
+ return pdfium::CollectionSize<int>(m_Kids);
+}
+
+const CPDF_StructKid& CPDF_StructElementImpl::GetKid(int index) const {
+ return m_Kids[index];
+}
+
CPDF_StructElementImpl::~CPDF_StructElementImpl() {
for (CPDF_StructKid& kid : m_Kids) {
if (kid.m_Type == CPDF_StructKid::Element && kid.m_Element.m_pElement)
diff --git a/core/fpdfdoc/doc_vt.cpp b/core/fpdfdoc/doc_vt.cpp
index 7b902f81a7..84d6a1ac07 100644
--- a/core/fpdfdoc/doc_vt.cpp
+++ b/core/fpdfdoc/doc_vt.cpp
@@ -7,14 +7,18 @@
#include "core/fpdfdoc/pdf_vt.h"
CLine::CLine() {}
+
CLine::~CLine() {}
+
CPVT_WordPlace CLine::GetBeginWordPlace() const {
return CPVT_WordPlace(LinePlace.nSecIndex, LinePlace.nLineIndex, -1);
}
+
CPVT_WordPlace CLine::GetEndWordPlace() const {
return CPVT_WordPlace(LinePlace.nSecIndex, LinePlace.nLineIndex,
m_LineInfo.nEndWordIndex);
}
+
CPVT_WordPlace CLine::GetPrevWordPlace(const CPVT_WordPlace& place) const {
if (place.nWordIndex > m_LineInfo.nEndWordIndex) {
return CPVT_WordPlace(place.nSecIndex, place.nLineIndex,
@@ -23,6 +27,7 @@ CPVT_WordPlace CLine::GetPrevWordPlace(const CPVT_WordPlace& place) const {
return CPVT_WordPlace(place.nSecIndex, place.nLineIndex,
place.nWordIndex - 1);
}
+
CPVT_WordPlace CLine::GetNextWordPlace(const CPVT_WordPlace& place) const {
if (place.nWordIndex < m_LineInfo.nBeginWordIndex) {
return CPVT_WordPlace(place.nSecIndex, place.nLineIndex,
@@ -31,3 +36,23 @@ CPVT_WordPlace CLine::GetNextWordPlace(const CPVT_WordPlace& place) const {
return CPVT_WordPlace(place.nSecIndex, place.nLineIndex,
place.nWordIndex + 1);
}
+
+CPDF_EditContainer::CPDF_EditContainer() {}
+
+CPDF_EditContainer::~CPDF_EditContainer() {}
+
+void CPDF_EditContainer::SetPlateRect(const CFX_FloatRect& rect) {
+ m_rcPlate = rect;
+}
+
+const CFX_FloatRect& CPDF_EditContainer::GetPlateRect() const {
+ return m_rcPlate;
+}
+
+void CPDF_EditContainer::SetContentRect(const CPVT_FloatRect& rect) {
+ m_rcContent = rect;
+}
+
+CFX_FloatRect CPDF_EditContainer::GetContentRect() const {
+ return m_rcContent;
+}
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;
diff --git a/core/fpdfdoc/pdf_vt.h b/core/fpdfdoc/pdf_vt.h
index 3f06f7d6d6..71e28daad9 100644
--- a/core/fpdfdoc/pdf_vt.h
+++ b/core/fpdfdoc/pdf_vt.h
@@ -49,54 +49,16 @@ class CLine final {
CPVT_LineInfo m_LineInfo;
};
-class CLines final {
- public:
- CLines() : m_nTotal(0) {}
- ~CLines() { RemoveAll(); }
-
- int32_t GetSize() const { return m_Lines.GetSize(); }
- CLine* GetAt(int32_t nIndex) const { return m_Lines.GetAt(nIndex); }
- void Empty() { m_nTotal = 0; }
- void RemoveAll() {
- for (int32_t i = 0, sz = GetSize(); i < sz; i++) {
- delete GetAt(i);
- }
- m_Lines.RemoveAll();
- m_nTotal = 0;
- }
- int32_t Add(const CPVT_LineInfo& lineinfo) {
- if (m_nTotal >= GetSize()) {
- CLine* pLine = new CLine;
- pLine->m_LineInfo = lineinfo;
- m_Lines.Add(pLine);
- } else if (CLine* pLine = GetAt(m_nTotal)) {
- pLine->m_LineInfo = lineinfo;
- }
- return m_nTotal++;
- }
- void Clear() {
- for (int32_t i = GetSize() - 1; i >= m_nTotal; i--) {
- delete GetAt(i);
- m_Lines.RemoveAt(i);
- }
- }
-
- private:
- CPVT_ArrayTemplate<CLine*> m_Lines;
- int32_t m_nTotal;
-};
-
class CPDF_EditContainer {
public:
- CPDF_EditContainer() : m_rcPlate(0, 0, 0, 0), m_rcContent(0, 0, 0, 0) {}
- virtual ~CPDF_EditContainer() {}
+ CPDF_EditContainer();
+ virtual ~CPDF_EditContainer();
+
+ virtual void SetPlateRect(const CFX_FloatRect& rect);
+ virtual const CFX_FloatRect& GetPlateRect() const;
+ virtual void SetContentRect(const CPVT_FloatRect& rect);
+ virtual CFX_FloatRect GetContentRect() const;
- virtual void SetPlateRect(const CFX_FloatRect& rect) { m_rcPlate = rect; }
- virtual const CFX_FloatRect& GetPlateRect() const { return m_rcPlate; }
- virtual void SetContentRect(const CPVT_FloatRect& rect) {
- m_rcContent = rect;
- }
- virtual CFX_FloatRect GetContentRect() const { return m_rcContent; }
FX_FLOAT GetPlateWidth() const { return m_rcPlate.right - m_rcPlate.left; }
FX_FLOAT GetPlateHeight() const { return m_rcPlate.top - m_rcPlate.bottom; }
CFX_SizeF GetPlateSize() const {
@@ -108,20 +70,20 @@ class CPDF_EditContainer {
CFX_FloatPoint GetETPoint() const {
return CFX_FloatPoint(m_rcPlate.right, m_rcPlate.bottom);
}
- inline CFX_FloatPoint InToOut(const CFX_FloatPoint& point) const {
+ CFX_FloatPoint InToOut(const CFX_FloatPoint& point) const {
return CFX_FloatPoint(point.x + GetBTPoint().x, GetBTPoint().y - point.y);
}
- inline CFX_FloatPoint OutToIn(const CFX_FloatPoint& point) const {
+ CFX_FloatPoint OutToIn(const CFX_FloatPoint& point) const {
return CFX_FloatPoint(point.x - GetBTPoint().x, GetBTPoint().y - point.y);
}
- inline CFX_FloatRect InToOut(const CPVT_FloatRect& rect) const {
+ CFX_FloatRect InToOut(const CPVT_FloatRect& rect) const {
CFX_FloatPoint ptLeftTop = InToOut(CFX_FloatPoint(rect.left, rect.top));
CFX_FloatPoint ptRightBottom =
InToOut(CFX_FloatPoint(rect.right, rect.bottom));
return CFX_FloatRect(ptLeftTop.x, ptRightBottom.y, ptRightBottom.x,
ptLeftTop.y);
}
- inline CPVT_FloatRect OutToIn(const CFX_FloatRect& rect) const {
+ CPVT_FloatRect OutToIn(const CFX_FloatRect& rect) const {
CFX_FloatPoint ptLeftTop = OutToIn(CFX_FloatPoint(rect.left, rect.top));
CFX_FloatPoint ptRightBottom =
OutToIn(CFX_FloatPoint(rect.right, rect.bottom));
diff --git a/core/fpdfdoc/tagged_int.h b/core/fpdfdoc/tagged_int.h
index d508211441..354a93cb76 100644
--- a/core/fpdfdoc/tagged_int.h
+++ b/core/fpdfdoc/tagged_int.h
@@ -50,15 +50,13 @@ class CPDF_StructElementImpl final : public IPDF_StructElement {
CPDF_StructElementImpl* pParent,
CPDF_Dictionary* pDict);
- // IPDF_StructElement:
- IPDF_StructTree* GetTree() const override { return m_pTree; }
- const CFX_ByteString& GetType() const override { return m_Type; }
- IPDF_StructElement* GetParent() const override { return m_pParent; }
- CPDF_Dictionary* GetDict() const override { return m_pDict; }
- int CountKids() const override { return pdfium::CollectionSize<int>(m_Kids); }
- const CPDF_StructKid& GetKid(int index) const override {
- return m_Kids[index];
- }
+ // IPDF_StructElement
+ IPDF_StructTree* GetTree() const override;
+ const CFX_ByteString& GetType() const override;
+ IPDF_StructElement* GetParent() const override;
+ CPDF_Dictionary* GetDict() const override;
+ int CountKids() const override;
+ const CPDF_StructKid& GetKid(int index) const override;
CPDF_Object* GetAttr(const CFX_ByteStringC& owner,
const CFX_ByteStringC& name,
FX_BOOL bInheritable = FALSE,