LibreOffice Module vbahelper (master) 1
vbacommandbarcontrols.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#ifndef INCLUDED_VBAHELPER_SOURCE_VBAHELPER_VBACOMMANDBARCONTROLS_HXX
20#define INCLUDED_VBAHELPER_SOURCE_VBAHELPER_VBACOMMANDBARCONTROLS_HXX
21
22#include <ooo/vba/XCommandBarControls.hpp>
25
27
29{
30private:
32 css::uno::Reference< css::container::XIndexAccess > m_xBarSettings;
35
36 static css::uno::Sequence< css::beans::PropertyValue > CreateMenuItemData( const OUString& sCommandURL,
37 const OUString& sHelpURL,
38 const OUString& sLabel,
39 sal_uInt16 nType,
40 const css::uno::Any& aSubMenu,
41 bool isVisible,
42 bool isEnabled );
43 static css::uno::Sequence< css::beans::PropertyValue > CreateToolbarItemData( const OUString& sCommandURL, const OUString& sHelpURL, const OUString& sLabel, sal_uInt16 nType, const css::uno::Any& aSubMenu, bool isVisible, sal_Int32 nStyle );
44
45public:
47 ScVbaCommandBarControls( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, VbaCommandBarHelperRef pHelper, css::uno::Reference< css::container::XIndexAccess > xBarSettings, const OUString& sResourceUrl );
48
49 // XEnumerationAccess
50 virtual css::uno::Type SAL_CALL getElementType() override;
51 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
52 virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ) override;
53
54 // Methods
55 virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index, const css::uno::Any& /*Index2*/ ) override;
56 virtual css::uno::Reference< ov::XCommandBarControl > SAL_CALL Add( const css::uno::Any& Type, const css::uno::Any& Id, const css::uno::Any& Parameter, const css::uno::Any& Before, const css::uno::Any& Temporary ) override;
57 // XHelperInterface
58 virtual OUString getServiceImplName() override;
59 virtual css::uno::Sequence<OUString> getServiceNames() override;
60};
61
63{
64public:
67 const css::uno::Reference< ov::XHelperInterface >& xParent,
68 const css::uno::Reference< css::uno::XComponentContext >& xContext );
69
70 // XEnumerationAccess
71 virtual css::uno::Type SAL_CALL getElementType() override;
72 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
73 virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ) override;
74
75 // Methods
76 virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index, const css::uno::Any& /*Index2*/ ) override;
77 virtual css::uno::Reference< ov::XCommandBarControl > SAL_CALL Add( const css::uno::Any& Type, const css::uno::Any& Id, const css::uno::Any& Parameter, const css::uno::Any& Before, const css::uno::Any& Temporary ) override;
78 // XHelperInterface
79 virtual OUString getServiceImplName() override;
80 virtual css::uno::Sequence<OUString> getServiceNames() override;
81};
82
83#endif // INCLUDED_VBAHELPER_SOURCE_VBAHELPER_VBACOMMANDBARCONTROLS_HXX
84
85/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
virtual css::uno::Any SAL_CALL Item(const css::uno::Any &Index, const css::uno::Any &) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual css::uno::Any createCollectionObject(const css::uno::Any &aSource) override
static css::uno::Sequence< css::beans::PropertyValue > CreateToolbarItemData(const OUString &sCommandURL, const OUString &sHelpURL, const OUString &sLabel, sal_uInt16 nType, const css::uno::Any &aSubMenu, bool isVisible, sal_Int32 nStyle)
css::uno::Reference< css::container::XIndexAccess > m_xBarSettings
virtual css::uno::Reference< ov::XCommandBarControl > SAL_CALL Add(const css::uno::Any &Type, const css::uno::Any &Id, const css::uno::Any &Parameter, const css::uno::Any &Before, const css::uno::Any &Temporary) override
static css::uno::Sequence< css::beans::PropertyValue > CreateMenuItemData(const OUString &sCommandURL, const OUString &sHelpURL, const OUString &sLabel, sal_uInt16 nType, const css::uno::Any &aSubMenu, bool isVisible, bool isEnabled)
VbaCommandBarHelperRef pCBarHelper
virtual OUString getServiceImplName() override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
ScVbaCommandBarControls(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::container::XIndexAccess > &xIndexAccess, VbaCommandBarHelperRef pHelper, css::uno::Reference< css::container::XIndexAccess > xBarSettings, const OUString &sResourceUrl)
virtual OUString getServiceImplName() override
virtual css::uno::Any SAL_CALL Item(const css::uno::Any &Index, const css::uno::Any &) override
VbaDummyCommandBarControls(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext)
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Reference< ov::XCommandBarControl > SAL_CALL Add(const css::uno::Any &Type, const css::uno::Any &Id, const css::uno::Any &Parameter, const css::uno::Any &Before, const css::uno::Any &Temporary) override
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual css::uno::Any createCollectionObject(const css::uno::Any &aSource) override
Type
sal_uInt32 Id
CollTestImplHelper< ov::XCommandBarControls > CommandBarControls_BASE
std::shared_ptr< VbaCommandBarHelper > VbaCommandBarHelperRef