LibreOffice Module vcl (master) 1
FilterConfigCache.hxx
Go to the documentation of this file.
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 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_VCL_SOURCE_FILTER_FILTERCONFIGCACHE_HXX
21#define INCLUDED_VCL_SOURCE_FILTER_FILTERCONFIGCACHE_HXX
22
23#include <rtl/ustring.hxx>
24#include <vector>
25
28{
30 {
32 OUString sType;
33 std::vector< OUString > lExtensionList;
34 OUString sUIName;
35
36 OUString sMediaType;
37 OUString sFilterType;
38
39 sal_Int32 nFlags;
40
41 // user data
42 OUString sFilterName;
44
45 void CreateFilterName( const OUString& rUserDataEntry );
46 OUString GetShortName( );
47
48 static const char* InternalPixelFilterNameList[];
49 };
50
51
52 std::vector< FilterConfigCacheEntry > aImport;
53 std::vector< FilterConfigCacheEntry > aExport;
54
55 static const char* InternalFilterListForSvxLight[];
56
57 void ImplInit();
58 void ImplInitSmart();
59
60public:
61
62 sal_uInt16 GetImportFormatCount() const
63 { return sal::static_int_cast< sal_uInt16 >(aImport.size()); };
64 sal_uInt16 GetImportFormatNumber( std::u16string_view rFormatName );
65 sal_uInt16 GetImportFormatNumberForShortName( std::u16string_view rShortName );
66 sal_uInt16 GetImportFormatNumberForTypeName( std::u16string_view rType );
67 sal_uInt16 GetImportFormatNumberForExtension( std::u16string_view rExt );
68 OUString GetImportFilterName( sal_uInt16 nFormat );
69 OUString GetImportFormatName( sal_uInt16 nFormat );
70 OUString GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0);
71 OUString GetImportFormatMediaType( sal_uInt16 nFormat );
72 OUString GetImportFormatShortName( sal_uInt16 nFormat );
73 OUString GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry );
74 OUString GetImportFilterType( sal_uInt16 nFormat );
75 OUString GetImportFilterTypeName( sal_uInt16 nFormat );
76
77
78 sal_uInt16 GetExportFormatCount() const
79 { return sal::static_int_cast< sal_uInt16 >(aExport.size()); };
80 sal_uInt16 GetExportFormatNumber( std::u16string_view rFormatName );
81 sal_uInt16 GetExportFormatNumberForMediaType( std::u16string_view rMediaType );
82 sal_uInt16 GetExportFormatNumberForShortName( std::u16string_view rShortName );
83 sal_uInt16 GetExportFormatNumberForTypeName( std::u16string_view rType );
84 OUString GetExportFilterName( sal_uInt16 nFormat );
85 OUString GetExportFormatName( sal_uInt16 nFormat );
86 OUString GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
87 OUString GetExportFormatMediaType( sal_uInt16 nFormat );
88 OUString GetExportFormatShortName( sal_uInt16 nFormat );
89 OUString GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry );
90 OUString GetExportInternalFilterName( sal_uInt16 nFormat );
91
92 bool IsExportPixelFormat( sal_uInt16 nFormat );
93
94 explicit FilterConfigCache( bool bUseConfig );
96};
97
98#endif // INCLUDED_VCL_SOURCE_FILTER_FILTERCONFIGCACHE_HXX
99
100/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Cache to keep list of graphic filters + the filters themselves.
bool IsExportPixelFormat(sal_uInt16 nFormat)
sal_uInt16 GetExportFormatNumberForShortName(std::u16string_view rShortName)
OUString GetImportFormatName(sal_uInt16 nFormat)
sal_uInt16 GetImportFormatNumber(std::u16string_view rFormatName)
sal_uInt16 GetExportFormatNumber(std::u16string_view rFormatName)
sal_uInt16 GetImportFormatNumberForShortName(std::u16string_view rShortName)
FilterConfigCache(bool bUseConfig)
OUString GetExportWildcard(sal_uInt16 nFormat, sal_Int32 nEntry)
OUString GetImportFormatShortName(sal_uInt16 nFormat)
sal_uInt16 GetImportFormatNumberForExtension(std::u16string_view rExt)
get the index of the filter that matches this extension
OUString GetImportWildcard(sal_uInt16 nFormat, sal_Int32 nEntry)
OUString GetImportFilterTypeName(sal_uInt16 nFormat)
OUString GetExportFilterName(sal_uInt16 nFormat)
static const char * InternalFilterListForSvxLight[]
OUString GetExportFormatShortName(sal_uInt16 nFormat)
OUString GetExportFormatName(sal_uInt16 nFormat)
OUString GetExportFormatExtension(sal_uInt16 nFormat, sal_Int32 nEntry=0)
OUString GetImportFilterName(sal_uInt16 nFormat)
sal_uInt16 GetExportFormatNumberForTypeName(std::u16string_view rType)
std::vector< FilterConfigCacheEntry > aExport
sal_uInt16 GetImportFormatCount() const
sal_uInt16 GetExportFormatNumberForMediaType(std::u16string_view rMediaType)
sal_uInt16 GetImportFormatNumberForTypeName(std::u16string_view rType)
OUString GetImportFormatExtension(sal_uInt16 nFormat, sal_Int32 nEntry=0)
OUString GetImportFilterType(sal_uInt16 nFormat)
sal_uInt16 GetExportFormatCount() const
OUString GetExportFormatMediaType(sal_uInt16 nFormat)
OUString GetImportFormatMediaType(sal_uInt16 nFormat)
std::vector< FilterConfigCacheEntry > aImport
OUString GetExportInternalFilterName(sal_uInt16 nFormat)
void CreateFilterName(const OUString &rUserDataEntry)