1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _SVX_UNOGALITEM_HXX
30 #define _SVX_UNOGALITEM_HXX
32 #include <svx/unomodel.hxx>
33 #include <comphelper/servicehelper.hxx>
34 #include <com/sun/star/lang/XServiceInfo.hpp>
35 #include <com/sun/star/gallery/XGalleryItem.hpp>
36 #include <comphelper/propertysethelper.hxx>
37 #include <comphelper/propertysetinfo.hxx>
41 namespace unogallery
{ class GalleryTheme
; }
43 namespace unogallery
{
49 class GalleryItem
: public ::cppu::OWeakAggObject
,
50 public ::com::sun::star::lang::XServiceInfo
,
51 public ::com::sun::star::lang::XTypeProvider
,
52 public ::com::sun::star::gallery::XGalleryItem
,
53 public ::comphelper::PropertySetHelper
55 friend class ::unogallery::GalleryTheme
;
59 GalleryItem( ::unogallery::GalleryTheme
& rTheme
, const GalleryObject
& rObject
);
60 ~GalleryItem() throw();
64 static ::rtl::OUString
getImplementationName_Static() throw();
65 static ::com::sun::star::uno::Sequence
< ::rtl::OUString
> getSupportedServiceNames_Static() throw();
70 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation( const ::com::sun::star::uno::Type
& rType
) throw(::com::sun::star::uno::RuntimeException
);
71 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& rType
) throw(::com::sun::star::uno::RuntimeException
);
72 virtual void SAL_CALL
acquire() throw();
73 virtual void SAL_CALL
release() throw();
76 virtual rtl::OUString SAL_CALL
getImplementationName() throw( ::com::sun::star::uno::RuntimeException
);
77 virtual sal_Bool SAL_CALL
supportsService( const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
78 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException
);
81 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
82 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw(::com::sun::star::uno::RuntimeException
);
85 virtual ::sal_Int8 SAL_CALL
getType( ) throw (::com::sun::star::uno::RuntimeException
);
88 virtual void _setPropertyValues( const comphelper::PropertyMapEntry
** ppEntries
, const ::com::sun::star::uno::Any
* pValues
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
);
89 virtual void _getPropertyValues( const comphelper::PropertyMapEntry
** ppEntries
, ::com::sun::star::uno::Any
* pValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
);
93 ::comphelper::PropertySetInfo
* createPropertySetInfo();
97 ::unogallery::GalleryTheme
* mpTheme
;
98 const ::GalleryObject
* mpGalleryObject
;
100 const ::GalleryObject
* implGetObject() const;
101 void implSetInvalid();
105 GalleryItem( const GalleryItem
& );
106 GalleryItem
& operator=( const GalleryItem
& );
109 // -----------------------
110 // - GalleryDrawingModel -
111 // -----------------------
113 class GalleryDrawingModel
: public SvxUnoDrawingModel
117 GalleryDrawingModel( SdrModel
* pDoc
) throw();
118 virtual ~GalleryDrawingModel() throw();
120 UNO3_GETIMPLEMENTATION_DECL( GalleryDrawingModel
)
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */