summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_object.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_object.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_object.cpp b/xfa/fxfa/parser/cxfa_object.cpp
index 45e34424aa..c8cd354b48 100644
--- a/xfa/fxfa/parser/cxfa_object.cpp
+++ b/xfa/fxfa/parser/cxfa_object.cpp
@@ -42,9 +42,7 @@ void CXFA_Object::Script_ObjectClass_ClassName(CFXJSE_Value* pValue,
ThrowInvalidPropertyException();
return;
}
- CFX_WideStringC className = GetClassName();
- pValue->SetString(
- FX_UTF8Encode(className.c_str(), className.GetLength()).AsStringC());
+ pValue->SetString(FX_UTF8Encode(GetClassName()).AsStringC());
}
void CXFA_Object::ThrowInvalidPropertyException() const {
@@ -71,6 +69,5 @@ void CXFA_Object::ThrowException(const FX_WCHAR* str, ...) const {
va_start(arg_ptr, str);
wsMessage.FormatV(str, arg_ptr);
va_end(arg_ptr);
- FXJSE_ThrowMessage(
- FX_UTF8Encode(wsMessage.c_str(), wsMessage.GetLength()).AsStringC());
+ FXJSE_ThrowMessage(wsMessage.UTF8Encode().AsStringC());
}