xref: /aoo42x/main/sc/inc/defltuno.hxx (revision 38d50f7b)
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_DEFLTUNO_HXX
25 #define SC_DEFLTUNO_HXX
26 
27 #include <svl/lstner.hxx>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/beans/XPropertySet.hpp>
30 #include <com/sun/star/beans/XPropertyState.hpp>
31 #include <cppuhelper/implbase3.hxx>
32 #include <svl/itemprop.hxx>
33 
34 class ScDocShell;
35 
36 
37 class ScDocDefaultsObj : public ::cppu::WeakImplHelper3<
38 							::com::sun::star::beans::XPropertySet,
39 							::com::sun::star::beans::XPropertyState,
40 							::com::sun::star::lang::XServiceInfo >,
41 						public SfxListener
42 {
43 private:
44 	ScDocShell*				pDocShell;
45     SfxItemPropertyMap      aPropertyMap;
46 
47 	void					ItemsChanged();
48 
49 public:
50 							ScDocDefaultsObj(ScDocShell* pDocSh);
51 	virtual					~ScDocDefaultsObj();
52 
53 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
54 
55 							// XPropertySet
56 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
57 							SAL_CALL getPropertySetInfo()
58 								throw(::com::sun::star::uno::RuntimeException);
59 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
60 									const ::com::sun::star::uno::Any& aValue )
61 								throw(::com::sun::star::beans::UnknownPropertyException,
62 									::com::sun::star::beans::PropertyVetoException,
63 									::com::sun::star::lang::IllegalArgumentException,
64 									::com::sun::star::lang::WrappedTargetException,
65 									::com::sun::star::uno::RuntimeException);
66 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
67 									const ::rtl::OUString& PropertyName )
68 								throw(::com::sun::star::beans::UnknownPropertyException,
69 									::com::sun::star::lang::WrappedTargetException,
70 									::com::sun::star::uno::RuntimeException);
71 	virtual void SAL_CALL	addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
72 									const ::com::sun::star::uno::Reference<
73 										::com::sun::star::beans::XPropertyChangeListener >& xListener )
74 								throw(::com::sun::star::beans::UnknownPropertyException,
75 									::com::sun::star::lang::WrappedTargetException,
76 									::com::sun::star::uno::RuntimeException);
77 	virtual void SAL_CALL	removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
78 									const ::com::sun::star::uno::Reference<
79 										::com::sun::star::beans::XPropertyChangeListener >& aListener )
80 								throw(::com::sun::star::beans::UnknownPropertyException,
81 									::com::sun::star::lang::WrappedTargetException,
82 									::com::sun::star::uno::RuntimeException);
83 	virtual void SAL_CALL	addVetoableChangeListener( const ::rtl::OUString& PropertyName,
84 									const ::com::sun::star::uno::Reference<
85 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
86 								throw(::com::sun::star::beans::UnknownPropertyException,
87 									::com::sun::star::lang::WrappedTargetException,
88 									::com::sun::star::uno::RuntimeException);
89 	virtual void SAL_CALL	removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
90 									const ::com::sun::star::uno::Reference<
91 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
92 								throw(::com::sun::star::beans::UnknownPropertyException,
93 									::com::sun::star::lang::WrappedTargetException,
94 									::com::sun::star::uno::RuntimeException);
95 
96 							// XPropertyState
97 	virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState(
98 									const ::rtl::OUString& PropertyName )
99 								throw(::com::sun::star::beans::UnknownPropertyException,
100 									::com::sun::star::uno::RuntimeException);
101 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL
102 							getPropertyStates( const ::com::sun::star::uno::Sequence<
103 										::rtl::OUString >& aPropertyName )
104 								throw(::com::sun::star::beans::UnknownPropertyException,
105 									::com::sun::star::uno::RuntimeException);
106 	virtual void SAL_CALL	setPropertyToDefault( const ::rtl::OUString& PropertyName )
107 								throw(::com::sun::star::beans::UnknownPropertyException,
108 									::com::sun::star::uno::RuntimeException);
109 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(
110 									const ::rtl::OUString& aPropertyName )
111 								throw(::com::sun::star::beans::UnknownPropertyException,
112 									::com::sun::star::lang::WrappedTargetException,
113 									::com::sun::star::uno::RuntimeException);
114 
115 							// XServiceInfo
116 	virtual ::rtl::OUString SAL_CALL getImplementationName()
117 								throw(::com::sun::star::uno::RuntimeException);
118 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
119 								throw(::com::sun::star::uno::RuntimeException);
120 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
121 								throw(::com::sun::star::uno::RuntimeException);
122 };
123 
124 
125 #endif
126 
127