| 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
| 2 | /* |
| 3 | * This file is part of the LibreOffice project. |
| 4 | * |
| 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/. |
| 8 | */ |
| 9 | |
| 10 | #ifndef INCLUDED_COMPHELPER_GMH_HXX |
| 11 | #define INCLUDED_COMPHELPER_GMH_HXX |
| 12 | |
| 13 | #include <sal/config.h> |
| 14 | |
| 15 | #include <string_view> |
| 16 | |
| 17 | #include <comphelper/comphelperdllapi.h> |
| 18 | #include <rtl/ustring.hxx> |
| 19 | |
| 20 | namespace com::sun::star::graphic |
| 21 | { |
| 22 | class XGraphic; |
| 23 | } |
| 24 | namespace com::sun::star::io |
| 25 | { |
| 26 | class XInputStream; |
| 27 | } |
| 28 | namespace com::sun::star::uno |
| 29 | { |
| 30 | template <class interface_type> class Reference; |
| 31 | } |
| 32 | |
| 33 | enum class ConvertDataFormat; |
| 34 | |
| 35 | namespace comphelper |
| 36 | { |
| 37 | class COMPHELPER_DLLPUBLIC GraphicMimeTypeHelper |
| 38 | { |
| 39 | public: |
| 40 | static OUString GetMimeTypeForExtension(std::string_view rExt); |
| 41 | static OUString |
| 42 | GetMimeTypeForXGraphic(const css::uno::Reference<css::graphic::XGraphic>& xGraphic); |
| 43 | static OUString |
| 44 | GetMimeTypeForImageStream(const css::uno::Reference<css::io::XInputStream>& xInputStream); |
| 45 | static OUString GetMimeTypeForConvertDataFormat(ConvertDataFormat convertDataFormat); |
| 46 | static char const* GetExtensionForConvertDataFormat(ConvertDataFormat nFormat); |
| 47 | }; |
| 48 | } |
| 49 | |
| 50 | #endif // INCLUDED_COMPHELPER_GMH_HXX |
| 51 | |
| 52 | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |