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
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 2dd2911..19786f7 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 @@
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 09fa2bf..f3b9bbb 100644
--- a/core/src/fpdfdoc/doc_vt.cpp
+++ b/core/src/fpdfdoc/doc_vt.cpp
@@ -1741,7 +1741,7 @@
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 @@
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 ac4be23..489f099 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -73,15 +73,6 @@
#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 4c99765..a5fa644 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -534,15 +534,6 @@
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 ++) {
diff --git a/fpdfsdk/include/formfiller/FFL_Notify.h b/fpdfsdk/include/formfiller/FFL_Notify.h
index c729b74..cabc1aa 100644
--- a/fpdfsdk/include/formfiller/FFL_Notify.h
+++ b/fpdfsdk/include/formfiller/FFL_Notify.h
@@ -45,7 +45,6 @@
FX_BOOL ExecuteActionTree(CPDF_AAction::AActionType eAAT, CPDF_Action & action, FX_BOOL& bExit);
FX_BOOL ExecuteAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action,FX_BOOL& bExit);
- CFFL_FormFiller * m_pFormFiller;
FX_BOOL m_bDoActioning;
FX_INT32 m_nNotifyFlag;
};
diff --git a/fpdfsdk/include/formfiller/FFL_TextField.h b/fpdfsdk/include/formfiller/FFL_TextField.h
index d2808e9..3a5fd68 100644
--- a/fpdfsdk/include/formfiller/FFL_TextField.h
+++ b/fpdfsdk/include/formfiller/FFL_TextField.h
@@ -25,9 +25,6 @@
virtual void Redo();
virtual CFX_WideString GetDescr();
virtual void Release();
-
-private:
- CPWL_Edit* m_pEdit;
};
struct FFL_TextFieldState
diff --git a/fpdfsdk/include/javascript/app.h b/fpdfsdk/include/javascript/app.h
index 6273a7d..671b358 100644
--- a/fpdfsdk/include/javascript/app.h
+++ b/fpdfsdk/include/javascript/app.h
@@ -167,7 +167,6 @@
private:
bool m_bCalculate;
- CJS_Runtime* m_pRuntime;
bool m_bRuntimeHighLight;
CFX_ArrayTemplate<CJS_Timer*> m_aTimer;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Note.h b/fpdfsdk/include/pdfwindow/PWL_Note.h
index 7cc9e04..b3f7358 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Note.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Note.h
@@ -347,7 +347,6 @@
CPDF_Rect m_rcCaption;
FX_BOOL m_bEnalbleNotify;
IPopup_Note* m_pPopupNote;
- IPWL_NoteHandler* m_pNoteHandler;
CFX_WideString m_sReplyString;
};
diff --git a/fpdfsdk/src/formfiller/FFL_Notify.cpp b/fpdfsdk/src/formfiller/FFL_Notify.cpp
index f6a2feb..73ab5db 100644
--- a/fpdfsdk/src/formfiller/FFL_Notify.cpp
+++ b/fpdfsdk/src/formfiller/FFL_Notify.cpp
@@ -15,11 +15,10 @@
//#pragma warning(disable: 4800)
CFFL_Notify::CFFL_Notify(CFFL_FormFiller * pFormFiller) :
- m_pFormFiller(pFormFiller),
m_bDoActioning(FALSE),
m_nNotifyFlag(0)
{
- ASSERT(m_pFormFiller != NULL);
+ ASSERT(pFormFiller != NULL);
}
CFFL_Notify::~CFFL_Notify()
diff --git a/fpdfsdk/src/formfiller/FFL_TextField.cpp b/fpdfsdk/src/formfiller/FFL_TextField.cpp
index 8cd62fa..45c7162 100644
--- a/fpdfsdk/src/formfiller/FFL_TextField.cpp
+++ b/fpdfsdk/src/formfiller/FFL_TextField.cpp
@@ -10,7 +10,7 @@
#include "../../include/formfiller/FFL_CBA_Fontmap.h"
//#include "../include/FFL_Notify.h"
-CFFL_EditUndoItem::CFFL_EditUndoItem(CPWL_Edit* pEdit) : m_pEdit(pEdit)
+CFFL_EditUndoItem::CFFL_EditUndoItem(CPWL_Edit* pEdit)
{
}
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index e307f43..1bd980a 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -1074,7 +1074,7 @@
int iDec = params[0];
int iSepStyle = params[1];
int iNegStyle = params[2];
- int icurrStyle = params[3]; //it's no use!
+ // params[3] is iCurrStyle, it's not used.
std::wstring wstrCurrency(params[4].operator CFX_WideString());
FX_BOOL bCurrencyPrepend = params[5];
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp
index 0546be8..c9a9ef7 100644
--- a/fpdfsdk/src/javascript/app.cpp
+++ b/fpdfsdk/src/javascript/app.cpp
@@ -120,7 +120,6 @@
app::app(CJS_Object * pJSObject) : CJS_EmbedObj(pJSObject) ,
m_bCalculate(true),
- m_pRuntime(NULL),
m_bRuntimeHighLight(false)
// m_pMenuHead(NULL)
{
diff --git a/fpdfsdk/src/pdfwindow/PWL_Note.cpp b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
index 5929a35..b04b0f5 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Note.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
@@ -1213,8 +1213,7 @@
m_rcCaption(0,0,0,0),
m_pNoteNotify(pNoteNotify),
m_bEnalbleNotify(TRUE),
- m_pPopupNote(pPopupNote),
- m_pNoteHandler(pNoteHandler)
+ m_pPopupNote(pPopupNote)
{
}