1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 "vbalabel.hxx"
21 #include "vbanewfont.hxx"
23 using namespace com::sun::star
;
24 using namespace ooo::vba
;
26 ScVbaLabel::ScVbaLabel( const css::uno::Reference
< XHelperInterface
>& xParent
, const uno::Reference
< uno::XComponentContext
>& xContext
, const uno::Reference
< uno::XInterface
>& xControl
, const uno::Reference
< frame::XModel
>& xModel
, std::unique_ptr
<ov::AbstractGeometryAttributes
> pGeomHelper
)
27 : LabelImpl_BASE( xParent
, xContext
, xControl
, xModel
, std::move(pGeomHelper
) )
33 ScVbaLabel::getCaption()
36 m_xProps
->getPropertyValue( "Label" ) >>= Label
;
41 ScVbaLabel::setCaption( const OUString
& _caption
)
43 m_xProps
->setPropertyValue( "Label", uno::makeAny( _caption
) );
46 ScVbaLabel::getValue()
48 return uno::makeAny( getCaption() );
52 ScVbaLabel::setValue( const uno::Any
& _value
)
56 setCaption( sCaption
);
60 ScVbaLabel::getAccelerator()
67 ScVbaLabel::setAccelerator( const OUString
& /*_accelerator*/ )
72 uno::Reference
< msforms::XNewFont
> SAL_CALL
ScVbaLabel::getFont()
74 return new VbaNewFont( m_xProps
);
77 OUString
ScVbaLabel::getServiceImplName()
82 sal_Int32 SAL_CALL
ScVbaLabel::getBackColor()
84 return ScVbaControl::getBackColor();
87 void SAL_CALL
ScVbaLabel::setBackColor( sal_Int32 nBackColor
)
89 ScVbaControl::setBackColor( nBackColor
);
92 sal_Bool SAL_CALL
ScVbaLabel::getAutoSize()
94 return ScVbaControl::getAutoSize();
97 void SAL_CALL
ScVbaLabel::setAutoSize( sal_Bool bAutoSize
)
99 ScVbaControl::setAutoSize( bAutoSize
);
102 uno::Sequence
< OUString
>
103 ScVbaLabel::getServiceNames()
105 static uno::Sequence
< OUString
> const aServiceNames
107 "ooo.vba.msforms.Label"
109 return aServiceNames
;
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */