diff options
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 } |