diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-09 00:55:02 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-09 13:01:24 -0400 |
commit | 868ce95a3cc286bd3cd7b16feb460eb85a414a84 (patch) | |
tree | fb4582f228c4fac42409853c0e6da29b6086a989 /framework | |
parent | 6374df20c2a8378209cce21c0e9689e65b8bd9a2 (diff) |
Add xlsx and ods bits. Those file types are still not loadable.
Change-Id: Icb75313a082475b73d560685fec2c2f3be8538d7
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 78f8f27b0848..33956f1e96a1 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -710,13 +710,6 @@ LoadEnv::EContentType LoadEnv::classifyContent(const OUString& namespace { -#if 0 -// TODO: We will reinstate this function later, so don't remove this! -bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>&, OUString&, OUString&) -{ - return false; -} -#else bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>& rDescriptor, OUString& rType, OUString& rFilter) { // depending on the experimental mode @@ -741,25 +734,31 @@ bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>& rDescrip if (aURL.isEmpty() || aURL.copy(0,8).equalsIgnoreAsciiCase("private:")) return false; - if(aURL.endsWith(".gnumeric")) + // 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. + + if (aURL.endsWith(".gnumeric")) + { + rType = "generic_Text"; + rFilter = "gnumeric"; + return true; + } + else if (aURL.endsWith(".xlsx")) { rType = "generic_Text"; - rFilter = "orcus-gnumeric"; + rFilter = "xlsx"; return true; } -#if 0 - else if (aURL.endsWith(".csv")) + else if (aURL.endsWith(".ods")) { - // Use .csv as the first test file type. rType = "generic_Text"; - rFilter = "orcus-test-filter"; + rFilter = "ods"; return true; } -#endif return false; } -#endif } |