1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
11 #include "vbamenuitem.hxx"
13 using namespace com::sun::star
;
14 using namespace ooo::vba
;
16 ScVbaMenuItem::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
))
21 ScVbaMenuItem::getCaption()
23 return m_xCommandBarControl
->getCaption();
27 ScVbaMenuItem::setCaption( const OUString
& _caption
)
29 m_xCommandBarControl
->setCaption( _caption
);
33 ScVbaMenuItem::getOnAction()
35 return m_xCommandBarControl
->getOnAction();
39 ScVbaMenuItem::setOnAction( const OUString
& _onaction
)
41 m_xCommandBarControl
->setOnAction( _onaction
);
45 ScVbaMenuItem::Delete( )
47 m_xCommandBarControl
->Delete();
51 ScVbaMenuItem::getServiceImplName()
53 return u
"ScVbaMenuItem"_ustr
;
56 uno::Sequence
<OUString
>
57 ScVbaMenuItem::getServiceNames()
59 static uno::Sequence
< OUString
> const aServiceNames
61 u
"ooo.vba.excel.MenuItem"_ustr
66 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */