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: documentacceleratorconfiguration.hxx,v $
10 * $Revision: 1.7.300.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 __FRAMEWORK_ACCELERATORS_DOCUMENTACCELERATORCONFIGURATION_HXX_
32 #define __FRAMEWORK_ACCELERATORS_DOCUMENTACCELERATORCONFIGURATION_HXX_
34 //__________________________________________
37 #include <accelerators/acceleratorconfiguration.hxx>
38 #include <accelerators/istoragelistener.hxx>
39 #include <accelerators/presethandler.hxx>
41 #include <macros/xinterface.hxx>
42 #include <macros/xtypeprovider.hxx>
43 #include <macros/xserviceinfo.hxx>
45 //__________________________________________
47 #include <com/sun/star/lang/XInitialization.hpp>
48 #include <com/sun/star/ui/XUIConfigurationStorage.hpp>
50 //__________________________________________
53 //__________________________________________
59 //__________________________________________
61 implements a read/write access to a document
62 based accelerator configuration.
64 class DocumentAcceleratorConfiguration
: public XMLBasedAcceleratorConfiguration
65 , public css::lang::XServiceInfo
66 , public css::lang::XInitialization
67 // , public css::ui::XUIConfigurationStorage
69 //______________________________________
74 //----------------------------------
75 /** points to the root storage of the outside document,
76 where we can read/save our configuration data. */
77 css::uno::Reference
< css::embed::XStorage
> m_xDocumentRoot
;
79 //______________________________________
84 //----------------------------------
85 /** initialize this instance and fill the internal cache.
88 reference to an uno service manager, which is used internaly.
90 DocumentAcceleratorConfiguration(const css::uno::Reference
< css::lang::XMultiServiceFactory
> xSMGR
);
91 virtual ~DocumentAcceleratorConfiguration();
93 // XInterface, XTypeProvider, XServiceInfo
94 FWK_DECLARE_XINTERFACE
95 FWK_DECLARE_XTYPEPROVIDER
99 virtual void SAL_CALL
initialize(const css::uno::Sequence
< css::uno::Any
>& lArguments
)
100 throw(css::uno::Exception
,
101 css::uno::RuntimeException
);
103 // XUIConfigurationStorage
104 virtual void SAL_CALL
setStorage(const css::uno::Reference
< css::embed::XStorage
>& xStorage
)
105 throw(css::uno::RuntimeException
);
107 virtual sal_Bool SAL_CALL
hasStorage()
108 throw(css::uno::RuntimeException
);
110 //______________________________________
115 //----------------------------------
116 /** read all data into the cache. */
117 void impl_ts_fillCache();
119 //----------------------------------
120 /** forget all currently cached data AND(!)
121 forget all currently used storages. */
122 void impl_ts_clearCache();
125 } // namespace framework
127 #endif // __FRAMEWORK_ACCELERATORS_DOCUMENTACCELERATORCONFIGURATION_HXX_