xref: /aoo4110/main/sc/inc/confuno.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef SC_CONFUNO_HXX
25 #define SC_CONFUNO_HXX
26 
27 #include <svl/itemprop.hxx>
28 #include <svl/lstner.hxx>
29 #include <com/sun/star/lang/XServiceInfo.hpp>
30 #include <com/sun/star/beans/XPropertySet.hpp>
31 #include <cppuhelper/implbase2.hxx>
32 
33 class ScDocShell;
34 
35 class ScDocumentConfiguration : public cppu::WeakImplHelper2<
36 										com::sun::star::beans::XPropertySet,
37 										com::sun::star::lang::XServiceInfo>,
38 								public SfxListener
39 {
40 private:
41 	ScDocShell*				pDocShell;
42 	SfxItemPropertySet		aPropSet;
43 
44 public:
45 							ScDocumentConfiguration(ScDocShell* pDocShell);
46 	virtual					~ScDocumentConfiguration();
47 
48 							// SfxListener
49 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
50 
51 							// XPropertySet
52 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
53 							SAL_CALL getPropertySetInfo()
54 								throw(::com::sun::star::uno::RuntimeException);
55 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
56 									const ::com::sun::star::uno::Any& aValue )
57 								throw(::com::sun::star::beans::UnknownPropertyException,
58 									::com::sun::star::beans::PropertyVetoException,
59 									::com::sun::star::lang::IllegalArgumentException,
60 									::com::sun::star::lang::WrappedTargetException,
61 									::com::sun::star::uno::RuntimeException);
62 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
63 									const ::rtl::OUString& PropertyName )
64 								throw(::com::sun::star::beans::UnknownPropertyException,
65 									::com::sun::star::lang::WrappedTargetException,
66 									::com::sun::star::uno::RuntimeException);
67 	virtual void SAL_CALL	addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
68 									const ::com::sun::star::uno::Reference<
69 										::com::sun::star::beans::XPropertyChangeListener >& xListener )
70 								throw(::com::sun::star::beans::UnknownPropertyException,
71 									::com::sun::star::lang::WrappedTargetException,
72 									::com::sun::star::uno::RuntimeException);
73 	virtual void SAL_CALL	removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
74 									const ::com::sun::star::uno::Reference<
75 										::com::sun::star::beans::XPropertyChangeListener >& aListener )
76 								throw(::com::sun::star::beans::UnknownPropertyException,
77 									::com::sun::star::lang::WrappedTargetException,
78 									::com::sun::star::uno::RuntimeException);
79 	virtual void SAL_CALL	addVetoableChangeListener( const ::rtl::OUString& PropertyName,
80 									const ::com::sun::star::uno::Reference<
81 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
82 								throw(::com::sun::star::beans::UnknownPropertyException,
83 									::com::sun::star::lang::WrappedTargetException,
84 									::com::sun::star::uno::RuntimeException);
85 	virtual void SAL_CALL	removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
86 									const ::com::sun::star::uno::Reference<
87 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
88 								throw(::com::sun::star::beans::UnknownPropertyException,
89 									::com::sun::star::lang::WrappedTargetException,
90 									::com::sun::star::uno::RuntimeException);
91 
92 							// XServiceInfo
93 	virtual ::rtl::OUString SAL_CALL getImplementationName()
94 								throw(::com::sun::star::uno::RuntimeException);
95 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
96 								throw(::com::sun::star::uno::RuntimeException);
97 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
98 								throw(::com::sun::star::uno::RuntimeException);
99 };
100 
101 
102 #endif
103 
104