Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #include "vbabutton.hxx"
21 : #include "vbanewfont.hxx"
22 :
23 : using namespace com::sun::star;
24 : using namespace ooo::vba;
25 :
26 0 : VbaButton::VbaButton( 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 )
27 : {
28 0 : }
29 :
30 : // Attributes
31 : OUString SAL_CALL
32 0 : VbaButton::getCaption() throw (css::uno::RuntimeException, std::exception)
33 : {
34 0 : OUString Label;
35 0 : m_xProps->getPropertyValue( "Label" ) >>= Label;
36 0 : return Label;
37 : }
38 :
39 : void SAL_CALL
40 0 : VbaButton::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException, std::exception)
41 : {
42 0 : m_xProps->setPropertyValue( "Label", uno::makeAny( _caption ) );
43 0 : }
44 :
45 0 : sal_Bool SAL_CALL VbaButton::getAutoSize() throw (uno::RuntimeException, std::exception)
46 : {
47 0 : return ScVbaControl::getAutoSize();
48 : }
49 :
50 0 : void SAL_CALL VbaButton::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException, std::exception)
51 : {
52 0 : ScVbaControl::setAutoSize( bAutoSize );
53 0 : }
54 :
55 0 : sal_Bool SAL_CALL VbaButton::getLocked() throw (uno::RuntimeException, std::exception)
56 : {
57 0 : return ScVbaControl::getLocked();
58 : }
59 :
60 0 : void SAL_CALL VbaButton::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException, std::exception)
61 : {
62 0 : ScVbaControl::setLocked( bLocked );
63 0 : }
64 :
65 0 : sal_Bool SAL_CALL VbaButton::getCancel() throw (uno::RuntimeException, std::exception)
66 : {
67 0 : return sal_False;
68 : }
69 :
70 0 : void SAL_CALL VbaButton::setCancel( sal_Bool /*bCancel*/ ) throw (uno::RuntimeException, std::exception)
71 : {
72 : // #STUB
73 0 : }
74 :
75 0 : sal_Bool SAL_CALL VbaButton::getDefault() throw (uno::RuntimeException, std::exception)
76 : {
77 : // #STUB
78 0 : return sal_False;
79 : }
80 :
81 0 : void SAL_CALL VbaButton::setDefault( sal_Bool /*bDefault*/ ) throw (uno::RuntimeException, std::exception)
82 : {
83 : // #STUB
84 0 : }
85 :
86 0 : sal_Int32 SAL_CALL VbaButton::getBackColor() throw (uno::RuntimeException, std::exception)
87 : {
88 0 : return ScVbaControl::getBackColor();
89 : }
90 :
91 0 : void SAL_CALL VbaButton::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException, std::exception)
92 : {
93 0 : ScVbaControl::setBackColor( nBackColor );
94 0 : }
95 :
96 0 : sal_Int32 SAL_CALL VbaButton::getForeColor() throw (uno::RuntimeException)
97 : {
98 0 : return ScVbaControl::getForeColor();
99 : }
100 :
101 0 : void SAL_CALL VbaButton::setForeColor( sal_Int32 /*nForeColor*/ ) throw (uno::RuntimeException)
102 : {
103 : // #STUB
104 0 : }
105 :
106 0 : uno::Reference< msforms::XNewFont > SAL_CALL VbaButton::getFont() throw (uno::RuntimeException, std::exception)
107 : {
108 0 : return new VbaNewFont( m_xProps );
109 : }
110 :
111 : OUString
112 0 : VbaButton::getServiceImplName()
113 : {
114 0 : return OUString("VbaButton");
115 : }
116 :
117 : uno::Sequence< OUString >
118 0 : VbaButton::getServiceNames()
119 : {
120 0 : static uno::Sequence< OUString > aServiceNames;
121 0 : if ( aServiceNames.getLength() == 0 )
122 : {
123 0 : aServiceNames.realloc( 1 );
124 0 : aServiceNames[ 0 ] = "ooo.vba.msforms.Button";
125 : }
126 0 : return aServiceNames;
127 6 : }
128 :
129 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|