Lines Matching refs:std
33 const std::string WRITER_FILE_EXTENSIONS = "sxwstwsxgodtottodm";
34 const std::string CALC_FILE_EXTENSIONS = "sxcstcodsots";
35 const std::string DRAW_FILE_EXTENSIONS = "sxdstdodgotg";
36 const std::string IMPRESS_FILE_EXTENSIONS = "sxistiodpotp";
37 const std::string MATH_FILE_EXTENSIONS = "sxmodf";
38 const std::string WEB_FILE_EXTENSIONS = "oth";
39 const std::string DATABASE_FILE_EXTENSIONS = "odb";
73 std::string get_file_name_extension(const std::string& file_name) in get_file_name_extension()
75 std::string::size_type idx = file_name.find_last_of("."); in get_file_name_extension()
77 if (std::string::npos != idx++) in get_file_name_extension()
78 return std::string(file_name.begin() + idx, file_name.end()); in get_file_name_extension()
80 return std::string(); in get_file_name_extension()
94 File_Type_t get_file_type(const std::string& file_name) in get_file_type()
96 std::string fext = get_file_name_extension(file_name); in get_file_type()
97 std::transform(fext.begin(), fext.end(), fext.begin(), easytolower); in get_file_type()
99 if (std::string::npos != WRITER_FILE_EXTENSIONS.find(fext)) in get_file_type()
101 else if (std::string::npos != CALC_FILE_EXTENSIONS.find(fext)) in get_file_type()
103 else if (std::string::npos != DRAW_FILE_EXTENSIONS.find(fext)) in get_file_type()
105 else if (std::string::npos != IMPRESS_FILE_EXTENSIONS.find(fext)) in get_file_type()
107 else if (std::string::npos != MATH_FILE_EXTENSIONS.find(fext)) in get_file_type()
109 else if (std::string::npos != WEB_FILE_EXTENSIONS.find(fext)) in get_file_type()
111 else if (std::string::npos != DATABASE_FILE_EXTENSIONS.find(fext)) in get_file_type()