diff options
Diffstat (limited to 'xfa/fxfa/parser/cxfa_xmllocale.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_xmllocale.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xfa/fxfa/parser/cxfa_xmllocale.cpp b/xfa/fxfa/parser/cxfa_xmllocale.cpp index 659c7bbefe..ce68c71e19 100644 --- a/xfa/fxfa/parser/cxfa_xmllocale.cpp +++ b/xfa/fxfa/parser/cxfa_xmllocale.cpp @@ -16,6 +16,15 @@ #include "xfa/fxfa/parser/cxfa_timezoneprovider.h" #include "xfa/fxfa/parser/xfa_utils.h" +// static +std::unique_ptr<CXFA_XMLLocale> CXFA_XMLLocale::Create( + pdfium::span<uint8_t> data) { + std::unique_ptr<CXML_Element> pLocale = + CXML_Element::Parse(data.data(), data.size()); + return pLocale ? pdfium::MakeUnique<CXFA_XMLLocale>(std::move(pLocale)) + : nullptr; +} + CXFA_XMLLocale::CXFA_XMLLocale(std::unique_ptr<CXML_Element> pLocaleData) : m_pLocaleData(std::move(pLocaleData)) {} |