LibreOffice Module shell (master) 1
Functions | Variables
fileextensions.cxx File Reference
#include <algorithm>
#include <fileextensions.hxx>
#include <rtl/character.hxx>
#include <sal/macros.h>
Include dependency graph for fileextensions.cxx:

Go to the source code of this file.

Functions

Filepath_t get_file_name_extension (const Filepath_t &file_name)
 Return the extension of a file name without the '. More...
 
File_Type_t get_file_type (const Filepath_t &file_name)
 Return the type of a file. More...
 

Variables

const std::wstring WRITER_FILE_EXTENSIONS = L"sxwstwsxgodtottodm"
 
const std::wstring CALC_FILE_EXTENSIONS = L"sxcstcodsots"
 
const std::wstring DRAW_FILE_EXTENSIONS = L"sxdstdodgotg"
 
const std::wstring IMPRESS_FILE_EXTENSIONS = L"sxistiodpotp"
 
const std::wstring MATH_FILE_EXTENSIONS = L"sxmodf"
 
const std::wstring WEB_FILE_EXTENSIONS = L"oth"
 
const std::wstring DATABASE_FILE_EXTENSIONS = L"odb"
 
const FileExtensionEntry OOFileExtensionTable []
 
const size_t OOFileExtensionTableSize = SAL_N_ELEMENTS(OOFileExtensionTable)
 

Function Documentation

◆ get_file_name_extension()

Filepath_t get_file_name_extension ( const Filepath_t file_name)

Return the extension of a file name without the '.

'

Definition at line 66 of file fileextensions.cxx.

References idx.

Referenced by get_file_type(), and CInfoTip::GetInfoTip().

◆ get_file_type()

File_Type_t get_file_type ( const Filepath_t file_name)

Variable Documentation

◆ CALC_FILE_EXTENSIONS

const std::wstring CALC_FILE_EXTENSIONS = L"sxcstcodsots"

Definition at line 27 of file fileextensions.cxx.

Referenced by get_file_type().

◆ DATABASE_FILE_EXTENSIONS

const std::wstring DATABASE_FILE_EXTENSIONS = L"odb"

Definition at line 32 of file fileextensions.cxx.

Referenced by get_file_type().

◆ DRAW_FILE_EXTENSIONS

const std::wstring DRAW_FILE_EXTENSIONS = L"sxdstdodgotg"

Definition at line 28 of file fileextensions.cxx.

Referenced by get_file_type().

◆ IMPRESS_FILE_EXTENSIONS

const std::wstring IMPRESS_FILE_EXTENSIONS = L"sxistiodpotp"

Definition at line 29 of file fileextensions.cxx.

Referenced by get_file_type().

◆ MATH_FILE_EXTENSIONS

const std::wstring MATH_FILE_EXTENSIONS = L"sxmodf"

Definition at line 30 of file fileextensions.cxx.

Referenced by get_file_type().

◆ OOFileExtensionTable

const FileExtensionEntry OOFileExtensionTable[]
Initial value:
= {
{ ".sxw", L".sxw", L"soffice.StarWriterDocument.6" },
{ ".sxc", L".sxc", L"soffice.StarCalcDocument.6" },
{ ".sxi", L".sxi", L"soffice.StarImpressDocument.6" },
{ ".sxd", L".sxd", L"soffice.StarDrawDocument.6" },
{ ".sxm", L".sxm", L"soffice.StarMathDocument.6" },
{ ".stw", L".stw", L"soffice.StarWriterTemplate.6" },
{ ".sxg", L".sxg", L"soffice.StarWriterGlobalDocument.6" },
{ ".std", L".std", L"soffice.StarDrawTemplate.6" },
{ ".sti", L".sti", L"soffice.StarImpressTemplate.6" },
{ ".stc", L".stc", L"soffice.StarCalcTemplate.6" },
{ ".odt", L".odt", L"LibreOffice.WriterDocument.1" },
{ ".ott", L".ott", L"LibreOffice.WriterTemplate.1" },
{ ".odm", L".odm", L"LibreOffice.WriterGlobalDocument.1" },
{ ".oth", L".oth", L"LibreOffice.WriterWebTemplate.1" },
{ ".ods", L".ods", L"LibreOffice.CalcDocument.1" },
{ ".ots", L".ots", L"LibreOffice.CalcTemplate.1" },
{ ".odg", L".odg", L"LibreOffice.DrawDocument.1" },
{ ".otg", L".otg", L"LibreOffice.DrawTemplate.1" },
{ ".odp", L".odp", L"LibreOffice.ImpressDocument.1" },
{ ".otp", L".otp", L"LibreOffice.ImpressTemplate.1" },
{ ".odf", L".odf", L"LibreOffice.MathDocument.1" },
{ ".odb", L".odb", L"LibreOffice.DatabaseDocument.1" }
}

Definition at line 34 of file fileextensions.cxx.

◆ OOFileExtensionTableSize

const size_t OOFileExtensionTableSize = SAL_N_ELEMENTS(OOFileExtensionTable)

Definition at line 60 of file fileextensions.cxx.

◆ WEB_FILE_EXTENSIONS

const std::wstring WEB_FILE_EXTENSIONS = L"oth"

Definition at line 31 of file fileextensions.cxx.

Referenced by get_file_type().

◆ WRITER_FILE_EXTENSIONS

const std::wstring WRITER_FILE_EXTENSIONS = L"sxwstwsxgodtottodm"

Definition at line 26 of file fileextensions.cxx.

Referenced by get_file_type().