bump product version to 4.2.0.1
[LibreOffice.git] / include / svx / unoshcol.hxx
blobb349b5e01ea210246d1a80a5eb03bf3531db16be
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef INCLUDED_SVX_UNOSHCOL_HXX
20 #define INCLUDED_SVX_UNOSHCOL_HXX
22 #include <com/sun/star/lang/XComponent.hpp>
23 #include <com/sun/star/drawing/XShapes.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <osl/mutex.hxx>
26 #include <cppuhelper/interfacecontainer.hxx>
28 #include <cppuhelper/implbase3.hxx>
29 #include <svx/svxdllapi.h>
31 class SvxShapeCollectionMutex
33 public:
34 ::osl::Mutex maMutex;
37 SVX_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SvxShapeCollection_NewInstance() throw();
39 /***********************************************************************
40 * *
41 ***********************************************************************/
42 class SVX_DLLPUBLIC SvxShapeCollection : public ::cppu::WeakAggImplHelper3<
43 ::com::sun::star::drawing::XShapes,
44 ::com::sun::star::lang::XServiceInfo,
45 ::com::sun::star::lang::XComponent
47 public SvxShapeCollectionMutex
49 private:
50 cppu::OInterfaceContainerHelper maShapeContainer;
52 cppu::OBroadcastHelper mrBHelper;
54 SVX_DLLPRIVATE virtual void disposing() throw();
56 public:
57 SvxShapeCollection() throw();
58 virtual ~SvxShapeCollection() throw();
60 // XInterface
61 virtual void SAL_CALL release() throw();
63 // XComponent
64 virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
65 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
66 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
68 // XIndexAccess
69 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ;
70 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
72 // XElementAccess
73 virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
74 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
76 // XShapes
77 virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
78 virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
80 // XServiceInfo
81 virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
82 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
83 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
84 static com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static();
85 static OUString getImplementationName_Static();
88 ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SvxShapeCollection_createInstance( const com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr );
89 #endif
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */