summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_basic.cpp
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 /core/src/fpdfdoc/doc_basic.cpp
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
Diffstat (limited to 'core/src/fpdfdoc/doc_basic.cpp')
-rw-r--r--core/src/fpdfdoc/doc_basic.cpp32
1 files changed, 16 insertions, 16 deletions
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) {