update dev300-m58
[ooovba.git] / sc / source / ui / vba / vbaassistant.cxx
blobdb50f6046079182f1dda552396b08cd174662f5f
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 <sfx2/app.hxx>
36 #include <svtools/helpopt.hxx>
38 #include <ooo/vba/office/MsoAnimationType.hpp>
40 #include"vbaassistant.hxx"
43 using namespace com::sun::star;
44 using namespace ooo::vba;
46 using namespace ooo::vba::office::MsoAnimationType;
48 ScVbaAssistant::ScVbaAssistant( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext ): ScVbaAssistantImpl_BASE( xParent, xContext )
50 m_bIsVisible = sal_False;
51 m_nPointsLeft = 795;
52 m_nPointsTop = 248;
53 m_sName = rtl::OUString::createFromAscii( "Clippit" );
54 m_nAnimation = msoAnimationIdle;
57 ScVbaAssistant::~ScVbaAssistant()
61 sal_Bool SAL_CALL ScVbaAssistant::getVisible() throw (uno::RuntimeException)
63 return m_bIsVisible;
66 void SAL_CALL ScVbaAssistant::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException)
68 m_bIsVisible = bVisible;
71 sal_Bool SAL_CALL ScVbaAssistant::getOn() throw (uno::RuntimeException)
73 if( SvtHelpOptions().IsHelpAgentAutoStartMode() )
74 return sal_True;
75 else
76 return sal_False;
79 void SAL_CALL ScVbaAssistant::setOn( sal_Bool bOn ) throw (uno::RuntimeException)
81 SvtHelpOptions().SetHelpAgentAutoStartMode( bOn );
82 setVisible( bOn );
86 ::sal_Int32 SAL_CALL
87 ScVbaAssistant::getTop() throw (css::uno::RuntimeException)
89 return m_nPointsTop;
91 void SAL_CALL
92 ScVbaAssistant::setTop( ::sal_Int32 _top ) throw (css::uno::RuntimeException)
94 m_nPointsTop = _top;
96 ::sal_Int32 SAL_CALL
97 ScVbaAssistant::getLeft() throw (css::uno::RuntimeException)
99 return m_nPointsLeft;
101 void SAL_CALL
102 ScVbaAssistant::setLeft( ::sal_Int32 _left ) throw (css::uno::RuntimeException)
104 m_nPointsLeft = _left;
106 ::sal_Int32 SAL_CALL
107 ScVbaAssistant::getAnimation() throw (css::uno::RuntimeException)
109 return m_nAnimation;
111 void SAL_CALL
112 ScVbaAssistant::setAnimation( ::sal_Int32 _animation ) throw (css::uno::RuntimeException)
114 m_nAnimation = _animation;
117 ::rtl::OUString SAL_CALL
118 ScVbaAssistant::Name( ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
120 return m_sName;
123 rtl::OUString&
124 ScVbaAssistant::getServiceImplName()
126 static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaAssistant") );
127 return sImplName;
130 uno::Sequence< rtl::OUString >
131 ScVbaAssistant::getServiceNames()
133 static uno::Sequence< rtl::OUString > aServiceNames;
134 if ( aServiceNames.getLength() == 0 )
136 aServiceNames.realloc( 1 );
137 aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.Assistant" ) );
139 return aServiceNames;