bump product version to 4.2.0.1
[LibreOffice.git] / include / unotools / localisationoptions.hxx
blob12d5caffc4adc9b7e96592e87b7ba1da1d031b20
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_LOCALISATIONOPTIONS_HXX
20 #define INCLUDED_UNOTOOLS_LOCALISATIONOPTIONS_HXX
22 #include <sal/types.h>
23 #include <unotools/unotoolsdllapi.h>
24 #include <osl/mutex.hxx>
25 #include <unotools/options.hxx>
27 /*-************************************************************************************************************//**
28 @short forward declaration to our private date container implementation
29 @descr We use these class as internal member to support small memory requirements.
30 You can create the container if it is neccessary. The class which use these mechanism
31 is faster and smaller then a complete implementation!
32 *//*-*************************************************************************************************************/
34 class SvtLocalisationOptions_Impl;
36 /*-************************************************************************************************************//**
37 @short collect information about localisation features
38 @descr -
40 @implements -
41 @base -
43 @devstatus ready to use
44 *//*-*************************************************************************************************************/
46 class UNOTOOLS_DLLPUBLIC SAL_WARN_UNUSED SvtLocalisationOptions : public utl::detail::Options
48 public:
49 /*-****************************************************************************************************//**
50 @short standard constructor and destructor
51 @descr This will initialize an instance with default values.
52 We implement these class with a refcount mechanism! Every instance of this class increase it
53 at create and decrease it at delete time - but all instances use the same data container!
54 He is implemented as a static member ...
56 @seealso member m_nRefCount
57 @seealso member m_pDataContainer
59 @param -
60 @return -
62 @onerror -
63 *//*-*****************************************************************************************************/
65 SvtLocalisationOptions();
66 virtual ~SvtLocalisationOptions();
68 /*-****************************************************************************************************//**
69 @short interface methods to get and set value of config key "org.openoffice.Office.Common/View/Localisation/AutoMnemonic"
70 @descr These value specifies if shortcuts should be assigned automatically.
72 @seealso -
74 @param "bState", new value to set it in configuration.
75 @return The value which represent current state of internal variable.
77 @onerror No error should occur!
78 *//*-*****************************************************************************************************/
80 sal_Bool IsAutoMnemonic ( ) const ;
82 /*-****************************************************************************************************//**
83 @short interface methods to get and set value of config key "org.openoffice.Office.Common/View/Localisation/DialogScale"
84 @descr These value specifies the factor for increasing controls.
85 Value from [0..100] are allowed.
87 @ATTENTION These methods don't check for valid or invalid values!
88 Our configuration server can do it ... but these implementation don't get any notifications
89 about wrong commits ...!
90 => If you set an invalid value - nothing will be changed. The information will lost.
92 @seealso baseclass ConfigItem
94 @param "nScale" new value to set it in configuration.
95 @return The value which represent current state of internal variable.
97 @onerror No error should occur!
98 *//*-*****************************************************************************************************/
100 sal_Int32 GetDialogScale( ) const ;
101 private:
103 /*-****************************************************************************************************//**
104 @short return a reference to a static mutex
105 @descr These class is partially threadsafe (for de-/initialization only).
106 All access methods are'nt safe!
107 We create a static mutex only for one ime and use at different times.
109 @seealso -
111 @param -
112 @return A reference to a static mutex member.
114 @onerror -
115 *//*-*****************************************************************************************************/
117 UNOTOOLS_DLLPRIVATE static ::osl::Mutex& GetOwnStaticMutex();
119 private:
121 /*Attention
123 Don't initialize these static member in these header!
124 a) Double dfined symbols will be detected ...
125 b) and unresolved externals exist at linking time.
126 Do it in your source only.
129 static SvtLocalisationOptions_Impl* m_pDataContainer ; /// impl. data container as dynamic pointer for smaller memory requirements!
130 static sal_Int32 m_nRefCount ; /// internal ref count mechanism
132 }; // class SvtLocalisationOptions
134 #endif // INCLUDED_UNOTOOLS_LOCALISATIONOPTIONS_HXX
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */