Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: core/src/fpdfdoc/doc_basic.cpp

Issue 966023002: Merge to XFA: Cleanup: Fix some unused-function warnings. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp ('k') | core/src/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_basic.cpp
diff --git a/core/src/fpdfdoc/doc_basic.cpp b/core/src/fpdfdoc/doc_basic.cpp
index 459ae87a0a38f965c40b64c01bac816f98d48bd7..496ed8612279828301aef7bb1e6083127ef79991 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) {
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp ('k') | core/src/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698