build fix
[LibreOffice.git] / include / unotools / fontcvt.hxx
blobbd640bd3593be96c7d13b8f4b8fae3aa7af06510
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_UNOTOOLS_FONTCVT_HXX
21 #define INCLUDED_UNOTOOLS_FONTCVT_HXX
23 #include <unotools/unotoolsdllapi.h>
24 #include <rtl/ustring.hxx>
25 #include <tools/solar.h>
26 #include <o3tl/typed_flags_set.hxx>
29 enum class FontToSubsFontFlags
31 IMPORT = 0x01,
32 EXPORT = 0x02,
33 ONLYOLDSOSYMBOLFONTS = 0x04,
35 namespace o3tl
37 template<> struct typed_flags<FontToSubsFontFlags> : is_typed_flags<FontToSubsFontFlags, 0x07> {};
40 typedef void* FontToSubsFontConverter;
41 UNOTOOLS_DLLPUBLIC FontToSubsFontConverter CreateFontToSubsFontConverter( const OUString& rFontName, FontToSubsFontFlags nFlags );
42 UNOTOOLS_DLLPUBLIC sal_Unicode ConvertFontToSubsFontChar( FontToSubsFontConverter hConverter, sal_Unicode c );
43 UNOTOOLS_DLLPUBLIC OUString GetFontToSubsFontName( FontToSubsFontConverter hConverter );
46 class UNOTOOLS_DLLPUBLIC StarSymbolToMSMultiFont
48 public:
49 // Returns the name of the best windows symbol font which this char can be
50 // mapped to. Sets rChar to the correct position for that font. If no
51 // match found, then no name is returned, and rChar is unchanged. If you
52 // want to convert a string, you don't want to use this.
53 virtual OUString ConvertChar(sal_Unicode &rChar) = 0;
55 virtual ~StarSymbolToMSMultiFont() {}
59 // The converter will allow somewhat dubious mappings to the windows symbols fonts,
60 // that are nevertheless recognizably similar. Even in this mode there will be characters that fail.
61 // The users of this might want to make a distinction between failed characters
62 // which were inside and those outside the unicode private area.
63 UNOTOOLS_DLLPUBLIC StarSymbolToMSMultiFont *CreateStarSymbolToMSMultiFont();
65 #endif // INCLUDED_UNOTOOLS_FONTCVT_HXX
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */