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_INC_FRAMEWORK_PRESENTATIONFACTORY_HXX
21 #define INCLUDED_SD_SOURCE_UI_INC_FRAMEWORK_PRESENTATIONFACTORY_HXX
23 #include "MutexOwner.hxx"
25 #include <com/sun/star/drawing/framework/XResourceFactory.hpp>
26 #include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
27 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
28 #include <com/sun/star/frame/XController.hpp>
29 #include <com/sun/star/lang/XInitialization.hpp>
30 #include <com/sun/star/uno/XComponentContext.hpp>
31 #include <osl/mutex.hxx>
32 #include <cppuhelper/compbase2.hxx>
34 #include <boost/scoped_ptr.hpp>
35 #include <boost/shared_ptr.hpp>
39 typedef ::cppu::WeakComponentImplHelper2
<
40 css::drawing::framework::XResourceFactory
,
41 css::drawing::framework::XConfigurationChangeListener
42 > PresentationFactoryInterfaceBase
;
44 } // end of anonymous namespace.
46 namespace sd
{ namespace framework
{
48 /** This factory creates a marker view whose existence in a configuration
49 indicates that a slideshow is running (in another but associated
52 class PresentationFactory
53 : private sd::MutexOwner
,
54 public PresentationFactoryInterfaceBase
57 static const OUString msPresentationViewURL
;
60 const css::uno::Reference
<css::frame::XController
>& rxController
);
61 virtual ~PresentationFactory();
63 virtual void SAL_CALL
disposing() SAL_OVERRIDE
;
67 virtual css::uno::Reference
<css::drawing::framework::XResource
>
68 SAL_CALL
createResource (
69 const css::uno::Reference
<
70 css::drawing::framework::XResourceId
>& rxViewId
)
71 throw (css::uno::RuntimeException
, css::lang::IllegalArgumentException
, css::lang::WrappedTargetException
, std::exception
) SAL_OVERRIDE
;
73 virtual void SAL_CALL
releaseResource (
74 const css::uno::Reference
<css::drawing::framework::XResource
>& xView
)
75 throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
77 // XConfigurationChangeListener
79 virtual void SAL_CALL
notifyConfigurationChange (
80 const css::drawing::framework::ConfigurationChangeEvent
& rEvent
)
81 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
83 // lang::XEventListener
85 virtual void SAL_CALL
disposing (
86 const css::lang::EventObject
& rEventObject
)
87 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
90 css::uno::Reference
<css::drawing::framework::XConfigurationController
>
91 mxConfigurationController
;
92 css::uno::Reference
<css::frame::XController
> mxController
;
94 void ThrowIfDisposed() const
95 throw (css::lang::DisposedException
);
98 } } // end of namespace sd::framework
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */