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 #ifndef INCLUDED_TOOLKIT_CONTROLS_ANIMATEDIMAGES_HXX
21 #define INCLUDED_TOOLKIT_CONTROLS_ANIMATEDIMAGES_HXX
23 #include <toolkit/controls/unocontrolbase.hxx>
24 #include <toolkit/controls/unocontrolmodel.hxx>
25 #include <com/sun/star/awt/XAnimatedImages.hpp>
26 #include <com/sun/star/container/XContainerListener.hpp>
27 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <cppuhelper/implbase1.hxx>
35 struct AnimatedImagesControlModel_Data
;
36 typedef ::cppu::AggImplInheritanceHelper1
< UnoControlModel
37 , ::com::sun::star::awt::XAnimatedImages
38 > AnimatedImagesControlModel_Base
;
39 class AnimatedImagesControlModel
: public AnimatedImagesControlModel_Base
42 AnimatedImagesControlModel( ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> const & i_factory
);
43 AnimatedImagesControlModel( const AnimatedImagesControlModel
& i_copySource
);
45 virtual UnoControlModel
* Clone() const SAL_OVERRIDE
;
48 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
51 OUString SAL_CALL
getServiceName() throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
54 OUString SAL_CALL
getImplementationName( ) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
55 ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
58 virtual ::sal_Int32 SAL_CALL
getStepTime() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
59 virtual void SAL_CALL
setStepTime( ::sal_Int32 _steptime
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
60 virtual sal_Bool SAL_CALL
getAutoRepeat() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
61 virtual void SAL_CALL
setAutoRepeat( sal_Bool _autorepeat
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
62 virtual ::sal_Int16 SAL_CALL
getScaleMode() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
63 virtual void SAL_CALL
setScaleMode( ::sal_Int16 _scalemode
) throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
64 virtual ::sal_Int32 SAL_CALL
getImageSetCount( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
65 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getImageSet( ::sal_Int32 i_index
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
66 virtual void SAL_CALL
insertImageSet( ::sal_Int32 i_index
, const ::com::sun::star::uno::Sequence
< OUString
>& i_imageURLs
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
67 virtual void SAL_CALL
replaceImageSet( ::sal_Int32 i_index
, const ::com::sun::star::uno::Sequence
< OUString
>& i_imageURLs
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
68 virtual void SAL_CALL
removeImageSet( ::sal_Int32 i_index
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
70 // XAnimatedImages::XContainer
71 virtual void SAL_CALL
addContainerListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XContainerListener
>& i_listener
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
72 virtual void SAL_CALL
removeContainerListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XContainerListener
>& i_listener
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
75 virtual ~AnimatedImagesControlModel();
77 ::com::sun::star::uno::Any
ImplGetDefaultValue( sal_uInt16 nPropId
) const SAL_OVERRIDE
;
78 ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() SAL_OVERRIDE
;
79 void SAL_CALL
setFastPropertyValue_NoBroadcast( sal_Int32 nHandle
, const ::com::sun::star::uno::Any
& rValue
) throw (::com::sun::star::uno::Exception
, std::exception
) SAL_OVERRIDE
;
82 std::unique_ptr
< AnimatedImagesControlModel_Data
> m_xData
;
86 } // namespace toolkit
89 #endif // INCLUDED_TOOLKIT_CONTROLS_ANIMATEDIMAGES_HXX
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */