diff options
author | Nico Weber <thakis@chromium.org> | 2014-07-30 19:00:31 -0700 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2014-07-30 19:00:31 -0700 |
commit | 55681f9c135c978cf4ca525dc1d26ff330e83029 (patch) | |
tree | 247345a0fb6748af9b868151b1ea59f742e91ba6 /core/src | |
parent | ec570e5f77986f6013ea42741001be5a3fcf47a7 (diff) | |
download | pdfium-55681f9c135c978cf4ca525dc1d26ff330e83029.tar.xz |
Remove a few unused variables, functions, and member variables.
No intended behavior change.
BUG=pdfium:29
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/426763003
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp | 20 | ||||
-rw-r--r-- | core/src/fpdfdoc/doc_vt.cpp | 4 | ||||
-rw-r--r-- | core/src/fxcodec/codec/fx_codec_jpeg.cpp | 9 | ||||
-rw-r--r-- | core/src/fxge/ge/fx_ge_fontmap.cpp | 9 |
4 files changed, 2 insertions, 40 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp index 2dd2911e93..19786f7451 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp @@ -1053,26 +1053,6 @@ CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert) pFontDict->SetAtReference("FontDescriptor", this, pFontDesc); return LoadFont(pBaseDict); } -static CPDF_Stream* GetFormStream(CPDF_Document* pDoc, CPDF_Object* pResObj) -{ - if (pResObj->GetType() != PDFOBJ_REFERENCE) { - return NULL; - } - CPDF_Reference* pRef = (CPDF_Reference*)pResObj; - FX_BOOL bForm; - if (pDoc->IsFormStream(pRef->GetRefObjNum(), bForm) && !bForm) { - return NULL; - } - pResObj = pRef->GetDirect(); - if (pResObj->GetType() != PDFOBJ_STREAM) { - return NULL; - } - CPDF_Stream* pXObject = (CPDF_Stream*)pResObj; - if (pXObject->GetDict()->GetString(FX_BSTRC("Subtype")) != FX_BSTRC("Form")) { - return NULL; - } - return pXObject; -} static int InsertDeletePDFPage(CPDF_Document* pDoc, CPDF_Dictionary* pPages, int nPagesToGo, CPDF_Dictionary* pPage, FX_BOOL bInsert, CFX_PtrArray& stackList) { diff --git a/core/src/fpdfdoc/doc_vt.cpp b/core/src/fpdfdoc/doc_vt.cpp index 09fa2bf416..f3b9bbb484 100644 --- a/core/src/fpdfdoc/doc_vt.cpp +++ b/core/src/fpdfdoc/doc_vt.cpp @@ -1741,7 +1741,7 @@ FX_BOOL CPDF_VariableText_Iterator::NextLine() FX_BOOL CPDF_VariableText_Iterator::PrevLine() { ASSERT(m_pVT != NULL); - if (CSection * pSection = m_pVT->m_SectionArray.GetAt(m_CurPos.nSecIndex)) { + if (m_pVT->m_SectionArray.GetAt(m_CurPos.nSecIndex)) { if (m_CurPos.nLineIndex > 0) { m_CurPos = CPVT_WordPlace(m_CurPos.nSecIndex, m_CurPos.nLineIndex - 1, -1); return TRUE; @@ -1779,7 +1779,7 @@ FX_BOOL CPDF_VariableText_Iterator::GetWord(CPVT_Word & word) const ASSERT(m_pVT != NULL); word.WordPlace = m_CurPos; if (CSection * pSection = m_pVT->m_SectionArray.GetAt(m_CurPos.nSecIndex)) { - if (CLine * pLine = pSection->m_LineArray.GetAt(m_CurPos.nLineIndex)) { + if (pSection->m_LineArray.GetAt(m_CurPos.nLineIndex)) { if (CPVT_WordInfo * pWord = pSection->m_WordArray.GetAt(m_CurPos.nWordIndex)) { word.Word = pWord->Word; word.nCharset = pWord->nCharset; diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp index ac4be23e2c..489f099bf8 100644 --- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp @@ -73,15 +73,6 @@ extern "C" { #define JPEG_MARKER_AUTHORTIME (JPEG_APP0 + 3) #define JPEG_MARKER_MAXSIZE 0xFFFF #define JPEG_OVERHEAD_LEN 14 -static FX_BOOL _JpegIsIccMarker(jpeg_saved_marker_ptr marker) -{ - if (marker->marker == JPEG_MARKER_ICC && - marker->data_length >= JPEG_OVERHEAD_LEN && - (FXSYS_memcmp32(marker->data, "\x49\x43\x43\x5f\x50\x52\x4f\x46\x49\x4c\x45\x00", 12) == 0)) { - return TRUE; - } - return FALSE; -} static FX_BOOL _JpegEmbedIccProfile(j_compress_ptr cinfo, FX_LPCBYTE icc_buf_ptr, FX_DWORD icc_length) { if(icc_buf_ptr == NULL || icc_length == 0) { diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp index 4c99765e7d..a5fa6443a8 100644 --- a/core/src/fxge/ge/fx_ge_fontmap.cpp +++ b/core/src/fxge/ge/fx_ge_fontmap.cpp @@ -534,15 +534,6 @@ static CFX_ByteString _FPDF_ReadStringFromFile(FXSYS_FILE* pFile, FX_DWORD size) buffer.ReleaseBuffer(size); return buffer; } -static CFX_ByteString _FPDF_ReadStringFromStreamFile(IFX_FileStream* pFile, FX_DWORD size) -{ - CFX_ByteString buffer; - if (!pFile->ReadBlock(buffer.GetBuffer(size), size)) { - return CFX_ByteString(); - } - buffer.ReleaseBuffer(size); - return buffer; -} CFX_ByteString _FPDF_LoadTableFromTT(FXSYS_FILE* pFile, FX_LPCBYTE pTables, FX_DWORD nTables, FX_DWORD tag) { for (FX_DWORD i = 0; i < nTables; i ++) { |