summaryrefslogtreecommitdiff
path: root/shell/source/win32/shlxthandler/util/fileextensions.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'shell/source/win32/shlxthandler/util/fileextensions.cxx')
-rwxr-xr-x[-rw-r--r--]shell/source/win32/shlxthandler/util/fileextensions.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/shell/source/win32/shlxthandler/util/fileextensions.cxx b/shell/source/win32/shlxthandler/util/fileextensions.cxx
index db32e7b0b9..3e29ae80a6 100644..100755
--- a/shell/source/win32/shlxthandler/util/fileextensions.cxx
+++ b/shell/source/win32/shlxthandler/util/fileextensions.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_shell.hxx"
+#include "algorithm"
#include "internal/fileextensions.hxx"
#include <sal/macros.h>
@@ -89,10 +90,18 @@ std::string get_file_name_extension(const std::string& file_name)
/** Return the type of a file
*/
+char easytolower( char in )
+{
+ if( in<='Z' && in>='A' )
+ return in-('Z'-'z');
+ return in;
+}
+
File_Type_t get_file_type(const std::string& file_name)
{
std::string fext = get_file_name_extension(file_name);
-
+ std::transform(fext.begin(), fext.end(), fext.begin(), easytolower);
+
if (std::string::npos != WRITER_FILE_EXTENSIONS.find(fext))
return WRITER;
else if (std::string::npos != CALC_FILE_EXTENSIONS.find(fext))