sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svtools / moduleoptions.hxx
blob96b1832ea02ea258426ff494796ec621bc361942
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: moduleoptions.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 ************************************************************************/
31 #ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX
32 #define INCLUDED_SVTOOLS_MODULEOPTIONS_HXX
34 //_________________________________________________________________________________________________________________
35 // includes
36 //_________________________________________________________________________________________________________________
38 #ifndef _SALHELPER_SINGLETONREF_HXX_
39 #include <salhelper/singletonref.hxx>
40 #endif
42 #ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
43 #include <com/sun/star/frame/XModel.hpp>
44 #endif
46 #ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
47 #include <com/sun/star/uno/Sequence.hxx>
48 #endif
50 #ifndef _RTL_USTRING_HXX_
51 #include <rtl/ustring.hxx>
52 #endif
54 #ifndef _SAL_TYPES_H_
55 #include <sal/types.h>
56 #endif
58 #ifndef _OSL_MUTEX_HXX_
59 #include <osl/mutex.hxx>
60 #endif
62 #ifndef INCLUDED_SVTOOLS_OPTIONS_HXX
63 #include <bf_svtools/options.hxx>
64 #endif
66 namespace binfilter
69 //_________________________________________________________________________________________________________________
70 // const
71 //_________________________________________________________________________________________________________________
73 #define FEATUREFLAG_BASICIDE 0x00000020
74 #define FEATUREFLAG_MATH 0x00000100
75 #define FEATUREFLAG_CHART 0x00000200
76 #define FEATUREFLAG_CALC 0x00000800
77 #define FEATUREFLAG_DRAW 0x00001000
78 #define FEATUREFLAG_WRITER 0x00002000
79 #define FEATUREFLAG_IMPRESS 0x00008000
80 #define FEATUREFLAG_INSIGHT 0x00010000
82 //_________________________________________________________________________________________________________________
83 // forward declarations
84 //_________________________________________________________________________________________________________________
86 /*-************************************************************************************************************//**
87 @short forward declaration to our private date container implementation
88 @descr We use these class as internal member to support small memory requirements.
89 You can create the container if it is neccessary. The class which use these mechanism
90 is faster and smaller then a complete implementation!
91 *//*-*************************************************************************************************************/
92 class SvtModuleOptions_Impl;
94 //_________________________________________________________________________________________________________________
95 // declarations
96 //_________________________________________________________________________________________________________________
98 /*-************************************************************************************************************//**
99 @short collect informations about installation state of modules
100 @descr Use these class to get installation state of different office modules like writer, calc etc
101 Further you can ask for additional informations; e.g. name of standard template file, which
102 should be used by corresponding module; or short/long name of these module factory.
104 @implements -
105 @base -
107 @devstatus ready to use
108 @threadsafe yes
109 *//*-*************************************************************************************************************/
110 class SvtModuleOptions: public Options
112 //-------------------------------------------------------------------------------------------------------------
113 // public const declarations!
114 //-------------------------------------------------------------------------------------------------------------
115 public:
117 enum EModule
119 E_SWRITER = 0,
120 E_SCALC = 1,
121 E_SDRAW = 2,
122 E_SIMPRESS = 3,
123 E_SMATH = 4,
124 E_SCHART = 5,
125 E_SSTARTMODULE = 6,
126 E_SBASIC = 7,
127 E_SDATABASE = 8,
128 E_SWEB = 9,
129 E_SGLOBAL = 10
132 /*ATTENTION:
133 If you change these enum ... don't forget to change reading/writing and order of configuration values too!
134 See "SvtModuleOptions_Impl::impl_GetSetNames()" and his ctor for further informations.
136 enum EFactory
138 E_UNKNOWN_FACTORY = -1,
139 E_WRITER = 0,
140 E_WRITERWEB = 1,
141 E_WRITERGLOBAL = 2,
142 E_CALC = 3,
143 E_DRAW = 4,
144 E_IMPRESS = 5,
145 E_MATH = 6,
146 E_CHART = 7,
147 E_STARTMODULE = 8,
148 E_DATABASE = 9,
149 E_BASIC = 10
153 //-------------------------------------------------------------------------------------------------------------
154 // public methods
155 //-------------------------------------------------------------------------------------------------------------
156 public:
158 //---------------------------------------------------------------------------------------------------------
159 // constructor / destructor
160 //---------------------------------------------------------------------------------------------------------
161 SvtModuleOptions();
162 virtual ~SvtModuleOptions();
164 //---------------------------------------------------------------------------------------------------------
165 // interface
166 //---------------------------------------------------------------------------------------------------------
167 sal_Bool IsModuleInstalled ( EModule eModule ) const;
169 //---------------------------------------------------------------------------------------------------------
170 // old interface ...
171 //---------------------------------------------------------------------------------------------------------
172 sal_Bool IsMath () const;
173 sal_Bool IsChart () const;
174 sal_Bool IsDraw () const;
175 sal_Bool IsWriter () const;
176 sal_Bool IsImpress () const;
177 sal_uInt32 GetFeatures() const;
179 //-------------------------------------------------------------------------------------------------------------
180 // private methods
181 //-------------------------------------------------------------------------------------------------------------
182 private:
183 static ::osl::Mutex& impl_GetOwnStaticMutex();
185 //-------------------------------------------------------------------------------------------------------------
186 // private member
187 //-------------------------------------------------------------------------------------------------------------
188 private:
190 /*Attention
192 Don't initialize these static member in these header!
193 a) Double defined symbols will be detected ...
194 b) and unresolved externals exist at linking time.
195 Do it in your source only.
198 static SvtModuleOptions_Impl* m_pDataContainer ; /// impl. data container as dynamic pointer for smaller memory requirements!
199 static sal_Int32 m_nRefCount ; /// internal ref count mechanism
201 }; // class SvtModuleOptions
205 #endif // #ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX