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

Unified Diff: fpdfsdk/src/javascript/resource.cpp

Issue 955273003: Remove unused IDS_ constants from pdfium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 80 Cols 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 | « fpdfsdk/include/javascript/resource.h ('k') | pdfium.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/resource.cpp
diff --git a/fpdfsdk/src/javascript/resource.cpp b/fpdfsdk/src/javascript/resource.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1c453dcda778325de2a5b225f38a92abb8f60d4c
--- /dev/null
+++ b/fpdfsdk/src/javascript/resource.cpp
@@ -0,0 +1,47 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#include "../../include/javascript/resource.h"
+
+CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT id)
+{
+ switch (id)
+ {
+ case IDS_STRING_JSALERT:
+ return L"Alert";
+ case IDS_STRING_JSPARAMERROR:
+ return L"Incorrect number of parameters passed to function.";
+ case IDS_STRING_JSAFNUMBER_KEYSTROKE:
+ return L"The input value is invalid.";
+ case IDS_STRING_JSPARAM_TOOLONG:
+ return L"The input value is too long.";
+ case IDS_STRING_JSPARSEDATE:
+ return L"The input value can't be parsed as a valid date/time (%s).";
+ case IDS_STRING_JSRANGE1:
+ return L"The input value must be greater than or equal to %s"
+ L" and less than or equal to %s.";
+ case IDS_STRING_JSRANGE2:
+ return L"The input value must be greater than or equal to %s.";
+ case IDS_STRING_JSRANGE3:
+ return L"The input value must be less than or equal to %s.";
+ case IDS_STRING_NOTSUPPORT:
+ return L"Operation not supported.";
+ case IDS_STRING_JSBUSY:
+ return L"System is busy.";
+ case IDS_STRING_JSEVENT:
+ return L"Duplicate formfield event found.";
+ case IDS_STRING_RUN:
+ return L"Script ran successfully.";
+ case IDS_STRING_JSPRINT1:
+ return L"The second parameter can't be converted to a Date.";
+ case IDS_STRING_JSPRINT2:
+ return L"The second parameter is an invalid Date!";
+ case IDS_JSPARAM_INCORRECT:
+ return L"Global value not found.";
+ default:
+ return L"";
+ }
+}
« no previous file with comments | « fpdfsdk/include/javascript/resource.h ('k') | pdfium.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698