diff options
author | weili <weili@chromium.org> | 2016-06-14 17:21:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-14 17:21:14 -0700 |
commit | f4bb580add3824196dc49cd7de2f7d051019ede8 (patch) | |
tree | 15c1db6fb7000330d48c105c66acf1d468ba56bd /core/fpdfdoc/doc_basic.cpp | |
parent | ee2abec93f22bd10522181dc0362f24d389fc66b (diff) | |
download | pdfium-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/doc_basic.cpp')
-rw-r--r-- | core/fpdfdoc/doc_basic.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
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) { |