1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: moduleoptions.hxx,v $
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 //_________________________________________________________________________________________________________________
36 //_________________________________________________________________________________________________________________
38 #ifndef _SALHELPER_SINGLETONREF_HXX_
39 #include <salhelper/singletonref.hxx>
42 #ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
43 #include <com/sun/star/frame/XModel.hpp>
46 #ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
47 #include <com/sun/star/uno/Sequence.hxx>
50 #ifndef _RTL_USTRING_HXX_
51 #include <rtl/ustring.hxx>
55 #include <sal/types.h>
58 #ifndef _OSL_MUTEX_HXX_
59 #include <osl/mutex.hxx>
62 #ifndef INCLUDED_SVTOOLS_OPTIONS_HXX
63 #include <bf_svtools/options.hxx>
69 //_________________________________________________________________________________________________________________
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 //_________________________________________________________________________________________________________________
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.
107 @devstatus ready to use
109 *//*-*************************************************************************************************************/
110 class SvtModuleOptions
: public Options
112 //-------------------------------------------------------------------------------------------------------------
113 // public const declarations!
114 //-------------------------------------------------------------------------------------------------------------
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.
138 E_UNKNOWN_FACTORY
= -1,
153 //-------------------------------------------------------------------------------------------------------------
155 //-------------------------------------------------------------------------------------------------------------
158 //---------------------------------------------------------------------------------------------------------
159 // constructor / destructor
160 //---------------------------------------------------------------------------------------------------------
162 virtual ~SvtModuleOptions();
164 //---------------------------------------------------------------------------------------------------------
166 //---------------------------------------------------------------------------------------------------------
167 sal_Bool
IsModuleInstalled ( EModule eModule
) const;
169 //---------------------------------------------------------------------------------------------------------
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 //-------------------------------------------------------------------------------------------------------------
181 //-------------------------------------------------------------------------------------------------------------
183 static ::osl::Mutex
& impl_GetOwnStaticMutex();
185 //-------------------------------------------------------------------------------------------------------------
187 //-------------------------------------------------------------------------------------------------------------
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