summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-03 15:45:10 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-03 21:08:58 +0000
commit3cdcfeb04b5c496199d8c88ebd2402c3db4413ab (patch)
treeabab4708b78aae2bec75ae6d1e9446aec863d159 /fpdfsdk/fpdfxfa
parente8f6897c2a80242217da785318b427c82c00ad40 (diff)
downloadpdfium-3cdcfeb04b5c496199d8c88ebd2402c3db4413ab.tar.xz
Create individual exception methods.
This CL removes the LoadString method from CPDFXFA_Context and, instead, creates individual exception methods for each of the loaded strings and calls as needed. BUG=pdfium:549 Change-Id: I1d975f01f13f45a885946a9952f24b13387dc3e4 Reviewed-on: https://pdfium-review.googlesource.com/2135 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.cpp42
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.h1
2 files changed, 0 insertions, 43 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
index 29888c314e..113a74e22e 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
@@ -358,48 +358,6 @@ bool CPDFXFA_Context::PutRequestURL(const CFX_WideString& wsURL,
wsEncode.c_str());
}
-CFX_WideString CPDFXFA_Context::LoadString(int32_t iStringID) {
- switch (iStringID) {
- case XFA_IDS_INVAlID_PROP_SET:
- return L"Invalid property set operation.";
- case XFA_IDS_NOT_DEFAUL_VALUE:
- return L" doesn't have a default property.";
- case XFA_IDS_UNABLE_SET_LANGUAGE:
- return L"Unable to set language value.";
- case XFA_IDS_UNABLE_SET_NUMPAGES:
- return L"Unable to set numPages value.";
- case XFA_IDS_UNABLE_SET_PLATFORM:
- return L"Unable to set platform value.";
- case XFA_IDS_UNABLE_SET_VARIATION:
- return L"Unable to set variation value.";
- case XFA_IDS_UNABLE_SET_VERSION:
- return L"Unable to set version value.";
- case XFA_IDS_UNABLE_SET_READY:
- return L"Unable to set ready value.";
- case XFA_IDS_COMPILER_ERROR:
- return L"Compiler error.";
- case XFA_IDS_DIVIDE_ZERO:
- return L"Divide by zero.";
- case XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT:
- return L"An attempt was made to reference property '%s' of a non-object "
- L"in SOM expression %s.";
- case XFA_IDS_INDEX_OUT_OF_BOUNDS:
- return L"Index value is out of bounds.";
- case XFA_IDS_INCORRECT_NUMBER_OF_METHOD:
- return L"Incorrect number of parameters calling method '%s'.";
- case XFA_IDS_ARGUMENT_MISMATCH:
- return L"Argument mismatch in property or function argument.";
- case XFA_IDS_NOT_HAVE_PROPERTY:
- return L"'%s' doesn't have property '%s'.";
- case XFA_IDS_VIOLATE_BOUNDARY:
- return L"The element [%s] has violated its allowable number of "
- L"occurrences.";
- case XFA_IDS_SERVER_DENY:
- return L"Server does not permit.";
- }
- return L"";
-}
-
IFWL_AdapterTimerMgr* CPDFXFA_Context::GetTimerMgr() {
CXFA_FWLAdapterTimerMgr* pAdapter = nullptr;
if (m_pFormFillEnv)
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
index 52b16891de..de3f39cb2a 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
@@ -80,7 +80,6 @@ class CPDFXFA_Context : public IXFA_AppProvider {
const CFX_WideString& wsData,
const CFX_WideString& wsEncode) override;
- CFX_WideString LoadString(int32_t iStringID) override;
IFWL_AdapterTimerMgr* GetTimerMgr() override;
protected: