summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-02-27 19:54:20 -0800
committerLei Zhang <thestig@chromium.org>2015-02-27 19:54:20 -0800
commit8411066e3d5d6afd2c7f38e2c03abd065a783239 (patch)
tree504b3c04e0a018f2a930e7ed2c07dbf910b36ddb
parent654403aedf0aac9a26ff6fd1f1cca8532528e9b0 (diff)
downloadpdfium-8411066e3d5d6afd2c7f38e2c03abd065a783239.tar.xz
Merge to XFA: Cleanup: Fix some unused-function warnings.
Original URL: https://codereview.chromium.org/891113002 (cherry picked from commit 44fc192f29a77c5864fabffe5ab63937dacdfd21) Review URL: https://codereview.chromium.org/966023002
-rw-r--r--core/src/fpdfapi/fpdf_basic_module.cpp17
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp1
-rw-r--r--core/src/fpdfdoc/doc_basic.cpp32
-rw-r--r--core/src/fxge/ge/fx_ge_fontmap.cpp13
-rw-r--r--fpdfsdk/src/fxedit/fxet_pageobjs.cpp22
5 files changed, 16 insertions, 69 deletions
diff --git a/core/src/fpdfapi/fpdf_basic_module.cpp b/core/src/fpdfapi/fpdf_basic_module.cpp
index edccda5743..82658ab51e 100644
--- a/core/src/fpdfapi/fpdf_basic_module.cpp
+++ b/core/src/fpdfapi/fpdf_basic_module.cpp
@@ -61,23 +61,6 @@ FX_BOOL CPDF_ModuleMgr::DownloadModule(FX_LPCSTR module_name)
}
return m_pDownloadCallback(module_name);
}
-static CFX_ByteString _GetPath(const CFX_ByteString& folder, FX_LPCSTR name)
-{
- FX_STRSIZE folder_len = folder.GetLength();
-#if _FX_OS_ == _FX_SYMBIAN_ || _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
- if (folder[folder_len - 1] == '\\') {
- return folder + name;
- } else {
- return (folder + "\\") + name;
- }
-#else
- if (folder[folder_len - 1] == '/') {
- return folder + name;
- } else {
- return (folder + "/") + name;
- }
-#endif
-}
void CPDF_ModuleMgr::NotifyModuleAvailable(FX_LPCSTR module_name)
{
if (FXSYS_strcmp(module_name, ADDIN_NAME_CJK) == 0) {
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index 45d0078e8a..4583bc1b25 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -329,7 +329,6 @@ int CPDF_DIBSource::StartLoadDIBSource(CPDF_Document* pDoc, const CPDF_Stream* p
if (m_pStreamAcc->GetSize() == 0 || m_pStreamAcc->GetData() == NULL) {
return 0;
}
- const CFX_ByteString& decoder = m_pStreamAcc->GetImageDecoder();
int ret = CreateDecoder();
if (ret != 1) {
if (!ret) {
diff --git a/core/src/fpdfdoc/doc_basic.cpp b/core/src/fpdfdoc/doc_basic.cpp
index 459ae87a0a..496ed86122 100644
--- a/core/src/fpdfdoc/doc_basic.cpp
+++ b/core/src/fpdfdoc/doc_basic.cpp
@@ -250,6 +250,7 @@ CPDF_Array* CPDF_NameTree::LookupNamedDest(CPDF_Document* pDoc, FX_BSTR sName)
}
return NULL;
}
+#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
static CFX_WideString ChangeSlashToPlatform(FX_LPCWSTR str)
{
CFX_WideString result;
@@ -257,10 +258,8 @@ static CFX_WideString ChangeSlashToPlatform(FX_LPCWSTR str)
if (*str == '/') {
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
result += ':';
-#elif _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
- result += '\\';
#else
- result += *str;
+ result += '\\';
#endif
} else {
result += *str;
@@ -269,6 +268,20 @@ static CFX_WideString ChangeSlashToPlatform(FX_LPCWSTR str)
}
return result;
}
+static CFX_WideString ChangeSlashToPDF(FX_LPCWSTR str)
+{
+ CFX_WideString result;
+ while (*str) {
+ if (*str == '\\' || *str == ':') {
+ result += '/';
+ } else {
+ result += *str;
+ }
+ str++;
+ }
+ return result;
+}
+#endif
static CFX_WideString FILESPEC_DecodeFileName(FX_WSTR filepath)
{
if (filepath.GetLength() <= 1) {
@@ -349,19 +362,6 @@ FX_BOOL CPDF_FileSpec::IsURL() const
}
return ((CPDF_Dictionary*)m_pObj)->GetString(FX_BSTRC("FS")) == FX_BSTRC("URL");
}
-static CFX_WideString ChangeSlashToPDF(FX_LPCWSTR str)
-{
- CFX_WideString result;
- while (*str) {
- if (*str == '\\' || *str == ':') {
- result += '/';
- } else {
- result += *str;
- }
- str++;
- }
- return result;
-}
CFX_WideString FILESPEC_EncodeFileName(FX_WSTR filepath)
{
if (filepath.GetLength() <= 1) {
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index 8606645baf..fce535cea8 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -748,19 +748,6 @@ FX_DWORD _GetCodePageRangeFromCharset(int charset)
}
return 1 << 21;
}
-static int CP2CharSet(int cp)
-{
- if(cp == 932) {
- return FXFONT_SHIFTJIS_CHARSET;
- } else if(cp == 936) {
- return FXFONT_GB2312_CHARSET;
- } else if(cp == 949) {
- return FXFONT_HANGEUL_CHARSET;
- } else if(cp == 950) {
- return FXFONT_CHINESEBIG5_CHARSET;
- }
- return FXFONT_DEFAULT_CHARSET;
-}
FXFT_Face CFX_FontMapper::UseInternalSubst(CFX_SubstFont* pSubstFont, int iBaseFont, int italic_angle, int weight, int picthfamily)
{
if (iBaseFont < 12) {
diff --git a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp
index e5cbf4efad..7b64b33ba1 100644
--- a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp
+++ b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp
@@ -397,28 +397,6 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device
pDevice->RestoreState();
}
-static void AddLineToPageObjects(CPDF_PageObjects* pPageObjs, FX_COLORREF crStroke,
- const CPDF_Point& pt1, const CPDF_Point& pt2)
-{
- CPDF_PathObject* pPathObj = new CPDF_PathObject;
- CPDF_PathData* pPathData = pPathObj->m_Path.GetModify();
-
- pPathData->SetPointCount(2);
- pPathData->SetPoint(0, pt1.x, pt1.y, FXPT_MOVETO);
- pPathData->SetPoint(1, pt2.x, pt2.y, FXPT_LINETO);
-
- FX_FLOAT rgb[3];
- rgb[0] = FXARGB_R(crStroke) / 255.0f;
- rgb[1] = FXARGB_G(crStroke) / 255.0f;
- rgb[2] = FXARGB_B(crStroke) / 255.0f;
- pPathObj->m_ColorState.SetStrokeColor(CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3);
-
- CFX_GraphStateData* pData = pPathObj->m_GraphState.GetModify();
- pData->m_LineWidth = 1;
-
- pPageObjs->InsertObject(pPageObjs->GetLastObjectPosition(),pPathObj);
-}
-
static void AddRectToPageObjects(CPDF_PageObjects* pPageObjs, FX_COLORREF crFill, const CPDF_Rect& rcFill)
{
CPDF_PathObject* pPathObj = new CPDF_PathObject;