bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / framework / actiontriggerhelper.hxx
blob0fc57af8f4b158cbd0671a5b2468f6620c170b23
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 INCLUDED_FRAMEWORK_ACTIONTRIGGERHELPER_HXX
21 #define INCLUDED_FRAMEWORK_ACTIONTRIGGERHELPER_HXX
23 #include <framework/fwedllapi.h>
24 #include <com/sun/star/uno/Reference.hxx>
26 namespace com::sun::star::container { class XIndexContainer; }
27 class Menu;
30 namespace framework
32 class FWE_DLLPUBLIC ActionTriggerHelper
34 public:
35 // Fills the submitted menu with the structure contained in the second
36 // parameter rActionTriggerContainer
37 // @param pNewMenu = must be a valid and empty menu
38 // @param rActionTriggerContainer = must be an instance of service "com.sun.star.ui.ActionTriggerContainer"
39 static void
40 CreateMenuFromActionTriggerContainer(
41 Menu* pNewMenu,
42 const css::uno::Reference< css::container::XIndexContainer >& rActionTriggerContainer );
44 // Creates a "css::ui::ActionTriggerContainer" with the structure of the menu
45 // provided as a parameter. The implementation class stores the menu pointer
46 // to optimize the time of creation of a menu from a actiontrigger structure.
47 // IMPORTANT: The caller must ensure that the menu pointer is valid through the
48 // life time of the XIndexContainer object!!!
49 // @param pNewMenu = Must be a valid menu. Please be aware that this implementation is based on
50 // the above mentioned restriction!!!
52 static css::uno::Reference< css::container::XIndexContainer > CreateActionTriggerContainerFromMenu(
53 const Menu* pMenu, const OUString* pMenuIdentifier );
55 // Fills the submitted rActionTriggerContainer with the structure of the menu
56 // provided as the second parameter
57 // @param rActionTriggerContainer = must be an instance of service "com.sun.star.ui.ActionTriggerContainer"
58 // @param pNewMenu = must be a valid menu
59 static void
60 FillActionTriggerContainerFromMenu(
61 css::uno::Reference< css::container::XIndexContainer > const & rActionTriggerContainer,
62 const Menu* pMenu );
67 #endif // INCLUDED_FRAMEWORK_ACTIONTRIGGERHELPER_HXX
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */