1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef __FRAMEWORK_ACCELERATORS_GLOBALACCELERATORCONFIGURATION_HXX_
25 #define __FRAMEWORK_ACCELERATORS_GLOBALACCELERATORCONFIGURATION_HXX_
26 
27 //__________________________________________
28 // own includes
29 
30 #include <accelerators/acceleratorconfiguration.hxx>
31 #include <accelerators/presethandler.hxx>
32 
33 #ifndef __FRAMEWORK_MACROS_XINTERFACE_HXX_
34 #include <macros/interface.hxx>
35 #endif
36 #include <macros/xtypeprovider.hxx>
37 #include <macros/xserviceinfo.hxx>
38 
39 //__________________________________________
40 // interface includes
41 
42 #ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
43 #include <com/sun/star/lang/XInitialization.hpp>
44 #endif
45 
46 //__________________________________________
47 // other includes
48 
49 //__________________________________________
50 // definition
51 
52 namespace framework
53 {
54 
55 //__________________________________________
56 /**
57     implements a read/write access to the global
58     accelerator configuration.
59  */
60 class GlobalAcceleratorConfiguration : public XCUBasedAcceleratorConfiguration
61                                      , public css::lang::XServiceInfo
62 									 , public css::lang::XInitialization
63 {
64     //______________________________________
65     // interface
66 
67     public:
68 
69         //----------------------------------
70         /** initialize this instance and fill the internal cache.
71 
72             @param  xSMGR
73                     reference to an uno service manager, which is used internally.
74          */
75         GlobalAcceleratorConfiguration(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR);
76 
77         //----------------------------------
78         /** TODO */
79         virtual ~GlobalAcceleratorConfiguration();
80 
81         // XInterface, XTypeProvider, XServiceInfo
82         FWK_DECLARE_XINTERFACE
83         FWK_DECLARE_XTYPEPROVIDER
84         DECLARE_XSERVICEINFO
85 
86 		// XInitialization
87 		virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any >& lArguments)
88 			throw (css::uno::Exception       ,
89 			css::uno::RuntimeException);
90 
91         // XComponent
92         virtual  void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
93 
94     //______________________________________
95     // helper
96 
97     private:
98 
99 		::rtl::OUString m_sLocale;
100 
101         //----------------------------------
102         /** read all data into the cache. */
103         void impl_ts_fillCache();
104 };
105 
106 } // namespace framework
107 
108 #endif // __FRAMEWORK_ACCELERATORS_GLOBALACCELERATORCONFIGURATION_HXX_
109