bump product version to 4.2.0.1
[LibreOffice.git] / include / svx / sidebar / ContextChangeEventMultiplexer.hxx
bloba9a4adee25a2573be8b652a97086ac9e4d86be0e
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 .
19 #ifndef INCLUDED_SVX_SIDEBAR_CONTEXTCHANGEEVENTMULTIPLEXER_HXX
20 #define INCLUDED_SVX_SIDEBAR_CONTEXTCHANGEEVENTMULTIPLEXER_HXX
22 #include <svx/svxdllapi.h>
23 #include <sfx2/sidebar/EnumContext.hxx>
24 #include <com/sun/star/frame/XController.hpp>
25 #include <com/sun/star/frame/XFrame.hpp>
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
66 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */