update credits
[LibreOffice.git] / include / svx / sidebar / ContextChangeEventMultiplexer.hxx
blob5075cdac70be5b8f2b97489da98f6043ef4e5ce7
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 #ifndef _SVX_SIDEBAR_CONTEXT_CHANGE_EVENT_MULTIPLEXER_HXX_
19 #define _SVX_SIDEBAR_CONTEXT_CHANGE_EVENT_MULTIPLEXER_HXX_
21 #include "svx/svxdllapi.h"
22 #include <sfx2/sidebar/EnumContext.hxx>
23 #include <com/sun/star/frame/XController.hpp>
24 #include <com/sun/star/frame/XFrame.hpp>
26 namespace css = ::com::sun::star;
27 namespace cssu = ::com::sun::star::uno;
29 class SfxViewShell;
31 /** Convenience frontend for com::sun::star::ui::ContextChangeEventMultiplexer
33 class SVX_DLLPUBLIC ContextChangeEventMultiplexer
35 public:
36 /** Notify the activation of a context.
37 @param rxController
38 This controller is used to determine the module (ie
39 application like Writer or Calc).
40 @param eContext
41 The activated context.
43 static void NotifyContextChange (
44 const cssu::Reference<css::frame::XController>& rxController,
45 const ::sfx2::sidebar::EnumContext::Context eContext);
47 /** Notify the activation of a context.
48 @param pViewShell
49 This view shell is used to determine the module (ie
50 application like Writer or Calc). When <NULL/> then no
51 notification is made.
52 @param eContext
53 The activated context.
55 static void NotifyContextChange (
56 SfxViewShell* pViewShell,
57 const ::sfx2::sidebar::EnumContext::Context eContext);
59 private:
60 static ::rtl::OUString GetModuleName (
61 const cssu::Reference<css::frame::XFrame>& rxFrame);
64 #endif