1 /*************************************************************************
3 * OpenOffice.org - a multi-platform office productivity suite
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,
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
;
53 m_sName
= rtl::OUString::createFromAscii( "Clippit" );
54 m_nAnimation
= msoAnimationIdle
;
57 ScVbaAssistant::~ScVbaAssistant()
61 sal_Bool SAL_CALL
ScVbaAssistant::getVisible() throw (uno::RuntimeException
)
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() )
79 void SAL_CALL
ScVbaAssistant::setOn( sal_Bool bOn
) throw (uno::RuntimeException
)
81 SvtHelpOptions().SetHelpAgentAutoStartMode( bOn
);
87 ScVbaAssistant::getTop() throw (css::uno::RuntimeException
)
92 ScVbaAssistant::setTop( ::sal_Int32 _top
) throw (css::uno::RuntimeException
)
97 ScVbaAssistant::getLeft() throw (css::uno::RuntimeException
)
102 ScVbaAssistant::setLeft( ::sal_Int32 _left
) throw (css::uno::RuntimeException
)
104 m_nPointsLeft
= _left
;
107 ScVbaAssistant::getAnimation() throw (css::uno::RuntimeException
)
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
)
124 ScVbaAssistant::getServiceImplName()
126 static rtl::OUString
sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaAssistant") );
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
;