bump product version to 4.1.6.2
[LibreOffice.git] / sd / source / ui / inc / framework / PresentationFactory.hxx
blob8dc234b51180cfd1f3286d1600138651765710ec
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 SD_FRAMEWORK_PRESENTATION_FACTORY_HXX
21 #define SD_FRAMEWORK_PRESENTATION_FACTORY_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>
35 #include <boost/scoped_ptr.hpp>
36 #include <boost/shared_ptr.hpp>
38 namespace {
40 typedef ::cppu::WeakComponentImplHelper2 <
41 css::drawing::framework::XResourceFactory,
42 css::drawing::framework::XConfigurationChangeListener
43 > PresentationFactoryInterfaceBase;
45 } // end of anonymous namespace.
49 namespace sd { namespace framework {
51 /** This factory creates a marker view whose existence in a configuration
52 indicates that a slideshow is running (in another but associated
53 application window).
55 class PresentationFactory
56 : private sd::MutexOwner,
57 public PresentationFactoryInterfaceBase
59 public:
60 static const OUString msPresentationViewURL;
62 PresentationFactory (
63 const css::uno::Reference<css::frame::XController>& rxController);
64 virtual ~PresentationFactory (void);
66 virtual void SAL_CALL disposing (void);
69 // XResourceFactory
71 virtual css::uno::Reference<css::drawing::framework::XResource>
72 SAL_CALL createResource (
73 const css::uno::Reference<
74 css::drawing::framework::XResourceId>& rxViewId)
75 throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException);
77 virtual void SAL_CALL releaseResource (
78 const css::uno::Reference<css::drawing::framework::XResource>& xView)
79 throw(css::uno::RuntimeException);
82 // XConfigurationChangeListener
84 virtual void SAL_CALL notifyConfigurationChange (
85 const css::drawing::framework::ConfigurationChangeEvent& rEvent)
86 throw (css::uno::RuntimeException);
89 // lang::XEventListener
91 virtual void SAL_CALL disposing (
92 const css::lang::EventObject& rEventObject)
93 throw (css::uno::RuntimeException);
95 private:
96 css::uno::Reference<css::drawing::framework::XConfigurationController>
97 mxConfigurationController;
98 css::uno::Reference<css::frame::XController> mxController;
100 void ThrowIfDisposed (void) const
101 throw (css::lang::DisposedException);
104 } } // end of namespace sd::framework
106 #endif
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */