1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_SVTOOLS_MISCOPT_HXX
20 #define INCLUDED_SVTOOLS_MISCOPT_HXX
22 #include <svtools/svtdllapi.h>
23 #include <sal/types.h>
24 #include <tools/link.hxx>
25 #include <osl/mutex.hxx>
26 #include <com/sun/star/uno/Sequence.h>
27 #include <rtl/ustring.hxx>
28 #include <unotools/options.hxx>
30 /*-************************************************************************************************************
31 @short forward declaration to our private date container implementation
32 @descr We use these class as internal member to support small memory requirements.
33 You can create the container if it is necessary. The class which use these mechanism
34 is faster and smaller then a complete implementation!
35 *//*-*************************************************************************************************************/
37 class SvtMiscOptions_Impl
;
39 /*-************************************************************************************************************
40 @short collect information about misc group
41 @ATTENTION This class is partially threadsafe.
43 @devstatus ready to use
44 *//*-*************************************************************************************************************/
46 class SVT_DLLPUBLIC SvtMiscOptions
: public utl::detail::Options
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
58 *//*-*****************************************************************************************************/
61 virtual ~SvtMiscOptions();
63 void AddListenerLink( const Link
<>& rLink
);
64 void RemoveListenerLink( const Link
<>& rLink
);
66 bool UseSystemFileDialog() const;
67 void SetUseSystemFileDialog( bool bSet
);
68 bool IsUseSystemFileDialogReadOnly() const;
70 bool DisableUICustomization() const;
72 bool IsPluginsEnabled() const;
74 sal_Int16
GetSymbolsSize() const;
75 void SetSymbolsSize( sal_Int16 eSet
);
76 sal_Int16
GetCurrentSymbolsSize() const;
77 bool AreCurrentSymbolsLarge() const;
79 OUString
GetIconTheme() const;
80 void SetIconTheme(const OUString
&);
81 void SetIconThemeAutomatically();
82 bool IconThemeWasSetAutomatically();
84 sal_Int16
GetToolboxStyle() const;
85 void SetToolboxStyle( sal_Int16 nStyle
);
87 bool IsModifyByPrinting() const;
88 void SetModifyByPrinting(bool bSet
);
90 bool UseSystemPrintDialog() const;
91 void SetUseSystemPrintDialog( bool bSet
);
93 bool ShowLinkWarningDialog() const;
94 void SetShowLinkWarningDialog( bool bSet
);
95 bool IsShowLinkWarningDialogReadOnly() const;
97 void SetSaveAlwaysAllowed( bool bSet
);
98 bool IsSaveAlwaysAllowed() const;
100 void SetExperimentalMode( bool bSet
);
101 bool IsExperimentalMode() const;
103 void SetMacroRecorderMode( bool bSet
);
104 bool IsMacroRecorderMode() const;
108 /*-****************************************************************************************************
109 @short return a reference to a static mutex
110 @descr These class is partially threadsafe (for de-/initialization only).
111 All access methods are'nt safe!
112 We create a static mutex only for one ime and use at different times.
113 @return A reference to a static mutex member.
114 *//*-*****************************************************************************************************/
116 SVT_DLLPRIVATE
static ::osl::Mutex
& GetInitMutex();
122 Don't initialize these static members in these headers!
123 a) Double defined symbols will be detected ...
124 b) and unresolved externals exist at linking time.
125 Do it in your source only.
128 static SvtMiscOptions_Impl
* m_pDataContainer
;
129 static sal_Int32 m_nRefCount
;
131 }; // class SvtMiscOptions
133 #endif // #ifndef INCLUDED_SVTOOLS_MISCOPT_HXX
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */