Bump version to 4.1-6
[LibreOffice.git] / vbahelper / source / msforms / vbabutton.cxx
blobde12710724563716c5b14f0f24d028d90233230f
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "vbabutton.hxx"
21 #include "vbanewfont.hxx"
23 using namespace com::sun::star;
24 using namespace ooo::vba;
27 const static OUString LABEL( "Label" );
28 ScVbaButton::ScVbaButton( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
32 // Attributes
33 OUString SAL_CALL
34 ScVbaButton::getCaption() throw (css::uno::RuntimeException)
36 OUString Label;
37 m_xProps->getPropertyValue( LABEL ) >>= Label;
38 return Label;
41 void SAL_CALL
42 ScVbaButton::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
44 m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
47 sal_Bool SAL_CALL ScVbaButton::getAutoSize() throw (uno::RuntimeException)
49 return ScVbaControl::getAutoSize();
52 void SAL_CALL ScVbaButton::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException)
54 ScVbaControl::setAutoSize( bAutoSize );
57 sal_Bool SAL_CALL ScVbaButton::getLocked() throw (uno::RuntimeException)
59 return ScVbaControl::getLocked();
62 void SAL_CALL ScVbaButton::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException)
64 ScVbaControl::setLocked( bLocked );
67 sal_Bool SAL_CALL ScVbaButton::getCancel() throw (uno::RuntimeException)
69 return sal_False;
72 void SAL_CALL ScVbaButton::setCancel( sal_Bool /*bCancel*/ ) throw (uno::RuntimeException)
74 // #STUB
77 sal_Bool SAL_CALL ScVbaButton::getDefault() throw (uno::RuntimeException)
79 // #STUB
80 return sal_False;
83 void SAL_CALL ScVbaButton::setDefault( sal_Bool /*bDefault*/ ) throw (uno::RuntimeException)
85 // #STUB
88 sal_Int32 SAL_CALL ScVbaButton::getBackColor() throw (uno::RuntimeException)
90 return ScVbaControl::getBackColor();
93 void SAL_CALL ScVbaButton::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException)
95 ScVbaControl::setBackColor( nBackColor );
98 sal_Int32 SAL_CALL ScVbaButton::getForeColor() throw (uno::RuntimeException)
100 return ScVbaControl::getForeColor();
103 void SAL_CALL ScVbaButton::setForeColor( sal_Int32 /*nForeColor*/ ) throw (uno::RuntimeException)
105 // #STUB
108 uno::Reference< msforms::XNewFont > SAL_CALL ScVbaButton::getFont() throw (uno::RuntimeException)
110 return new VbaNewFont( this, mxContext, m_xProps );
113 OUString
114 ScVbaButton::getServiceImplName()
116 return OUString("ScVbaButton");
119 uno::Sequence< OUString >
120 ScVbaButton::getServiceNames()
122 static uno::Sequence< OUString > aServiceNames;
123 if ( aServiceNames.getLength() == 0 )
125 aServiceNames.realloc( 1 );
126 aServiceNames[ 0 ] = "ooo.vba.msforms.Button";
128 return aServiceNames;
131 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */