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 :
27 0 : const static OUString LABEL( "Label" );
28 0 : 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 )
29 : {
30 0 : }
31 :
32 : // Attributes
33 : OUString SAL_CALL
34 0 : ScVbaButton::getCaption() throw (css::uno::RuntimeException)
35 : {
36 0 : OUString Label;
37 0 : m_xProps->getPropertyValue( LABEL ) >>= Label;
38 0 : return Label;
39 : }
40 :
41 : void SAL_CALL
42 0 : ScVbaButton::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
43 : {
44 0 : m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
45 0 : }
46 :
47 0 : sal_Bool SAL_CALL ScVbaButton::getAutoSize() throw (uno::RuntimeException)
48 : {
49 0 : return ScVbaControl::getAutoSize();
50 : }
51 :
52 0 : void SAL_CALL ScVbaButton::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException)
53 : {
54 0 : ScVbaControl::setAutoSize( bAutoSize );
55 0 : }
56 :
57 0 : sal_Bool SAL_CALL ScVbaButton::getLocked() throw (uno::RuntimeException)
58 : {
59 0 : return ScVbaControl::getLocked();
60 : }
61 :
62 0 : void SAL_CALL ScVbaButton::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException)
63 : {
64 0 : ScVbaControl::setLocked( bLocked );
65 0 : }
66 :
67 0 : sal_Bool SAL_CALL ScVbaButton::getCancel() throw (uno::RuntimeException)
68 : {
69 0 : return sal_False;
70 : }
71 :
72 0 : void SAL_CALL ScVbaButton::setCancel( sal_Bool /*bCancel*/ ) throw (uno::RuntimeException)
73 : {
74 : // #STUB
75 0 : }
76 :
77 0 : sal_Bool SAL_CALL ScVbaButton::getDefault() throw (uno::RuntimeException)
78 : {
79 : // #STUB
80 0 : return sal_False;
81 : }
82 :
83 0 : void SAL_CALL ScVbaButton::setDefault( sal_Bool /*bDefault*/ ) throw (uno::RuntimeException)
84 : {
85 : // #STUB
86 0 : }
87 :
88 0 : sal_Int32 SAL_CALL ScVbaButton::getBackColor() throw (uno::RuntimeException)
89 : {
90 0 : return ScVbaControl::getBackColor();
91 : }
92 :
93 0 : void SAL_CALL ScVbaButton::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException)
94 : {
95 0 : ScVbaControl::setBackColor( nBackColor );
96 0 : }
97 :
98 0 : sal_Int32 SAL_CALL ScVbaButton::getForeColor() throw (uno::RuntimeException)
99 : {
100 0 : return ScVbaControl::getForeColor();
101 : }
102 :
103 0 : void SAL_CALL ScVbaButton::setForeColor( sal_Int32 /*nForeColor*/ ) throw (uno::RuntimeException)
104 : {
105 : // #STUB
106 0 : }
107 :
108 0 : uno::Reference< msforms::XNewFont > SAL_CALL ScVbaButton::getFont() throw (uno::RuntimeException)
109 : {
110 0 : return new VbaNewFont( this, mxContext, m_xProps );
111 : }
112 :
113 : OUString
114 0 : ScVbaButton::getServiceImplName()
115 : {
116 0 : return OUString("ScVbaButton");
117 : }
118 :
119 : uno::Sequence< OUString >
120 0 : ScVbaButton::getServiceNames()
121 : {
122 0 : static uno::Sequence< OUString > aServiceNames;
123 0 : if ( aServiceNames.getLength() == 0 )
124 : {
125 0 : aServiceNames.realloc( 1 );
126 0 : aServiceNames[ 0 ] = "ooo.vba.msforms.Button";
127 : }
128 0 : return aServiceNames;
129 0 : }
130 :
131 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|