update credits
[LibreOffice.git] / include / unotools / fontoptions.hxx
blobd37423138e0058e7d20daa1f4d922159b1a4d95e
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 .
19 #ifndef INCLUDED_unotools_FONTOPTIONS_HXX
20 #define INCLUDED_unotools_FONTOPTIONS_HXX
22 #include "unotools/unotoolsdllapi.h"
23 #include <sal/types.h>
24 #include <osl/mutex.hxx>
25 #include <rtl/ustring.hxx>
26 #include <unotools/options.hxx>
28 /*-************************************************************************************************************//**
29 @short forward declaration to our private date container implementation
30 @descr We use these class as internal member to support small memory requirements.
31 You can create the container if it is neccessary. The class which use these mechanism
32 is faster and smaller then a complete implementation!
33 *//*-*************************************************************************************************************/
35 class SvtFontOptions_Impl;
37 /*-************************************************************************************************************//**
38 @short collect information about font features
39 @descr -
41 @implements -
42 @base -
44 @devstatus ready to use
45 *//*-*************************************************************************************************************/
47 class UNOTOOLS_DLLPUBLIC SAL_WARN_UNUSED SvtFontOptions : public utl::detail::Options
49 public:
50 /*-****************************************************************************************************//**
51 @short standard constructor and destructor
52 @descr This will initialize an instance with default values.
53 We implement these class with a refcount mechanism! Every instance of this class increase it
54 at create and decrease it at delete time - but all instances use the same data container!
55 He is implemented as a static member ...
57 @seealso member m_nRefCount
58 @seealso member m_pDataContainer
60 @param -
61 @return -
63 @onerror -
64 *//*-*****************************************************************************************************/
66 SvtFontOptions();
67 virtual ~SvtFontOptions();
69 /*-****************************************************************************************************//**
70 @short interface methods to get and set value of config key "org.openoffice.Office.Common/Font"
71 @descr These values defines different states of font handling.
73 ..ReplacementTable..() => Determines if the list of font replacements is applied or not.
75 ..FontHistory..() => The last 5 fonts will be shown and the last one will be the
76 first name on the list. These will be displayed in the Font name
77 combo box on the Object bar.
79 ..FontWYSIWYG..() => With this option the names of the selectable fonts
80 (for example, the fonts in the Font field in the object bar)
81 will be formatted as the current font.
83 @seealso -
85 @param -
86 @return -
88 @onerror No error should occurre!
89 *//*-*****************************************************************************************************/
91 sal_Bool IsFontHistoryEnabled ( ) const ;
92 void EnableFontHistory ( sal_Bool bState ) ;
94 sal_Bool IsFontWYSIWYGEnabled ( ) const ;
95 void EnableFontWYSIWYG ( sal_Bool bState ) ;
96 private:
98 /*-****************************************************************************************************//**
99 @short return a reference to a static mutex
100 @descr These class use his own static mutex to be threadsafe.
101 We create a static mutex only for one ime and use at different times.
103 @seealso -
105 @param -
106 @return A reference to a static mutex member.
108 @onerror -
109 *//*-*****************************************************************************************************/
111 UNOTOOLS_DLLPRIVATE static ::osl::Mutex& impl_GetOwnStaticMutex();
112 private:
114 /*Attention
116 Don't initialize these static member in these header!
117 a) Double dfined symbols will be detected ...
118 b) and unresolved externals exist at linking time.
119 Do it in your source only.
122 static SvtFontOptions_Impl* m_pDataContainer ; /// impl. data container as dynamic pointer for smaller memory requirements!
123 static sal_Int32 m_nRefCount ; /// internal ref count mechanism
125 }; // class SvtFontOptions
127 #endif // #ifndef INCLUDED_unotools_FONTOPTIONS_HXX
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */