sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svtools / miscopt.hxx
blob3879ed130411223012487899763cbc1a1cca7732
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: miscopt.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef INCLUDED_SVTOOLS_MISCOPT_HXX
31 #define INCLUDED_SVTOOLS_MISCOPT_HXX
33 //_________________________________________________________________________________________________________________
34 // includes
35 //_________________________________________________________________________________________________________________
37 #ifndef INCLUDED_SVTDLLAPI_H
38 #include "bf_svtools/svtdllapi.h"
39 #endif
41 #ifndef _SAL_TYPES_H_
42 #include <sal/types.h>
43 #endif
45 #ifndef _OSL_MUTEX_HXX_
46 #include <osl/mutex.hxx>
47 #endif
49 #ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_
50 #include <com/sun/star/uno/Sequence.h>
51 #endif
53 #ifndef _RTL_USTRING_HXX_
54 #include <rtl/ustring.hxx>
55 #endif
57 #ifndef INCLUDED_SVTOOLS_OPTIONS_HXX
58 #include <bf_svtools/options.hxx>
59 #endif
61 class Link;
63 namespace binfilter
66 //_________________________________________________________________________________________________________________
67 // forward declarations
68 //_________________________________________________________________________________________________________________
70 /*-************************************************************************************************************//**
71 @short forward declaration to our private date container implementation
72 @descr We use these class as internal member to support small memory requirements.
73 You can create the container if it is neccessary. The class which use these mechanism
74 is faster and smaller then a complete implementation!
75 *//*-*************************************************************************************************************/
77 class SvtMiscOptions_Impl;
79 //_________________________________________________________________________________________________________________
80 // declarations
81 //_________________________________________________________________________________________________________________
83 /*-************************************************************************************************************//**
84 @short collect informations about misc group
85 @descr -
87 @implements -
88 @base -
90 @ATTENTION This class is partially threadsafe.
92 @devstatus ready to use
93 *//*-*************************************************************************************************************/
95 class SvtMiscOptions: public Options
97 //-------------------------------------------------------------------------------------------------------------
98 // public methods
99 //-------------------------------------------------------------------------------------------------------------
101 public:
103 //---------------------------------------------------------------------------------------------------------
104 // constructor / destructor
105 //---------------------------------------------------------------------------------------------------------
107 /*-****************************************************************************************************//**
108 @short standard constructor and destructor
109 @descr This will initialize an instance with default values.
110 We implement these class with a refcount mechanism! Every instance of this class increase it
111 at create and decrease it at delete time - but all instances use the same data container!
112 He is implemented as a static member ...
114 @seealso member m_nRefCount
115 @seealso member m_pDataContainer
117 @param -
118 @return -
120 @onerror -
121 *//*-*****************************************************************************************************/
123 SvtMiscOptions();
124 virtual ~SvtMiscOptions();
126 //---------------------------------------------------------------------------------------------------------
127 // interface
128 //---------------------------------------------------------------------------------------------------------
130 sal_Bool IsModifyByPrinting() const;
131 void SetModifyByPrinting(sal_Bool bSet );
133 //-------------------------------------------------------------------------------------------------------------
134 // private methods
135 //-------------------------------------------------------------------------------------------------------------
137 private:
139 /*-****************************************************************************************************//**
140 @short return a reference to a static mutex
141 @descr These class is partially threadsafe (for de-/initialization only).
142 All access methods are'nt safe!
143 We create a static mutex only for one ime and use at different times.
145 @seealso -
147 @param -
148 @return A reference to a static mutex member.
150 @onerror -
151 *//*-*****************************************************************************************************/
153 static ::osl::Mutex& GetInitMutex();
155 //-------------------------------------------------------------------------------------------------------------
156 // private member
157 //-------------------------------------------------------------------------------------------------------------
159 private:
161 /*Attention
163 Don't initialize these static member in these header!
164 a) Double dfined symbols will be detected ...
165 b) and unresolved externals exist at linking time.
166 Do it in your source only.
169 static SvtMiscOptions_Impl* m_pDataContainer ; /// impl. data container as dynamic pointer for smaller memory requirements!
170 static sal_Int32 m_nRefCount ; /// internal ref count mechanism
172 }; // class SvtMiscOptions
176 #endif // #ifndef INCLUDED_SVTOOLS_MISCOPT_HXX