1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SHELL_INC_INTERNAL_FILEEXTENSIONS_HXX
21 #define INCLUDED_SHELL_INC_INTERNAL_FILEEXTENSIONS_HXX
23 #include "internal/global.hxx"
27 // A simple table with information about the currently used OO file extensions
28 // for instance ".sxw" and information about windows registry keys which are
29 // necessary for properly registering of the shell extensions
31 /** A FileExtensionEntry consists of the extension as ansi and as
32 unicode string and of the currently used registry forward key
35 struct FileExtensionEntry
37 const char* ExtensionAnsi
; // e.g. ".sxw"
38 const wchar_t* ExtensionUnicode
; // e.g. L".sxw"
39 const char* RegistryForwardKey
; // e.g. "soffice.StarWriterDocument.6"
42 extern FileExtensionEntry OOFileExtensionTable
[];
44 extern size_t OOFileExtensionTableSize
;
47 /** Return the extension of a file
50 std::string
get_file_name_extension(const std::string
& file_name
);
53 /** Return the type of a file
56 enum File_Type_t
{ UNKNOWN
, WRITER
, CALC
, DRAW
, IMPRESS
, MATH
, WEB
, DATABASE
};
58 File_Type_t
get_file_type(const std::string
& file_name
);
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */