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 .
22 #include <rtl/ustring.hxx>
25 /** Cache to keep list of graphic filters + the filters themselves. */
26 class FilterConfigCache
28 struct FilterConfigCacheEntry
30 OUString sInternalFilterName
;
32 std::vector
< OUString
> lExtensionList
;
42 bool bIsPixelFormat
: 1;
44 void CreateFilterName( const OUString
& rUserDataEntry
);
45 OUString
GetShortName( );
47 static const char* InternalPixelFilterNameList
[];
51 std::vector
< FilterConfigCacheEntry
> aImport
;
52 std::vector
< FilterConfigCacheEntry
> aExport
;
54 static const char* InternalFilterListForSvxLight
[];
61 sal_uInt16
GetImportFormatCount() const
62 { return sal::static_int_cast
< sal_uInt16
>(aImport
.size()); };
63 sal_uInt16
GetImportFormatNumber( std::u16string_view rFormatName
);
64 sal_uInt16
GetImportFormatNumberForShortName( std::u16string_view rShortName
);
65 sal_uInt16
GetImportFormatNumberForTypeName( std::u16string_view rType
);
66 sal_uInt16
GetImportFormatNumberForExtension( std::u16string_view rExt
);
67 OUString
GetImportFilterName( sal_uInt16 nFormat
);
68 OUString
GetImportFormatName( sal_uInt16 nFormat
);
69 OUString
GetImportFormatExtension( sal_uInt16 nFormat
, sal_Int32 nEntry
= 0);
70 OUString
GetImportFormatMediaType( sal_uInt16 nFormat
);
71 OUString
GetImportFormatShortName( sal_uInt16 nFormat
);
72 OUString
GetImportWildcard( sal_uInt16 nFormat
, sal_Int32 nEntry
);
73 OUString
GetImportFilterType( sal_uInt16 nFormat
);
74 OUString
GetImportFilterTypeName( sal_uInt16 nFormat
);
77 sal_uInt16
GetExportFormatCount() const
78 { return sal::static_int_cast
< sal_uInt16
>(aExport
.size()); };
79 sal_uInt16
GetExportFormatNumber( std::u16string_view rFormatName
);
80 sal_uInt16
GetExportFormatNumberForMediaType( std::u16string_view rMediaType
);
81 sal_uInt16
GetExportFormatNumberForShortName( std::u16string_view rShortName
);
82 sal_uInt16
GetExportFormatNumberForTypeName( std::u16string_view rType
);
83 OUString
GetExportFilterName( sal_uInt16 nFormat
);
84 OUString
GetExportFormatName( sal_uInt16 nFormat
);
85 OUString
GetExportFormatExtension( sal_uInt16 nFormat
, sal_Int32 nEntry
= 0 );
86 OUString
GetExportFormatMediaType( sal_uInt16 nFormat
);
87 OUString
GetExportFormatShortName( sal_uInt16 nFormat
);
88 OUString
GetExportWildcard( sal_uInt16 nFormat
, sal_Int32 nEntry
);
89 OUString
GetExportInternalFilterName( sal_uInt16 nFormat
);
91 bool IsExportPixelFormat( sal_uInt16 nFormat
);
93 explicit FilterConfigCache( bool bUseConfig
);
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */