wsd/LOOLWSD.hpp |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 6a914ecbb95e565de51e33e4daeab3c78baeab2b
Author: Andras Timar <andras.ti...@collabora.com>
Date:   Fri Feb 16 17:23:25 2018 +0100

    tdf#115595 open editable documents with upper case or mixed case file 
extensions in edit mode
    
    Change-Id: I6ea60926ce0ec4d1323080ffec5152d2bbeefc31
    Reviewed-on: https://gerrit.libreoffice.org/49867
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Tested-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index c1f603f5..fbdae339 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -10,6 +10,7 @@
 #ifndef INCLUDED_LOOLWSD_HPP
 #define INCLUDED_LOOLWSD_HPP
 
+#include <algorithm>
 #include <atomic>
 #include <map>
 #include <set>
@@ -92,10 +93,12 @@ public:
         return LOOLWSD::SSLTermination.get();
     }
 
-    /// Return truee iff extension is marked as view action in discovery.xml.
+    /// Return true iff extension is marked as view action in discovery.xml.
     static bool IsViewFileExtension(const std::string& extension)
     {
-        return EditFileExtensions.find(extension) == EditFileExtensions.end();
+        std::string lowerCaseExtension = extension;
+        std::transform(lowerCaseExtension.begin(), lowerCaseExtension.end(), 
lowerCaseExtension.begin(), ::tolower);
+        return EditFileExtensions.find(lowerCaseExtension) == 
EditFileExtensions.end();
     }
 
     /// Returns the value of the specified application configuration,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to