diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-09 17:08:36 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-13 01:54:35 -0400 |
commit | 644f122a2d2b49f3aff9755093872bb38565ee5d (patch) | |
tree | 99b8ce1298ba8d69a203f8407811ee9c306f544a /framework | |
parent | 44358ce0b0c2ee5de981fdce66849b3f3ac32390 (diff) |
Use environment variable LIBO_USE_ORCUS to decide whether or not to use orcus.
This way we won't need to re-compile every time we need to switch between.
Change-Id: I7d56a838c420a645ce8bebe0f0d9beaa78476fd6
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index c82422218c59..18202546e894 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -80,6 +80,7 @@ #include <unotools/ucbhelper.hxx> #include <comphelper/configurationhelper.hxx> #include <rtl/ustrbuf.hxx> +#include "rtl/bootstrap.hxx" #include <vcl/svapp.hxx> const char PROP_TYPES[] = "Types"; @@ -734,6 +735,10 @@ bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>& rDescrip if (aURL.isEmpty() || aURL.copy(0,8).equalsIgnoreAsciiCase("private:")) return false; + OUString aUseOrcus; + rtl::Bootstrap::get("LIBO_USE_ORCUS", aUseOrcus); + bool bUseOrcus = (aUseOrcus == "YES"); + // TODO : Type must be set to be generic_Text (or any other type that // exists) in order to find a usable loader. Exploit it as a temporary // hack. @@ -744,7 +749,11 @@ bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>& rDescrip rFilter = "gnumeric"; return true; } - else if (aURL.endsWith(".xlsx")) + + if (!bUseOrcus) + return false; + + if (aURL.endsWith(".xlsx")) { rType = "generic_Text"; rFilter = "xlsx"; |