summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2018-02-16 17:23:25 +0100
committerAndras Timar <andras.timar@collabora.com>2018-02-19 18:15:01 +0100
commit6a914ecbb95e565de51e33e4daeab3c78baeab2b (patch)
tree7dcbb042da561d8704723d45cd9cca14e41866f4
parent0cec977fcd21f6ff54a4379a869a63a055a95f20 (diff)
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.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--wsd/LOOLWSD.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index c1f603f5d..fbdae3393 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,