Update ooo320-m1
[ooovba.git] / sd / source / ui / inc / framework / PresentationFactory.hxx
blob8ee8b462e7868f72fe327646cceb0ac8121a1ce9
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: PresentationFactory.hxx,v $
11 * $Revision: 1.3 $
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_PRESENTATION_FACTORY_HXX
33 #define SD_FRAMEWORK_PRESENTATION_FACTORY_HXX
35 #include "MutexOwner.hxx"
37 #include <com/sun/star/drawing/framework/XResourceFactory.hpp>
38 #include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
39 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
40 #include <com/sun/star/frame/XController.hpp>
41 #include <com/sun/star/lang/XInitialization.hpp>
42 #include <com/sun/star/uno/XComponentContext.hpp>
43 #include <osl/mutex.hxx>
44 #include <cppuhelper/compbase2.hxx>
47 #include <boost/scoped_ptr.hpp>
48 #include <boost/shared_ptr.hpp>
50 namespace css = ::com::sun::star;
52 namespace {
54 typedef ::cppu::WeakComponentImplHelper2 <
55 css::drawing::framework::XResourceFactory,
56 css::drawing::framework::XConfigurationChangeListener
57 > PresentationFactoryInterfaceBase;
59 } // end of anonymous namespace.
63 namespace sd { namespace framework {
65 /** This factory creates a marker view whose existence in a configuration
66 indicates that a slideshow is running (in another but associated
67 application window).
69 class PresentationFactory
70 : private sd::MutexOwner,
71 public PresentationFactoryInterfaceBase
73 public:
74 static const ::rtl::OUString msPresentationViewURL;
76 PresentationFactory (
77 const css::uno::Reference<css::frame::XController>& rxController);
78 virtual ~PresentationFactory (void);
80 virtual void SAL_CALL disposing (void);
83 // XResourceFactory
85 virtual css::uno::Reference<css::drawing::framework::XResource>
86 SAL_CALL createResource (
87 const css::uno::Reference<
88 css::drawing::framework::XResourceId>& rxViewId)
89 throw(css::uno::RuntimeException);
91 virtual void SAL_CALL releaseResource (
92 const css::uno::Reference<css::drawing::framework::XResource>& xView)
93 throw(css::uno::RuntimeException);
96 // XConfigurationChangeListener
98 virtual void SAL_CALL notifyConfigurationChange (
99 const css::drawing::framework::ConfigurationChangeEvent& rEvent)
100 throw (css::uno::RuntimeException);
103 // lang::XEventListener
105 virtual void SAL_CALL disposing (
106 const css::lang::EventObject& rEventObject)
107 throw (css::uno::RuntimeException);
109 private:
110 css::uno::Reference<css::drawing::framework::XConfigurationController>
111 mxConfigurationController;
112 css::uno::Reference<css::frame::XController> mxController;
114 void ThrowIfDisposed (void) const
115 throw (css::lang::DisposedException);
118 } } // end of namespace sd::framework
120 #endif