LibreOffice Module sd (master) 1
PresenterPaneFactory.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERPANEFACTORY_HXX
21#define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERPANEFACTORY_HXX
22
25#include <com/sun/star/frame/XController.hpp>
26#include <com/sun/star/drawing/framework/XConfigurationController.hpp>
27#include <com/sun/star/drawing/framework/XPane.hpp>
28#include <com/sun/star/drawing/framework/XResourceFactory.hpp>
29#include <com/sun/star/uno/XComponentContext.hpp>
30#include <rtl/ref.hxx>
31#include <map>
32#include <memory>
33
34namespace sd { class DrawController; }
35
36namespace sdext::presenter {
37
38class PresenterController;
39
40typedef ::cppu::WeakComponentImplHelper <
41 css::drawing::framework::XResourceFactory
43
50 : public ::cppu::BaseMutex,
52{
53public:
54 static constexpr OUStringLiteral msCurrentSlidePreviewPaneURL
55 = u"private:resource/pane/Presenter/Pane1";
56 static constexpr OUStringLiteral msNextSlidePreviewPaneURL
57 = u"private:resource/pane/Presenter/Pane2";
58 static constexpr OUStringLiteral msNotesPaneURL = u"private:resource/pane/Presenter/Pane3";
59 static constexpr OUStringLiteral msToolBarPaneURL = u"private:resource/pane/Presenter/Pane4";
60 static constexpr OUStringLiteral msSlideSorterPaneURL
61 = u"private:resource/pane/Presenter/Pane5";
62
69 static css::uno::Reference<css::drawing::framework::XResourceFactory> Create (
70 const css::uno::Reference<css::uno::XComponentContext>& rxContext,
71 const rtl::Reference<::sd::DrawController>& rxController,
72 const ::rtl::Reference<PresenterController>& rpPresenterController);
73 virtual ~PresenterPaneFactory() override;
74
75 virtual void SAL_CALL disposing() override;
76
77 // XResourceFactory
78
79 virtual css::uno::Reference<css::drawing::framework::XResource>
80 SAL_CALL createResource (
81 const css::uno::Reference<
82 css::drawing::framework::XResourceId>& rxPaneId) override;
83
84 virtual void SAL_CALL
86 const css::uno::Reference<css::drawing::framework::XResource>&
87 rxPane) override;
88
89private:
90 css::uno::WeakReference<css::uno::XComponentContext> mxComponentContextWeak;
91 css::uno::WeakReference<css::drawing::framework::XConfigurationController>
94 typedef ::std::map<OUString, css::uno::Reference<css::drawing::framework::XResource> >
96 std::unique_ptr<ResourceContainer> mpResourceCache;
97
99 const css::uno::Reference<css::uno::XComponentContext>& rxContext,
100 ::rtl::Reference<PresenterController> xPresenterController);
101
102 void Register (const rtl::Reference<::sd::DrawController>& rxController);
103
104 css::uno::Reference<css::drawing::framework::XResource> CreatePane (
105 const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId);
106 css::uno::Reference<css::drawing::framework::XResource> CreatePane (
107 const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
108 const css::uno::Reference<css::drawing::framework::XPane>& rxParentPane,
109 const bool bIsSpritePane);
110
112 void ThrowIfDisposed() const;
113};
114
115}
116
117#endif
118
119/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
The PresenterPaneFactory provides a fixed set of panes.
virtual void SAL_CALL disposing() override
void Register(const rtl::Reference<::sd::DrawController > &rxController)
std::unique_ptr< ResourceContainer > mpResourceCache
::std::map< OUString, css::uno::Reference< css::drawing::framework::XResource > > ResourceContainer
virtual css::uno::Reference< css::drawing::framework::XResource > SAL_CALL createResource(const css::uno::Reference< css::drawing::framework::XResourceId > &rxPaneId) override
virtual void SAL_CALL releaseResource(const css::uno::Reference< css::drawing::framework::XResource > &rxPane) override
static constexpr OUStringLiteral msNotesPaneURL
static constexpr OUStringLiteral msNextSlidePreviewPaneURL
::rtl::Reference< PresenterController > mpPresenterController
static constexpr OUStringLiteral msToolBarPaneURL
css::uno::WeakReference< css::uno::XComponentContext > mxComponentContextWeak
static constexpr OUStringLiteral msCurrentSlidePreviewPaneURL
css::uno::Reference< css::drawing::framework::XResource > CreatePane(const css::uno::Reference< css::drawing::framework::XResourceId > &rxPaneId)
static css::uno::Reference< css::drawing::framework::XResourceFactory > Create(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const rtl::Reference<::sd::DrawController > &rxController, const ::rtl::Reference< PresenterController > &rpPresenterController)
Create a new instance of this class and register it as resource factory in the drawing framework of t...
css::uno::WeakReference< css::drawing::framework::XConfigurationController > mxConfigurationControllerWeak
css::uno::Reference< css::drawing::framework::XResource > CreatePane(const css::uno::Reference< css::drawing::framework::XResourceId > &rxPaneId, const css::uno::Reference< css::drawing::framework::XPane > &rxParentPane, const bool bIsSpritePane)
PresenterPaneFactory(const css::uno::Reference< css::uno::XComponentContext > &rxContext, ::rtl::Reference< PresenterController > xPresenterController)
static constexpr OUStringLiteral msSlideSorterPaneURL
float u
::cppu::WeakComponentImplHelper< css::drawing::framework::XResourceFactory > PresenterPaneFactoryInterfaceBase