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