fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / ui / vba / vbamenubar.cxx
blobe400ab3a31e9bc1023a49d9c6ebfa560f306febe
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 ) throw( uno::RuntimeException ) : MenuBar_BASE(rParent, rContext), m_xCommandBar(rCommandBar)
20 uno::Any SAL_CALL
21 ScVbaMenuBar::Menus( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException, std::exception)
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: */