20#include <com/sun/star/uno/XComponentContext.hpp>
26using namespace css::uno;
31class SpinningProgressControlModel :
public SpinningProgressControlModel_Base
34 explicit SpinningProgressControlModel( css::uno::Reference< css::uno::XComponentContext >
const & i_factory );
35 SpinningProgressControlModel(
const SpinningProgressControlModel& rOther) : SpinningProgressControlModel_Base(rOther) {}
40 css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( )
override;
43 OUString SAL_CALL getServiceName()
override;
50 virtual ~SpinningProgressControlModel()
override;
53 SpinningProgressControlModel::SpinningProgressControlModel( Reference< XComponentContext >
const & i_factory )
54 :SpinningProgressControlModel_Base( i_factory )
57 osl_atomic_increment( &m_refCount );
61 Throbber::ImageSet aImageSets[] =
63 Throbber::ImageSet::N16px, Throbber::ImageSet::N32px, Throbber::ImageSet::N64px
67 const ::std::vector< OUString > aDefaultURLs( Throbber::getDefaultImageURLs( aImageSets[i] ) );
68 const Sequence< OUString > aImageURLs( aDefaultURLs.data(), aDefaultURLs.size() );
69 insertImageSet( i, aImageURLs );
72 catch(
const Exception& )
77 osl_atomic_decrement( &m_refCount );
81 SpinningProgressControlModel::~SpinningProgressControlModel()
88 return new SpinningProgressControlModel( *
this );
92 Reference< beans::XPropertySetInfo > SAL_CALL SpinningProgressControlModel::getPropertySetInfo( )
94 static Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
99 OUString SAL_CALL SpinningProgressControlModel::getServiceName()
101 return "com.sun.star.awt.SpinningProgressControlModel";
105 OUString SAL_CALL SpinningProgressControlModel::getImplementationName( )
107 return "org.openoffice.comp.toolkit.SpinningProgressControlModel";
111 Sequence< OUString > SAL_CALL SpinningProgressControlModel::getSupportedServiceNames()
113 return {
"com.sun.star.awt.SpinningProgressControlModel",
114 "com.sun.star.awt.AnimatedImagesControlModel",
115 "com.sun.star.awt.UnoControlModel" };
120extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
122 css::uno::XComponentContext *context,
123 css::uno::Sequence<css::uno::Any>
const &)
125 return cppu::acquire(
new SpinningProgressControlModel(context));
#define DBG_UNHANDLED_EXCEPTION(...)
#define SAL_N_ELEMENTS(arr)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * org_openoffice_comp_toolkit_SpinningProgressControlModel_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)