/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "vbamenubar.hxx" #include "vbamenus.hxx" #include using namespace com::sun::star; using namespace ooo::vba; 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) { } uno::Any SAL_CALL ScVbaMenuBar::Menus( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) { uno::Reference< XCommandBarControls > xCommandBarControls( m_xCommandBar->Controls( uno::Any() ), uno::UNO_QUERY_THROW ); uno::Reference< excel::XMenus > xMenus( new ScVbaMenus( this, mxContext, xCommandBarControls ) ); if( aIndex.hasValue() ) { return xMenus->Item( aIndex, uno::Any() ); } return uno::makeAny( xMenus ); } OUString ScVbaMenuBar::getServiceImplName() { return OUString("ScVbaMenuBar"); } uno::Sequence ScVbaMenuBar::getServiceNames() { static uno::Sequence< OUString > aServiceNames; if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); aServiceNames[ 0 ] = "ooo.vba.excel.MenuBar"; } return aServiceNames; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ption value='distro/cib/libreoffice-6-1'>distro/cib/libreoffice-6-1 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2010-01-15 14:01:24 +0100
committerKurt Zenker <kz@openoffice.org>2010-01-15 14:01:24 +0100
commit9f8952a33f76546fb0e58d99a0cdd947ff397701 (patch)
treef8e78f0b5f24f508ac19eedc2c8416ab853d1d46 /sd/source
parent63c6c5d78c2712b824c9194269d13422d4835487 (diff)
parent1bd8cd9fe27dac9b8261e5544715608a1cd65031 (diff)
CWS-TOOLING: integrate CWS dba33b