GPU-Calc: remove Alloc_Host_Ptr for clmem of NAN vector
[LibreOffice.git] / sc / source / ui / vba / vbamenubar.cxx
blob065db3a227c8dcd13f9f484e9cdfd2ecff30b5f8
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 > xParent, const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< XCommandBar >& xCommandBar ) throw( uno::RuntimeException ) : MenuBar_BASE( xParent, xContext ), m_xCommandBar( xCommandBar )
20 uno::Any SAL_CALL
21 ScVbaMenuBar::Menus( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException)
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 OUString("ScVbaMenuBar");
38 uno::Sequence<OUString>
39 ScVbaMenuBar::getServiceNames()
41 static uno::Sequence< OUString > aServiceNames;
42 if ( aServiceNames.getLength() == 0 )
44 aServiceNames.realloc( 1 );
45 aServiceNames[ 0 ] = "ooo.vba.excel.MenuBar";
47 return aServiceNames;
50 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */