xref: /trunk/main/sd/source/ui/unoidl/unopback.hxx (revision 67e470da)
1*c45d927aSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c45d927aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c45d927aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c45d927aSAndrew Rist  * distributed with this work for additional information
6*c45d927aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c45d927aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c45d927aSAndrew Rist  * "License"); you may not use this file except in compliance
9*c45d927aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c45d927aSAndrew Rist  *
11*c45d927aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*c45d927aSAndrew Rist  *
13*c45d927aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c45d927aSAndrew Rist  * software distributed under the License is distributed on an
15*c45d927aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c45d927aSAndrew Rist  * KIND, either express or implied.  See the License for the
17*c45d927aSAndrew Rist  * specific language governing permissions and limitations
18*c45d927aSAndrew Rist  * under the License.
19*c45d927aSAndrew Rist  *
20*c45d927aSAndrew Rist  *************************************************************/
21*c45d927aSAndrew Rist 
22*c45d927aSAndrew Rist 
23cdf0e10cSrcweir #ifndef _SD_UNOPBACK_HXX
24cdf0e10cSrcweir #define _SD_UNOPBACK_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
27cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyState.hpp>
28cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
29cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include <svx/unoshprp.hxx>
32cdf0e10cSrcweir #include <editeng/unoipset.hxx>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir #include <comphelper/servicehelper.hxx>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir #include <cppuhelper/implbase4.hxx>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir const SvxItemPropertySet* ImplGetPageBackgroundPropertySet();
39cdf0e10cSrcweir class SdDrawDocument;
40cdf0e10cSrcweir class SfxItemSet;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir class SdUnoPageBackground : public ::cppu::WeakImplHelper4<
43cdf0e10cSrcweir 									::com::sun::star::beans::XPropertySet,
44cdf0e10cSrcweir 									::com::sun::star::lang::XServiceInfo,
45cdf0e10cSrcweir 									::com::sun::star::beans::XPropertyState,
46cdf0e10cSrcweir 									::com::sun::star::lang::XUnoTunnel>,
47cdf0e10cSrcweir 							public SfxListener
48cdf0e10cSrcweir {
49cdf0e10cSrcweir protected:
50cdf0e10cSrcweir 	const SvxItemPropertySet*  mpPropSet;
51cdf0e10cSrcweir 	SfxItemSet*			mpSet;
52cdf0e10cSrcweir 	SdrModel*			mpDoc;
53cdf0e10cSrcweir 
54cdf0e10cSrcweir 	const SfxItemPropertySimpleEntry* getPropertyMapEntry( const ::rtl::OUString& rPropertyName ) const throw();
55cdf0e10cSrcweir public:
56cdf0e10cSrcweir 	SdUnoPageBackground( SdDrawDocument* pDoc = NULL, const SfxItemSet* pSet = NULL) throw();
57cdf0e10cSrcweir 	~SdUnoPageBackground() throw();
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 	// internal
60cdf0e10cSrcweir 	void fillItemSet( SdDrawDocument* pDoc, SfxItemSet& rSet ) throw();
61cdf0e10cSrcweir 	virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
62cdf0e10cSrcweir 
63cdf0e10cSrcweir 	// uno helper
64cdf0e10cSrcweir 	UNO3_GETIMPLEMENTATION_DECL( SdUnoPageBackground )
65cdf0e10cSrcweir 
66cdf0e10cSrcweir     // XServiceInfo
67cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
68cdf0e10cSrcweir     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
69cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 	// XPropertySet
72cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
73cdf0e10cSrcweir     virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
74cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
75cdf0e10cSrcweir     virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
76cdf0e10cSrcweir     virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
77cdf0e10cSrcweir     virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
78cdf0e10cSrcweir     virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
79cdf0e10cSrcweir 
80cdf0e10cSrcweir 	// XPropertyState
81cdf0e10cSrcweir     virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
82cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
83cdf0e10cSrcweir     virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
84cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
85cdf0e10cSrcweir };
86cdf0e10cSrcweir 
87cdf0e10cSrcweir #endif
88cdf0e10cSrcweir 
89