tdf#154285 Check upper bound of arguments in SbRtl_Minute function
[LibreOffice.git] / sd / source / ui / inc / framework / factories / BasicPaneFactory.hxx
blobef97cff00984e756d83a84f21d00e1b848d1cda7
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 #pragma once
22 #include <com/sun/star/drawing/framework/XResourceFactory.hpp>
23 #include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
24 #include <com/sun/star/lang/XInitialization.hpp>
25 #include <comphelper/compbase.hxx>
26 #include <unotools/weakref.hxx>
27 #include <rtl/ref.hxx>
29 #include <memory>
31 namespace com::sun::star::drawing::framework { class XConfigurationController; }
32 namespace com::sun::star::uno { class XComponentContext; }
34 namespace sd {
35 class DrawController;
36 class ViewShellBase;
39 namespace sd::framework {
40 class ConfigurationController;
42 typedef comphelper::WeakComponentImplHelper <
43 css::drawing::framework::XResourceFactory,
44 css::drawing::framework::XConfigurationChangeListener
45 > BasicPaneFactoryInterfaceBase;
47 /** This factory provides the frequently used standard panes
48 private:resource/pane/CenterPane
49 private:resource/pane/FullScreenPane
50 private:resource/pane/LeftImpressPane
51 private:resource/pane/BottomImpressPane
52 private:resource/pane/LeftDrawPane
53 There are two left panes because this is (seems to be) the only way to
54 show different titles for the left pane in Draw and Impress.
56 class BasicPaneFactory final
57 : public BasicPaneFactoryInterfaceBase
59 public:
60 explicit BasicPaneFactory (
61 const css::uno::Reference<css::uno::XComponentContext>& rxContext,
62 const rtl::Reference<::sd::DrawController>& rxController);
63 virtual ~BasicPaneFactory() override;
65 virtual void disposing(std::unique_lock<std::mutex>&) override;
67 // XResourceFactory
69 virtual css::uno::Reference<css::drawing::framework::XResource>
70 SAL_CALL createResource (
71 const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId) override;
73 virtual void SAL_CALL
74 releaseResource (
75 const css::uno::Reference<css::drawing::framework::XResource>& rxPane) override;
77 // XConfigurationChangeListener
79 virtual void SAL_CALL notifyConfigurationChange (
80 const css::drawing::framework::ConfigurationChangeEvent& rEvent) override;
82 // lang::XEventListener
84 virtual void SAL_CALL disposing (
85 const css::lang::EventObject& rEventObject) override;
87 private:
88 css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
89 unotools::WeakReference<sd::framework::ConfigurationController>
90 mxConfigurationControllerWeak;
91 ViewShellBase* mpViewShellBase;
92 class PaneDescriptor;
93 class PaneContainer;
94 std::unique_ptr<PaneContainer> mpPaneContainer;
96 /** Create a new instance of FrameWindowPane.
97 @param rPaneId
98 There is only one frame window so this id is just checked to
99 have the correct value.
101 css::uno::Reference<css::drawing::framework::XResource>
102 CreateFrameWindowPane (
103 const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId);
105 /** Create a new pane that represents the center pane in full screen
106 mode.
108 css::uno::Reference<css::drawing::framework::XResource>
109 CreateFullScreenPane (
110 const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext,
111 const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId);
113 /** Create a new instance of ChildWindowPane.
114 @param rPaneId
115 The ResourceURL member defines which side pane to create.
117 css::uno::Reference<css::drawing::framework::XResource>
118 CreateChildWindowPane (
119 const css::uno::Reference<
120 css::drawing::framework::XResourceId>& rxPaneId,
121 const PaneDescriptor& rDescriptor);
123 /// @throws css::lang::DisposedException
124 void ThrowIfDisposed() const;
127 } // end of namespace sd::framework
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */