summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_node.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-29 18:56:40 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-29 18:56:40 +0000
commitb3eb4ac763bbeb4744f4c8411d280abda6f17644 (patch)
treee3cf9517fe2833c6d730046017ddb12e43925dfd /xfa/fxfa/parser/cxfa_node.cpp
parent97b4b48685b7624cc69f73f9c57bb9e23159c8ec (diff)
downloadpdfium-b3eb4ac763bbeb4744f4c8411d280abda6f17644.tar.xz
Remove static measurement data
This CL removes the static initialized CXFA_Measurement items and replaces them with strings which are converted to measurements at runtime. Bug: pdfium:804 Change-Id: I60422b6ddff750d504a5a8b62de6ad896fc80caf Reviewed-on: https://pdfium-review.googlesource.com/19770 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index f11876f255..05228734f3 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -1352,9 +1352,8 @@ pdfium::Optional<CXFA_Measurement> CXFA_Node::GetDefaultMeasurement(
if (!value)
return {};
- CXFA_Measurement measure;
- memcpy(&measure, *value, sizeof(measure));
- return {measure};
+ WideString str = WideString(static_cast<const wchar_t*>(*value));
+ return {CXFA_Measurement(str.AsStringView())};
}
pdfium::Optional<WideString> CXFA_Node::GetDefaultCData(