2010-10-27 12:43:08 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2010-10-13 11:30:25 +01:00
|
|
|
/*
|
2013-04-24 17:14:03 +01:00
|
|
|
* This file is part of the LibreOffice project.
|
2010-10-13 11:30:25 +01:00
|
|
|
*
|
2013-04-24 17:14:03 +01:00
|
|
|
* 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/.
|
2010-10-13 11:30:25 +01:00
|
|
|
*/
|
2010-10-06 10:28:20 +01:00
|
|
|
#include "vbamenuitem.hxx"
|
|
|
|
|
|
|
|
using namespace com::sun::star;
|
|
|
|
using namespace ooo::vba;
|
|
|
|
|
2015-03-04 16:29:43 +00:00
|
|
|
ScVbaMenuItem::ScVbaMenuItem( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< XCommandBarControl >& rCommandBarControl ) throw( uno::RuntimeException ) : MenuItem_BASE( rParent, rContext ), m_xCommandBarControl( rCommandBarControl )
|
2010-10-06 10:28:20 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString SAL_CALL
|
2014-02-25 21:31:58 +01:00
|
|
|
ScVbaMenuItem::getCaption() throw ( uno::RuntimeException, std::exception )
|
2010-10-06 10:28:20 +01:00
|
|
|
{
|
|
|
|
return m_xCommandBarControl->getCaption();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL
|
2014-02-25 21:31:58 +01:00
|
|
|
ScVbaMenuItem::setCaption( const OUString& _caption ) throw (uno::RuntimeException, std::exception)
|
2010-10-06 10:28:20 +01:00
|
|
|
{
|
|
|
|
m_xCommandBarControl->setCaption( _caption );
|
|
|
|
}
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString SAL_CALL
|
2014-02-25 21:31:58 +01:00
|
|
|
ScVbaMenuItem::getOnAction() throw ( uno::RuntimeException, std::exception )
|
2010-10-06 10:28:20 +01:00
|
|
|
{
|
|
|
|
return m_xCommandBarControl->getOnAction();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL
|
2014-02-25 21:31:58 +01:00
|
|
|
ScVbaMenuItem::setOnAction( const OUString& _onaction ) throw (uno::RuntimeException, std::exception)
|
2010-10-06 10:28:20 +01:00
|
|
|
{
|
|
|
|
m_xCommandBarControl->setOnAction( _onaction );
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL
|
2014-02-25 21:31:58 +01:00
|
|
|
ScVbaMenuItem::Delete( ) throw (script::BasicErrorException, uno::RuntimeException, std::exception)
|
2010-10-06 10:28:20 +01:00
|
|
|
{
|
|
|
|
m_xCommandBarControl->Delete();
|
|
|
|
}
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString
|
2010-10-06 10:28:20 +01:00
|
|
|
ScVbaMenuItem::getServiceImplName()
|
|
|
|
{
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString("ScVbaMenuItem");
|
2010-10-06 10:28:20 +01:00
|
|
|
}
|
2012-03-24 14:00:06 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
uno::Sequence<OUString>
|
2010-10-06 10:28:20 +01:00
|
|
|
ScVbaMenuItem::getServiceNames()
|
|
|
|
{
|
2013-04-07 12:06:47 +02:00
|
|
|
static uno::Sequence< OUString > aServiceNames;
|
2010-10-06 10:28:20 +01:00
|
|
|
if ( aServiceNames.getLength() == 0 )
|
|
|
|
{
|
|
|
|
aServiceNames.realloc( 1 );
|
2013-11-04 11:22:26 +02:00
|
|
|
aServiceNames[ 0 ] = "ooo.vba.excel.MenuItem";
|
2010-10-06 10:28:20 +01:00
|
|
|
}
|
|
|
|
return aServiceNames;
|
|
|
|
}
|
2010-10-27 12:43:08 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|