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: BasicToolBarFactory.hxx,v $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #ifndef SD_FRAMEWORK_BASIC_TOOL_BAR_FACTORY_HXX
33 #define SD_FRAMEWORK_BASIC_TOOL_BAR_FACTORY_HXX
35 #include "MutexOwner.hxx"
37 #include <com/sun/star/lang/XInitialization.hpp>
38 #include <com/sun/star/uno/XComponentContext.hpp>
39 #include <com/sun/star/drawing/framework/XResourceFactory.hpp>
40 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
41 #include <com/sun/star/drawing/framework/XResourceId.hpp>
42 #include <com/sun/star/frame/XController.hpp>
43 #include <osl/mutex.hxx>
44 #include <cppuhelper/compbase3.hxx>
45 #include <cppuhelper/basemutex.hxx>
48 namespace css
= ::com::sun::star
;
52 typedef ::cppu::WeakComponentImplHelper3
<
53 css::drawing::framework::XResourceFactory
,
54 css::lang::XInitialization
,
55 css::lang::XEventListener
56 > BasicToolBarFactoryInterfaceBase
;
58 } // end of anonymous namespace.
64 namespace sd
{ namespace framework
{
66 /** This factory provides some of the frequently used tool bars:
67 private:resource/toolbar/ViewTabBar
69 class BasicToolBarFactory
70 : protected ::cppu::BaseMutex
,
71 public BasicToolBarFactoryInterfaceBase
75 const css::uno::Reference
<com::sun::star::uno::XComponentContext
>& rxContext
);
76 virtual ~BasicToolBarFactory (void);
78 virtual void SAL_CALL
disposing (void);
83 virtual css::uno::Reference
<com::sun::star::drawing::framework::XResource
> SAL_CALL
85 const css::uno::Reference
<
86 css::drawing::framework::XResourceId
>& rxToolBarId
)
87 throw (css::uno::RuntimeException
);
91 const css::uno::Reference
<com::sun::star::drawing::framework::XResource
>&
93 throw (css::uno::RuntimeException
);
98 virtual void SAL_CALL
initialize(
99 const css::uno::Sequence
<com::sun::star::uno::Any
>& aArguments
)
100 throw (css::uno::Exception
, css::uno::RuntimeException
);
103 // lang::XEventListener
105 virtual void SAL_CALL
disposing (
106 const css::lang::EventObject
& rEventObject
)
107 throw (css::uno::RuntimeException
);
110 css::uno::Reference
<css::drawing::framework::XConfigurationController
> mxConfigurationController
;
111 css::uno::Reference
<css::frame::XController
> mxController
;
112 ViewShellBase
* mpViewShellBase
;
114 void Shutdown (void);
116 void ThrowIfDisposed (void) const
117 throw (css::lang::DisposedException
);
120 } } // end of namespace sd::framework