[Libreoffice-commits] core.git: Branch 'feature/orcus-update' - framework/source

Kohei Yoshida kohei.yoshida at gmail.com
Mon Apr 8 22:21:44 PDT 2013


 framework/source/loadenv/loadenv.cxx |   29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

New commits:
commit 0b43af10a466f9dfd249ad559c9b21bc7d91256f
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Apr 9 00:55:02 2013 -0400

    Add xlsx and ods bits. Those file types are still not loadable.
    
    Change-Id: Icb75313a082475b73d560685fec2c2f3be8538d7

diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 78f8f27..33956f1 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
 
 }
 


More information about the Libreoffice-commits mailing list