1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SD_SOURCE_UI_FRAMEWORK_FACTORIES_BASICTOOLBARFACTORY_HXX
21 #define INCLUDED_SD_SOURCE_UI_FRAMEWORK_FACTORIES_BASICTOOLBARFACTORY_HXX
23 #include "MutexOwner.hxx"
25 #include <com/sun/star/lang/XInitialization.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
27 #include <com/sun/star/drawing/framework/XResourceFactory.hpp>
28 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
29 #include <com/sun/star/drawing/framework/XResourceId.hpp>
30 #include <com/sun/star/frame/XController.hpp>
31 #include <osl/mutex.hxx>
32 #include <cppuhelper/compbase3.hxx>
33 #include <cppuhelper/basemutex.hxx>
37 typedef ::cppu::WeakComponentImplHelper3
<
38 css::drawing::framework::XResourceFactory
,
39 css::lang::XInitialization
,
40 css::lang::XEventListener
41 > BasicToolBarFactoryInterfaceBase
;
43 } // end of anonymous namespace.
49 namespace sd
{ namespace framework
{
51 /** This factory provides some of the frequently used tool bars:
52 private:resource/toolbar/ViewTabBar
54 class BasicToolBarFactory
55 : protected ::cppu::BaseMutex
,
56 public BasicToolBarFactoryInterfaceBase
60 const css::uno::Reference
<com::sun::star::uno::XComponentContext
>& rxContext
);
61 virtual ~BasicToolBarFactory();
63 virtual void SAL_CALL
disposing() SAL_OVERRIDE
;
67 virtual css::uno::Reference
<com::sun::star::drawing::framework::XResource
> SAL_CALL
69 const css::uno::Reference
<
70 css::drawing::framework::XResourceId
>& rxToolBarId
)
71 throw (css::uno::RuntimeException
, css::lang::IllegalArgumentException
, css::lang::WrappedTargetException
, std::exception
) SAL_OVERRIDE
;
75 const css::uno::Reference
<com::sun::star::drawing::framework::XResource
>&
77 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
81 virtual void SAL_CALL
initialize(
82 const css::uno::Sequence
<com::sun::star::uno::Any
>& aArguments
)
83 throw (css::uno::Exception
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
85 // lang::XEventListener
87 virtual void SAL_CALL
disposing (
88 const css::lang::EventObject
& rEventObject
)
89 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
92 css::uno::Reference
<css::drawing::framework::XConfigurationController
> mxConfigurationController
;
93 css::uno::Reference
<css::frame::XController
> mxController
;
94 ViewShellBase
* mpViewShellBase
;
98 void ThrowIfDisposed() const
99 throw (css::lang::DisposedException
);
102 } } // end of namespace sd::framework
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */