merge the formfield patch from ooo-build
[ooovba.git] / sc / inc / defltuno.hxx
blobabcf0145d3de924d9f2bf328fa28fd1f4a0f9b98
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: defltuno.hxx,v $
10 * $Revision: 1.3 $
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 ************************************************************************/
31 #ifndef SC_DEFLTUNO_HXX
32 #define SC_DEFLTUNO_HXX
34 #include <svtools/lstner.hxx>
35 #include <com/sun/star/lang/XServiceInfo.hpp>
36 #include <com/sun/star/beans/XPropertySet.hpp>
37 #include <com/sun/star/beans/XPropertyState.hpp>
38 #include <cppuhelper/implbase3.hxx>
39 #include <svtools/itemprop.hxx>
41 class ScDocShell;
44 class ScDocDefaultsObj : public ::cppu::WeakImplHelper3<
45 ::com::sun::star::beans::XPropertySet,
46 ::com::sun::star::beans::XPropertyState,
47 ::com::sun::star::lang::XServiceInfo >,
48 public SfxListener
50 private:
51 ScDocShell* pDocShell;
52 SfxItemPropertyMap aPropertyMap;
54 void ItemsChanged();
56 public:
57 ScDocDefaultsObj(ScDocShell* pDocSh);
58 virtual ~ScDocDefaultsObj();
60 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
62 // XPropertySet
63 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
64 SAL_CALL getPropertySetInfo()
65 throw(::com::sun::star::uno::RuntimeException);
66 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
67 const ::com::sun::star::uno::Any& aValue )
68 throw(::com::sun::star::beans::UnknownPropertyException,
69 ::com::sun::star::beans::PropertyVetoException,
70 ::com::sun::star::lang::IllegalArgumentException,
71 ::com::sun::star::lang::WrappedTargetException,
72 ::com::sun::star::uno::RuntimeException);
73 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
74 const ::rtl::OUString& PropertyName )
75 throw(::com::sun::star::beans::UnknownPropertyException,
76 ::com::sun::star::lang::WrappedTargetException,
77 ::com::sun::star::uno::RuntimeException);
78 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
79 const ::com::sun::star::uno::Reference<
80 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
81 throw(::com::sun::star::beans::UnknownPropertyException,
82 ::com::sun::star::lang::WrappedTargetException,
83 ::com::sun::star::uno::RuntimeException);
84 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
85 const ::com::sun::star::uno::Reference<
86 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
87 throw(::com::sun::star::beans::UnknownPropertyException,
88 ::com::sun::star::lang::WrappedTargetException,
89 ::com::sun::star::uno::RuntimeException);
90 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
91 const ::com::sun::star::uno::Reference<
92 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
93 throw(::com::sun::star::beans::UnknownPropertyException,
94 ::com::sun::star::lang::WrappedTargetException,
95 ::com::sun::star::uno::RuntimeException);
96 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
97 const ::com::sun::star::uno::Reference<
98 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
99 throw(::com::sun::star::beans::UnknownPropertyException,
100 ::com::sun::star::lang::WrappedTargetException,
101 ::com::sun::star::uno::RuntimeException);
103 // XPropertyState
104 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState(
105 const ::rtl::OUString& PropertyName )
106 throw(::com::sun::star::beans::UnknownPropertyException,
107 ::com::sun::star::uno::RuntimeException);
108 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL
109 getPropertyStates( const ::com::sun::star::uno::Sequence<
110 ::rtl::OUString >& aPropertyName )
111 throw(::com::sun::star::beans::UnknownPropertyException,
112 ::com::sun::star::uno::RuntimeException);
113 virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName )
114 throw(::com::sun::star::beans::UnknownPropertyException,
115 ::com::sun::star::uno::RuntimeException);
116 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(
117 const ::rtl::OUString& aPropertyName )
118 throw(::com::sun::star::beans::UnknownPropertyException,
119 ::com::sun::star::lang::WrappedTargetException,
120 ::com::sun::star::uno::RuntimeException);
122 // XServiceInfo
123 virtual ::rtl::OUString SAL_CALL getImplementationName()
124 throw(::com::sun::star::uno::RuntimeException);
125 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
126 throw(::com::sun::star::uno::RuntimeException);
127 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
128 throw(::com::sun::star::uno::RuntimeException);
132 #endif