summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-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
4 files changed, 16 insertions, 47 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) {