LibreOffice Module sc (master) 1
vbamenuitem.cxx
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#include <utility>
10
11#include "vbamenuitem.hxx"
12
13using namespace com::sun::star;
14using namespace ooo::vba;
15
16ScVbaMenuItem::ScVbaMenuItem( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< XCommandBarControl > xCommandBarControl ) : MenuItem_BASE( rParent, rContext ), m_xCommandBarControl(std::move( xCommandBarControl ))
17{
18}
19
20OUString SAL_CALL
22{
23 return m_xCommandBarControl->getCaption();
24}
25
26void SAL_CALL
27ScVbaMenuItem::setCaption( const OUString& _caption )
28{
29 m_xCommandBarControl->setCaption( _caption );
30}
31
32OUString SAL_CALL
34{
35 return m_xCommandBarControl->getOnAction();
36}
37
38void SAL_CALL
39ScVbaMenuItem::setOnAction( const OUString& _onaction )
40{
41 m_xCommandBarControl->setOnAction( _onaction );
42}
43
44void SAL_CALL
46{
47 m_xCommandBarControl->Delete();
48}
49
50OUString
52{
53 return "ScVbaMenuItem";
54}
55
56uno::Sequence<OUString>
58{
59 static uno::Sequence< OUString > const aServiceNames
60 {
61 "ooo.vba.excel.MenuItem"
62 };
63 return aServiceNames;
64}
65
66/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL Delete() override
Definition: vbamenuitem.cxx:45
virtual void SAL_CALL setCaption(const OUString &_caption) override
Definition: vbamenuitem.cxx:27
virtual css::uno::Sequence< OUString > getServiceNames() override
Definition: vbamenuitem.cxx:57
virtual OUString SAL_CALL getOnAction() override
Definition: vbamenuitem.cxx:33
ScVbaMenuItem(const css::uno::Reference< ov::XHelperInterface > &rParent, const css::uno::Reference< css::uno::XComponentContext > &rContext, css::uno::Reference< ov::XCommandBarControl > xCommandBarControl)
Definition: vbamenuitem.cxx:16
virtual OUString SAL_CALL getCaption() override
Definition: vbamenuitem.cxx:21
css::uno::Reference< ov::XCommandBarControl > m_xCommandBarControl
Definition: vbamenuitem.hxx:20
virtual void SAL_CALL setOnAction(const OUString &_onaction) override
Definition: vbamenuitem.cxx:39
virtual OUString getServiceImplName() override
Definition: vbamenuitem.cxx:51
Sequence< OUString > aServiceNames