cba8c933d1
Without this, the document model side would not know what grammer to use to parse formula expressions. Change-Id: I7e921f9c0f9b088fb98fe126ad4a84db006c8747 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157413 Tested-by: Jenkins Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
17 lines
669 B
Groff
17 lines
669 B
Groff
diff --git a/src/liborcus/orcus_gnumeric.cpp b/src/liborcus/orcus_gnumeric.cpp
|
|
index 76c13682..849759ba 100644
|
|
--- a/src/liborcus/orcus_gnumeric.cpp
|
|
+++ b/src/liborcus/orcus_gnumeric.cpp
|
|
@@ -144,6 +144,12 @@ void orcus_gnumeric::read_stream(std::string_view stream)
|
|
if (!decompress_gzip(stream.data(), stream.size(), file_content))
|
|
return;
|
|
|
|
+ if (auto* gs = mp_impl->mp_factory->get_global_settings(); gs)
|
|
+ {
|
|
+ gs->set_origin_date(1899, 12, 30);
|
|
+ gs->set_default_formula_grammar(spreadsheet::formula_grammar_t::gnumeric);
|
|
+ }
|
|
+
|
|
mp_impl->read_content_xml(file_content, get_config());
|
|
mp_impl->mp_factory->finalize();
|
|
}
|