summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfview.cpp
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-15 11:21:33 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-15 11:21:33 -0700
commit625ad667d0c0c17d5bc11d505f04861d90b45078 (patch)
treeefd014e752072adf726a0e34383555399342dcb2 /fpdfsdk/fpdfview.cpp
parent29b8ad0b130ec6ed4f72ebd0c0a4f9e6a5b03467 (diff)
downloadpdfium-625ad667d0c0c17d5bc11d505f04861d90b45078.tar.xz
Make code compile with clang_use_chrome_plugin (part IV)
This change mainly contains files in fpdfsdk/ directory. 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 plus removing an unused file and splitting cxfa_eventparam out from fxfa.h BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2062313002
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r--fpdfsdk/fpdfview.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index 9847f15c60..43ca3183f9 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -104,6 +104,10 @@ FX_BOOL CFPDF_FileStream::IsEOF() {
return m_nCurPos >= GetSize();
}
+FX_FILESIZE CFPDF_FileStream::GetPosition() {
+ return m_nCurPos;
+}
+
FX_BOOL CFPDF_FileStream::ReadBlock(void* buffer,
FX_FILESIZE offset,
size_t size) {
@@ -167,6 +171,10 @@ CPDF_CustomAccess::CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess) {
}
#ifdef PDF_ENABLE_XFA
+CFX_ByteString CPDF_CustomAccess::GetFullPath() {
+ return "";
+}
+
FX_BOOL CPDF_CustomAccess::GetByte(uint32_t pos, uint8_t& ch) {
if (pos >= m_FileAccess.m_FileLen)
return FALSE;
@@ -194,6 +202,14 @@ FX_BOOL CPDF_CustomAccess::GetBlock(uint32_t pos,
}
#endif // PDF_ENABLE_XFA
+FX_FILESIZE CPDF_CustomAccess::GetSize() {
+ return m_FileAccess.m_FileLen;
+}
+
+void CPDF_CustomAccess::Release() {
+ delete this;
+}
+
FX_BOOL CPDF_CustomAccess::ReadBlock(void* buffer,
FX_FILESIZE offset,
size_t size) {