merge the formfield patch from ooo-build
[ooovba.git] / vbahelper / source / msforms / vbaprogressbar.cxx
blob77f3ecabacafb598621dc6707bd2ce723c23b1f8
1 /*************************************************************************
3 * OpenOffice.org - a multi-platform office productivity suite
5 * $RCSfile$
7 * $Revision$
9 * last change: $Author$ $Date$
11 * The Contents of this file are made available subject to
12 * the terms of GNU Lesser General Public License Version 2.1.
15 * GNU Lesser General Public License Version 2.1
16 * =============================================
17 * Copyright 2005 by Sun Microsystems, Inc.
18 * 901 San Antonio Road, Palo Alto, CA 94303, USA
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License version 2.1, as published by the Free Software Foundation.
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 * Lesser General Public License for more details.
29 * You should have received a copy of the GNU Lesser General Public
30 * License along with this library; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32 * MA 02111-1307 USA
34 ************************************************************************/
35 #include "vbaprogressbar.hxx"
36 #include <vector>
38 using namespace com::sun::star;
39 using namespace ooo::vba;
41 // uno servicename com.sun.star.awt.UnoControlProgressBarMode
42 const rtl::OUString SVALUE( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") );
44 ScVbaProgressBar::ScVbaProgressBar( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ProgressBarImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
48 // Attributes
49 uno::Any SAL_CALL
50 ScVbaProgressBar::getValue() throw (css::uno::RuntimeException)
52 return m_xProps->getPropertyValue( SVALUE );
55 void SAL_CALL
56 ScVbaProgressBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
58 m_xProps->setPropertyValue( SVALUE, _value );
61 rtl::OUString&
62 ScVbaProgressBar::getServiceImplName()
64 static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaProgressBar") );
65 return sImplName;
68 uno::Sequence< rtl::OUString >
69 ScVbaProgressBar::getServiceNames()
71 static uno::Sequence< rtl::OUString > aServiceNames;
72 if ( aServiceNames.getLength() == 0 )
74 aServiceNames.realloc( 1 );
75 aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Label" ) );
77 return aServiceNames;