Update ooo320-m1
[ooovba.git] / svx / inc / unoshcol.hxx
blob270f46c313f14da1ef3d10d66ea62934d1a6be57
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unoshcol.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_UNOSHGRP_HXX
31 #define _SVX_UNOSHGRP_HXX
33 #include <com/sun/star/lang/XComponent.hpp>
34 #include <com/sun/star/drawing/XShapes.hpp>
35 #include <com/sun/star/lang/XServiceInfo.hpp>
36 #include <osl/mutex.hxx>
37 #include <cppuhelper/interfacecontainer.hxx>
39 #include <cppuhelper/implbase3.hxx>
40 #include "svx/svxdllapi.h"
42 class XShapeList;
44 class SvxShapeCollectionMutex
46 public:
47 ::osl::Mutex maMutex;
50 SVX_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SvxShapeCollection_NewInstance() throw();
52 /***********************************************************************
53 * *
54 ***********************************************************************/
55 class SVX_DLLPUBLIC SvxShapeCollection : public ::cppu::WeakAggImplHelper3<
56 ::com::sun::star::drawing::XShapes,
57 ::com::sun::star::lang::XServiceInfo,
58 ::com::sun::star::lang::XComponent
60 public SvxShapeCollectionMutex
62 private:
63 cppu::OInterfaceContainerHelper maShapeContainer;
65 cppu::OBroadcastHelper mrBHelper;
67 SVX_DLLPRIVATE virtual void disposing() throw();
69 public:
70 SvxShapeCollection() throw();
71 virtual ~SvxShapeCollection() throw();
73 // XInterface
74 virtual void SAL_CALL release() throw();
76 // XComponent
77 virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
78 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
79 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
81 // XIndexAccess
82 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ;
83 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);
85 // XElementAccess
86 virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
87 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
89 // XShapes
90 virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
91 virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
93 // XServiceInfo
94 virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
95 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
96 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
97 static com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static();
98 static ::rtl::OUString getImplementationName_Static();
101 ::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 );
102 #endif