bump product version to 6.4.0.3
[LibreOffice.git] / vcl / source / filter / FilterConfigCache.hxx
blobec1c2dc46743bd000885ad4da7a32f8c71e032bc
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_VCL_SOURCE_FILTER_FILTERCONFIGCACHE_HXX
21 #define INCLUDED_VCL_SOURCE_FILTER_FILTERCONFIGCACHE_HXX
23 #include <rtl/ustring.hxx>
24 #include <vector>
26 /** Cache to keep list of graphic filters + the filters themselves. */
27 class FilterConfigCache
29 struct FilterConfigCacheEntry
31 OUString sInternalFilterName;
32 OUString sType;
33 std::vector< OUString > lExtensionList;
34 OUString sUIName;
35 OUString sExternalFilterName;
37 OUString sMediaType;
38 OUString sFilterType;
40 sal_Int32 nFlags;
42 // user data
43 OUString sFilterName;
44 bool bIsInternalFilter : 1;
45 bool bIsPixelFormat : 1;
47 void CreateFilterName( const OUString& rUserDataEntry );
48 OUString GetShortName( );
50 static const char* InternalPixelFilterNameList[];
51 static const char* InternalVectorFilterNameList[];
52 static const char* ExternalPixelFilterNameList[];
56 std::vector< FilterConfigCacheEntry > aImport;
57 std::vector< FilterConfigCacheEntry > aExport;
59 static const char* InternalFilterListForSvxLight[];
61 void ImplInit();
62 void ImplInitSmart();
64 public:
66 sal_uInt16 GetImportFormatCount() const
67 { return sal::static_int_cast< sal_uInt16 >(aImport.size()); };
68 sal_uInt16 GetImportFormatNumber( const OUString& rFormatName );
69 sal_uInt16 GetImportFormatNumberForShortName( const OUString& rShortName );
70 sal_uInt16 GetImportFormatNumberForTypeName( const OUString& rType );
71 sal_uInt16 GetImportFormatNumberForExtension( const OUString& rExt );
72 OUString GetImportFilterName( sal_uInt16 nFormat );
73 OUString GetImportFormatName( sal_uInt16 nFormat );
74 OUString GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0);
75 OUString GetImportFormatMediaType( sal_uInt16 nFormat );
76 OUString GetImportFormatShortName( sal_uInt16 nFormat );
77 OUString GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry );
78 OUString GetImportFilterType( sal_uInt16 nFormat );
79 OUString GetImportFilterTypeName( sal_uInt16 nFormat );
80 OUString GetExternalFilterName(sal_uInt16 nFormat, bool bExport);
83 bool IsImportInternalFilter( sal_uInt16 nFormat );
85 sal_uInt16 GetExportFormatCount() const
86 { return sal::static_int_cast< sal_uInt16 >(aExport.size()); };
87 sal_uInt16 GetExportFormatNumber( const OUString& rFormatName );
88 sal_uInt16 GetExportFormatNumberForMediaType( const OUString& rMediaType );
89 sal_uInt16 GetExportFormatNumberForShortName( const OUString& rShortName );
90 sal_uInt16 GetExportFormatNumberForTypeName( const OUString& rType );
91 OUString GetExportFilterName( sal_uInt16 nFormat );
92 OUString GetExportFormatName( sal_uInt16 nFormat );
93 OUString GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
94 OUString GetExportFormatMediaType( sal_uInt16 nFormat );
95 OUString GetExportFormatShortName( sal_uInt16 nFormat );
96 OUString GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry );
97 OUString GetExportInternalFilterName( sal_uInt16 nFormat );
99 bool IsExportInternalFilter( sal_uInt16 nFormat );
100 bool IsExportPixelFormat( sal_uInt16 nFormat );
102 explicit FilterConfigCache( bool bUseConfig );
103 ~FilterConfigCache();
106 #endif // INCLUDED_VCL_SOURCE_FILTER_FILTERCONFIGCACHE_HXX
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */