Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / source / ui / vba / vbamenubar.cxx
blobf8f7f56652335203e65cd24cecc1e5bb86697ac6
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/.
8 */
9 #include "vbamenubar.hxx"
10 #include "vbamenus.hxx"
11 #include <ooo/vba/XCommandBarControls.hpp>
13 using namespace com::sun::star;
14 using namespace ooo::vba;
16 ScVbaMenuBar::ScVbaMenuBar( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< XCommandBar >& rCommandBar ) : MenuBar_BASE(rParent, rContext), m_xCommandBar(rCommandBar)
20 uno::Any SAL_CALL
21 ScVbaMenuBar::Menus( const uno::Any& aIndex )
23 uno::Reference< XCommandBarControls > xCommandBarControls( m_xCommandBar->Controls( uno::Any() ), uno::UNO_QUERY_THROW );
24 uno::Reference< excel::XMenus > xMenus( new ScVbaMenus( this, mxContext, xCommandBarControls ) );
25 if( aIndex.hasValue() )
27 return xMenus->Item( aIndex, uno::Any() );
29 return uno::makeAny( xMenus );
32 OUString
33 ScVbaMenuBar::getServiceImplName()
35 return "ScVbaMenuBar";
38 uno::Sequence<OUString>
39 ScVbaMenuBar::getServiceNames()
41 static uno::Sequence< OUString > const aServiceNames
43 "ooo.vba.excel.MenuBar"
45 return aServiceNames;
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */