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 :
21 : #include <toolkit/controls/animatedimages.hxx>
22 : #include <toolkit/helper/property.hxx>
23 :
24 : #include <com/sun/star/lang/DisposedException.hpp>
25 : #include <com/sun/star/awt/VisualEffect.hpp>
26 : #include <com/sun/star/awt/ImageScaleMode.hpp>
27 : #include <com/sun/star/awt/XAnimation.hpp>
28 : #include <com/sun/star/awt/XAnimatedImages.hpp>
29 : #include <com/sun/star/beans/XPropertySetInfo.hpp>
30 : #include <com/sun/star/container/XContainerListener.hpp>
31 : #include <com/sun/star/uno/XComponentContext.hpp>
32 : #include <com/sun/star/util/XModifyListener.hpp>
33 :
34 : #include <toolkit/controls/unocontrolbase.hxx>
35 : #include <toolkit/controls/unocontrolmodel.hxx>
36 :
37 : #include <cppuhelper/implbase1.hxx>
38 : #include <cppuhelper/implbase2.hxx>
39 :
40 : #include <boost/scoped_ptr.hpp>
41 :
42 : #include "helper/unopropertyarrayhelper.hxx"
43 :
44 : using namespace css::awt;
45 : using namespace css::container;
46 : using namespace css::lang;
47 : using namespace css::uno;
48 :
49 : namespace {
50 :
51 : typedef ::cppu::AggImplInheritanceHelper2 < UnoControlBase
52 : , css::awt::XAnimation
53 : , css::container::XContainerListener
54 : > AnimatedImagesControl_Base;
55 :
56 0 : class AnimatedImagesControl : public AnimatedImagesControl_Base
57 : {
58 : public:
59 : AnimatedImagesControl();
60 : OUString GetComponentServiceName() SAL_OVERRIDE;
61 :
62 : // XAnimation
63 : virtual void SAL_CALL startAnimation( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
64 : virtual void SAL_CALL stopAnimation( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
65 : virtual sal_Bool SAL_CALL isAnimationRunning( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
66 :
67 : // XServiceInfo
68 : OUString SAL_CALL getImplementationName( ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
69 : css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
70 :
71 : // XControl
72 : sal_Bool SAL_CALL setModel( const css::uno::Reference< css::awt::XControlModel >& i_rModel ) throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
73 : void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& i_toolkit, const css::uno::Reference< css::awt::XWindowPeer >& i_parentPeer ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
74 :
75 :
76 : // XContainerListener
77 : virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
78 : virtual void SAL_CALL elementRemoved( const css::container::ContainerEvent& Event ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
79 : virtual void SAL_CALL elementReplaced( const css::container::ContainerEvent& Event ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
80 :
81 : // XEventListener
82 : virtual void SAL_CALL disposing( const css::lang::EventObject& i_event ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
83 : };
84 :
85 0 : AnimatedImagesControl::AnimatedImagesControl()
86 0 : :AnimatedImagesControl_Base()
87 : {
88 0 : }
89 :
90 :
91 0 : OUString AnimatedImagesControl::GetComponentServiceName()
92 : {
93 0 : return OUString( "AnimatedImages" );
94 : }
95 :
96 :
97 0 : void SAL_CALL AnimatedImagesControl::startAnimation( ) throw (RuntimeException, std::exception)
98 : {
99 0 : Reference< XAnimation > xAnimation( getPeer(), UNO_QUERY );
100 0 : if ( xAnimation.is() )
101 0 : xAnimation->startAnimation();
102 0 : }
103 :
104 :
105 0 : void SAL_CALL AnimatedImagesControl::stopAnimation( ) throw (RuntimeException, std::exception)
106 : {
107 0 : Reference< XAnimation > xAnimation( getPeer(), UNO_QUERY );
108 0 : if ( xAnimation.is() )
109 0 : xAnimation->stopAnimation();
110 0 : }
111 :
112 :
113 0 : sal_Bool SAL_CALL AnimatedImagesControl::isAnimationRunning( ) throw (RuntimeException, std::exception)
114 : {
115 0 : Reference< XAnimation > xAnimation( getPeer(), UNO_QUERY );
116 0 : if ( xAnimation.is() )
117 0 : return xAnimation->isAnimationRunning();
118 0 : return sal_False;
119 : }
120 :
121 :
122 0 : OUString SAL_CALL AnimatedImagesControl::getImplementationName( ) throw(RuntimeException, std::exception)
123 : {
124 0 : return OUString( "org.openoffice.comp.toolkit.AnimatedImagesControl" );
125 : }
126 :
127 :
128 0 : Sequence< OUString > SAL_CALL AnimatedImagesControl::getSupportedServiceNames() throw(RuntimeException, std::exception)
129 : {
130 0 : Sequence< OUString > aServices( AnimatedImagesControl_Base::getSupportedServiceNames() );
131 0 : aServices.realloc( aServices.getLength() + 1 );
132 0 : aServices[ aServices.getLength() - 1 ] = OUString("com.sun.star.awt.AnimatedImagesControl");
133 0 : return aServices;
134 : }
135 :
136 :
137 : namespace
138 : {
139 0 : void lcl_updatePeer( Reference< XWindowPeer > const& i_peer, Reference< XControlModel > const& i_model )
140 : {
141 0 : const Reference< css::util::XModifyListener > xPeerModify( i_peer, UNO_QUERY );
142 0 : if ( xPeerModify.is() )
143 : {
144 0 : EventObject aEvent;
145 0 : aEvent.Source = i_model;
146 0 : xPeerModify->modified( aEvent );
147 0 : }
148 0 : }
149 : }
150 :
151 :
152 0 : sal_Bool SAL_CALL AnimatedImagesControl::setModel( const Reference< XControlModel >& i_rModel ) throw ( RuntimeException, std::exception )
153 : {
154 0 : const Reference< XAnimatedImages > xOldContainer( getModel(), UNO_QUERY );
155 0 : const Reference< XAnimatedImages > xNewContainer( i_rModel, UNO_QUERY );
156 :
157 0 : if ( !AnimatedImagesControl_Base::setModel( i_rModel ) )
158 0 : return sal_False;
159 :
160 0 : if ( xOldContainer.is() )
161 0 : xOldContainer->removeContainerListener( this );
162 :
163 0 : if ( xNewContainer.is() )
164 0 : xNewContainer->addContainerListener( this );
165 :
166 0 : lcl_updatePeer( getPeer(), getModel() );
167 :
168 0 : return sal_True;
169 : }
170 :
171 :
172 0 : void SAL_CALL AnimatedImagesControl::createPeer( const Reference< XToolkit >& i_toolkit, const Reference< XWindowPeer >& i_parentPeer ) throw(RuntimeException, std::exception)
173 : {
174 0 : AnimatedImagesControl_Base::createPeer( i_toolkit, i_parentPeer );
175 :
176 0 : lcl_updatePeer( getPeer(), getModel() );
177 0 : }
178 :
179 :
180 0 : void SAL_CALL AnimatedImagesControl::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException, std::exception)
181 : {
182 0 : const Reference< XContainerListener > xPeerListener( getPeer(), UNO_QUERY );
183 0 : if ( xPeerListener.is() )
184 0 : xPeerListener->elementInserted( i_event );
185 0 : }
186 :
187 :
188 0 : void SAL_CALL AnimatedImagesControl::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException, std::exception)
189 : {
190 0 : const Reference< XContainerListener > xPeerListener( getPeer(), UNO_QUERY );
191 0 : if ( xPeerListener.is() )
192 0 : xPeerListener->elementRemoved( i_event );
193 0 : }
194 :
195 :
196 0 : void SAL_CALL AnimatedImagesControl::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException, std::exception)
197 : {
198 0 : const Reference< XContainerListener > xPeerListener( getPeer(), UNO_QUERY );
199 0 : if ( xPeerListener.is() )
200 0 : xPeerListener->elementReplaced( i_event );
201 0 : }
202 :
203 :
204 0 : void SAL_CALL AnimatedImagesControl::disposing( const EventObject& i_event ) throw (RuntimeException, std::exception)
205 : {
206 0 : UnoControlBase::disposing( i_event );
207 0 : }
208 :
209 : }
210 :
211 : namespace toolkit {
212 :
213 0 : struct AnimatedImagesControlModel_Data
214 : {
215 : ::std::vector< Sequence< OUString > > aImageSets;
216 : };
217 :
218 : namespace
219 : {
220 0 : void lcl_checkIndex( const AnimatedImagesControlModel_Data& i_data, const sal_Int32 i_index, const Reference< XInterface >& i_context,
221 : const bool i_forInsert = false )
222 : {
223 0 : if ( ( i_index < 0 ) || ( size_t( i_index ) > i_data.aImageSets.size() + ( i_forInsert ? 1 : 0 ) ) )
224 0 : throw IndexOutOfBoundsException( OUString(), i_context );
225 0 : }
226 :
227 0 : void lcl_notify( ::osl::ClearableMutexGuard& i_guard, ::cppu::OBroadcastHelper& i_broadcaseHelper,
228 : void ( SAL_CALL XContainerListener::*i_notificationMethod )( const ContainerEvent& ),
229 : const sal_Int32 i_accessor, const Sequence< OUString >& i_imageURLs, const Reference< XInterface >& i_context )
230 : {
231 0 : ::cppu::OInterfaceContainerHelper* pContainerListeners = i_broadcaseHelper.getContainer( cppu::UnoType<XContainerListener>::get() );
232 0 : if ( pContainerListeners == NULL )
233 0 : return;
234 :
235 0 : ContainerEvent aEvent;
236 0 : aEvent.Source = i_context;
237 0 : aEvent.Accessor <<= i_accessor;
238 0 : aEvent.Element <<= i_imageURLs;
239 :
240 0 : i_guard.clear();
241 0 : pContainerListeners->notifyEach( i_notificationMethod, aEvent );
242 : }
243 : }
244 :
245 :
246 0 : AnimatedImagesControlModel::AnimatedImagesControlModel( Reference< com::sun::star::uno::XComponentContext > const & i_factory )
247 : :AnimatedImagesControlModel_Base( i_factory )
248 0 : ,m_pData( new AnimatedImagesControlModel_Data )
249 : {
250 0 : ImplRegisterProperty( BASEPROPERTY_AUTO_REPEAT );
251 0 : ImplRegisterProperty( BASEPROPERTY_BORDER );
252 0 : ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR );
253 0 : ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
254 0 : ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
255 0 : ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE );
256 0 : ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
257 0 : ImplRegisterProperty( BASEPROPERTY_HELPURL );
258 0 : ImplRegisterProperty( BASEPROPERTY_IMAGE_SCALE_MODE );
259 0 : ImplRegisterProperty( BASEPROPERTY_STEP_TIME );
260 0 : }
261 :
262 :
263 0 : AnimatedImagesControlModel::AnimatedImagesControlModel( const AnimatedImagesControlModel& i_copySource )
264 : :AnimatedImagesControlModel_Base( i_copySource )
265 0 : ,m_pData( new AnimatedImagesControlModel_Data( *i_copySource.m_pData ) )
266 : {
267 0 : }
268 :
269 :
270 0 : AnimatedImagesControlModel::~AnimatedImagesControlModel()
271 : {
272 0 : }
273 :
274 :
275 0 : UnoControlModel* AnimatedImagesControlModel::Clone() const
276 : {
277 0 : return new AnimatedImagesControlModel( *this );
278 : }
279 :
280 :
281 0 : Reference< css::beans::XPropertySetInfo > SAL_CALL AnimatedImagesControlModel::getPropertySetInfo( ) throw(RuntimeException, std::exception)
282 : {
283 0 : static Reference< css::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
284 0 : return xInfo;
285 : }
286 :
287 :
288 0 : OUString SAL_CALL AnimatedImagesControlModel::getServiceName() throw(RuntimeException, std::exception)
289 : {
290 0 : return OUString("com.sun.star.awt.AnimatedImagesControlModel");
291 : }
292 :
293 :
294 0 : OUString SAL_CALL AnimatedImagesControlModel::getImplementationName( ) throw(RuntimeException, std::exception)
295 : {
296 0 : return OUString("org.openoffice.comp.toolkit.AnimatedImagesControlModel");
297 : }
298 :
299 :
300 0 : Sequence< OUString > SAL_CALL AnimatedImagesControlModel::getSupportedServiceNames() throw(RuntimeException, std::exception)
301 : {
302 0 : Sequence< OUString > aServiceNames(2);
303 0 : aServiceNames[0] = "com.sun.star.awt.AnimatedImagesControlModel";
304 0 : aServiceNames[1] = "com.sun.star.awt.UnoControlModel";
305 0 : return aServiceNames;
306 : }
307 :
308 :
309 0 : void SAL_CALL AnimatedImagesControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 i_handle, const Any& i_value ) throw (Exception, std::exception)
310 : {
311 0 : switch ( i_handle )
312 : {
313 : case BASEPROPERTY_IMAGE_SCALE_MODE:
314 : {
315 0 : sal_Int16 nImageScaleMode( ImageScaleMode::ANISOTROPIC );
316 0 : OSL_VERIFY( i_value >>= nImageScaleMode ); // convertFastPropertyValue ensures that this has the proper type
317 0 : if ( ( nImageScaleMode != ImageScaleMode::NONE )
318 0 : && ( nImageScaleMode != ImageScaleMode::ISOTROPIC )
319 0 : && ( nImageScaleMode != ImageScaleMode::ANISOTROPIC )
320 : )
321 0 : throw IllegalArgumentException( OUString(), *this, 1 );
322 : }
323 0 : break;
324 : }
325 :
326 0 : AnimatedImagesControlModel_Base::setFastPropertyValue_NoBroadcast( i_handle, i_value );
327 0 : }
328 :
329 :
330 0 : Any AnimatedImagesControlModel::ImplGetDefaultValue( sal_uInt16 i_propertyId ) const
331 : {
332 0 : switch ( i_propertyId )
333 : {
334 : case BASEPROPERTY_DEFAULTCONTROL:
335 0 : return makeAny( OUString("com.sun.star.awt.AnimatedImagesControl") );
336 :
337 : case BASEPROPERTY_BORDER:
338 0 : return makeAny( css::awt::VisualEffect::NONE );
339 :
340 : case BASEPROPERTY_STEP_TIME:
341 0 : return makeAny( (sal_Int32) 100 );
342 :
343 : case BASEPROPERTY_AUTO_REPEAT:
344 0 : return makeAny( true );
345 :
346 : case BASEPROPERTY_IMAGE_SCALE_MODE:
347 0 : return makeAny( ImageScaleMode::NONE );
348 :
349 : default:
350 0 : return UnoControlModel::ImplGetDefaultValue( i_propertyId );
351 : }
352 : }
353 :
354 :
355 0 : ::cppu::IPropertyArrayHelper& SAL_CALL AnimatedImagesControlModel::getInfoHelper()
356 : {
357 : static UnoPropertyArrayHelper* pHelper = NULL;
358 0 : if ( !pHelper )
359 : {
360 0 : Sequence< sal_Int32 > aIDs = ImplGetPropertyIds();
361 0 : pHelper = new UnoPropertyArrayHelper( aIDs );
362 : }
363 0 : return *pHelper;
364 : }
365 :
366 :
367 0 : ::sal_Int32 SAL_CALL AnimatedImagesControlModel::getStepTime() throw (RuntimeException, std::exception)
368 : {
369 0 : sal_Int32 nStepTime( 100 );
370 0 : OSL_VERIFY( getPropertyValue( GetPropertyName( BASEPROPERTY_STEP_TIME ) ) >>= nStepTime );
371 0 : return nStepTime;
372 : }
373 :
374 :
375 0 : void SAL_CALL AnimatedImagesControlModel::setStepTime( ::sal_Int32 i_stepTime ) throw (RuntimeException, std::exception)
376 : {
377 0 : setPropertyValue( GetPropertyName( BASEPROPERTY_STEP_TIME ), makeAny( i_stepTime ) );
378 0 : }
379 :
380 :
381 0 : sal_Bool SAL_CALL AnimatedImagesControlModel::getAutoRepeat() throw (RuntimeException, std::exception)
382 : {
383 0 : bool bAutoRepeat( true );
384 0 : OSL_VERIFY( getPropertyValue( GetPropertyName( BASEPROPERTY_AUTO_REPEAT ) ) >>= bAutoRepeat );
385 0 : return bAutoRepeat;
386 : }
387 :
388 :
389 0 : void SAL_CALL AnimatedImagesControlModel::setAutoRepeat( sal_Bool i_autoRepeat ) throw (RuntimeException, std::exception)
390 : {
391 0 : setPropertyValue( GetPropertyName( BASEPROPERTY_AUTO_REPEAT ), makeAny( i_autoRepeat ) );
392 0 : }
393 :
394 :
395 0 : ::sal_Int16 SAL_CALL AnimatedImagesControlModel::getScaleMode() throw (RuntimeException, std::exception)
396 : {
397 0 : sal_Int16 nImageScaleMode( ImageScaleMode::ANISOTROPIC );
398 0 : OSL_VERIFY( getPropertyValue( GetPropertyName( BASEPROPERTY_IMAGE_SCALE_MODE ) ) >>= nImageScaleMode );
399 0 : return nImageScaleMode;
400 : }
401 :
402 :
403 0 : void SAL_CALL AnimatedImagesControlModel::setScaleMode( ::sal_Int16 i_scaleMode ) throw (IllegalArgumentException, RuntimeException, std::exception)
404 : {
405 0 : setPropertyValue( GetPropertyName( BASEPROPERTY_IMAGE_SCALE_MODE ), makeAny( i_scaleMode ) );
406 0 : }
407 :
408 :
409 0 : ::sal_Int32 SAL_CALL AnimatedImagesControlModel::getImageSetCount( ) throw (RuntimeException, std::exception)
410 : {
411 0 : ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
412 0 : if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose )
413 0 : throw DisposedException();
414 :
415 0 : return m_pData->aImageSets.size();
416 : }
417 :
418 :
419 0 : Sequence< OUString > SAL_CALL AnimatedImagesControlModel::getImageSet( ::sal_Int32 i_index ) throw (IndexOutOfBoundsException, RuntimeException, std::exception)
420 : {
421 0 : ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
422 0 : if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose )
423 0 : throw DisposedException();
424 :
425 0 : lcl_checkIndex( *m_pData, i_index, *this );
426 :
427 0 : return m_pData->aImageSets[ i_index ];
428 : }
429 :
430 :
431 0 : void SAL_CALL AnimatedImagesControlModel::insertImageSet( ::sal_Int32 i_index, const Sequence< OUString >& i_imageURLs ) throw (IndexOutOfBoundsException, RuntimeException, std::exception)
432 : {
433 0 : ::osl::ClearableMutexGuard aGuard( GetMutex() );
434 : // sanity checks
435 0 : if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose )
436 0 : throw DisposedException();
437 :
438 0 : lcl_checkIndex( *m_pData, i_index, *this, true );
439 :
440 : // actaul insertion
441 0 : m_pData->aImageSets.insert( m_pData->aImageSets.begin() + i_index, i_imageURLs );
442 :
443 : // listener notification
444 0 : lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementInserted, i_index, i_imageURLs, *this );
445 0 : }
446 :
447 :
448 0 : void SAL_CALL AnimatedImagesControlModel::replaceImageSet( ::sal_Int32 i_index, const Sequence< OUString >& i_imageURLs ) throw (IndexOutOfBoundsException, RuntimeException, std::exception)
449 : {
450 0 : ::osl::ClearableMutexGuard aGuard( GetMutex() );
451 : // sanity checks
452 0 : if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose )
453 0 : throw DisposedException();
454 :
455 0 : lcl_checkIndex( *m_pData, i_index, *this );
456 :
457 : // actaul insertion
458 0 : m_pData->aImageSets[ i_index ] = i_imageURLs;
459 :
460 : // listener notification
461 0 : lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementReplaced, i_index, i_imageURLs, *this );
462 0 : }
463 :
464 :
465 0 : void SAL_CALL AnimatedImagesControlModel::removeImageSet( ::sal_Int32 i_index ) throw (IndexOutOfBoundsException, RuntimeException, std::exception)
466 : {
467 0 : ::osl::ClearableMutexGuard aGuard( GetMutex() );
468 : // sanity checks
469 0 : if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose )
470 0 : throw DisposedException();
471 :
472 0 : lcl_checkIndex( *m_pData, i_index, *this );
473 :
474 : // actual removal
475 0 : ::std::vector< Sequence< OUString > >::iterator removalPos = m_pData->aImageSets.begin() + i_index;
476 0 : Sequence< OUString > aRemovedElement( *removalPos );
477 0 : m_pData->aImageSets.erase( removalPos );
478 :
479 : // listener notification
480 0 : lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementRemoved, i_index, aRemovedElement, *this );
481 0 : }
482 :
483 :
484 0 : void SAL_CALL AnimatedImagesControlModel::addContainerListener( const Reference< XContainerListener >& i_listener ) throw (RuntimeException, std::exception)
485 : {
486 0 : BrdcstHelper.addListener( cppu::UnoType<XContainerListener>::get(), i_listener );
487 0 : }
488 :
489 :
490 0 : void SAL_CALL AnimatedImagesControlModel::removeContainerListener( const Reference< XContainerListener >& i_listener ) throw (RuntimeException, std::exception)
491 : {
492 0 : BrdcstHelper.removeListener( cppu::UnoType<XContainerListener>::get(), i_listener );
493 0 : }
494 :
495 : }
496 :
497 : extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
498 0 : org_openoffice_comp_toolkit_AnimatedImagesControl_get_implementation(
499 : css::uno::XComponentContext *,
500 : css::uno::Sequence<css::uno::Any> const &)
501 : {
502 0 : return cppu::acquire(new AnimatedImagesControl());
503 : }
504 :
505 : extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
506 0 : org_openoffice_comp_toolkit_AnimatedImagesControlModel_get_implementation(
507 : css::uno::XComponentContext *context,
508 : css::uno::Sequence<css::uno::Any> const &)
509 : {
510 0 : return cppu::acquire(new toolkit::AnimatedImagesControlModel(context));
511 : }
512 :
513 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|