merge the formfield patch from ooo-build
[ooovba.git] / sc / inc / appluno.hxx
blobe972d33d1ed321a235577cfe4dd2851f0b1a8be9
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: appluno.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_APPLUNO_HXX
32 #define SC_APPLUNO_HXX
34 #include <svtools/itemprop.hxx>
35 #include <com/sun/star/lang/XServiceInfo.hpp>
36 #include <com/sun/star/beans/XPropertySet.hpp>
37 #include <com/sun/star/sheet/XRecentFunctions.hpp>
38 #include <com/sun/star/sheet/XFunctionDescriptions.hpp>
39 #include <com/sun/star/container/XEnumerationAccess.hpp>
40 #include <com/sun/star/container/XNameAccess.hpp>
41 #include <cppuhelper/implbase2.hxx>
42 #include <cppuhelper/implbase4.hxx>
44 class ScFunctionDescriptionObj;
48 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL
49 ScSpreadsheetSettings_CreateInstance(
50 const com::sun::star::uno::Reference<
51 com::sun::star::lang::XMultiServiceFactory>& rSMgr );
52 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL
53 ScRecentFunctionsObj_CreateInstance(
54 const com::sun::star::uno::Reference<
55 com::sun::star::lang::XMultiServiceFactory>& rSMgr );
56 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL
57 ScFunctionListObj_CreateInstance(
58 const com::sun::star::uno::Reference<
59 com::sun::star::lang::XMultiServiceFactory>& rSMgr );
62 class ScSpreadsheetSettings : public cppu::WeakImplHelper2<
63 com::sun::star::beans::XPropertySet,
64 com::sun::star::lang::XServiceInfo>
66 private:
67 SfxItemPropertySet aPropSet;
69 public:
70 ScSpreadsheetSettings();
71 virtual ~ScSpreadsheetSettings();
73 static ::rtl::OUString getImplementationName_Static();
74 static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static();
76 // XPropertySet
77 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
78 SAL_CALL getPropertySetInfo()
79 throw(::com::sun::star::uno::RuntimeException);
80 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
81 const ::com::sun::star::uno::Any& aValue )
82 throw(::com::sun::star::beans::UnknownPropertyException,
83 ::com::sun::star::beans::PropertyVetoException,
84 ::com::sun::star::lang::IllegalArgumentException,
85 ::com::sun::star::lang::WrappedTargetException,
86 ::com::sun::star::uno::RuntimeException);
87 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
88 const ::rtl::OUString& PropertyName )
89 throw(::com::sun::star::beans::UnknownPropertyException,
90 ::com::sun::star::lang::WrappedTargetException,
91 ::com::sun::star::uno::RuntimeException);
92 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
93 const ::com::sun::star::uno::Reference<
94 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
95 throw(::com::sun::star::beans::UnknownPropertyException,
96 ::com::sun::star::lang::WrappedTargetException,
97 ::com::sun::star::uno::RuntimeException);
98 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
99 const ::com::sun::star::uno::Reference<
100 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
101 throw(::com::sun::star::beans::UnknownPropertyException,
102 ::com::sun::star::lang::WrappedTargetException,
103 ::com::sun::star::uno::RuntimeException);
104 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
105 const ::com::sun::star::uno::Reference<
106 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
107 throw(::com::sun::star::beans::UnknownPropertyException,
108 ::com::sun::star::lang::WrappedTargetException,
109 ::com::sun::star::uno::RuntimeException);
110 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
111 const ::com::sun::star::uno::Reference<
112 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
113 throw(::com::sun::star::beans::UnknownPropertyException,
114 ::com::sun::star::lang::WrappedTargetException,
115 ::com::sun::star::uno::RuntimeException);
117 // XServiceInfo
118 virtual ::rtl::OUString SAL_CALL getImplementationName()
119 throw(::com::sun::star::uno::RuntimeException);
120 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
121 throw(::com::sun::star::uno::RuntimeException);
122 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
123 throw(::com::sun::star::uno::RuntimeException);
127 class ScRecentFunctionsObj : public cppu::WeakImplHelper2<
128 com::sun::star::sheet::XRecentFunctions,
129 com::sun::star::lang::XServiceInfo>
131 public:
132 ScRecentFunctionsObj();
133 virtual ~ScRecentFunctionsObj();
135 static ::rtl::OUString getImplementationName_Static();
136 static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static();
138 // XRecentFunctions
139 virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getRecentFunctionIds()
140 throw(::com::sun::star::uno::RuntimeException);
141 virtual void SAL_CALL setRecentFunctionIds( const ::com::sun::star::uno::Sequence<
142 sal_Int32 >& aRecentFunctionIds )
143 throw(::com::sun::star::uno::RuntimeException);
144 virtual sal_Int32 SAL_CALL getMaxRecentFunctions()
145 throw(::com::sun::star::uno::RuntimeException);
147 // XServiceInfo
148 virtual ::rtl::OUString SAL_CALL getImplementationName()
149 throw(::com::sun::star::uno::RuntimeException);
150 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
151 throw(::com::sun::star::uno::RuntimeException);
152 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
153 throw(::com::sun::star::uno::RuntimeException);
157 class ScFunctionListObj : public cppu::WeakImplHelper4<
158 com::sun::star::sheet::XFunctionDescriptions,
159 com::sun::star::container::XEnumerationAccess,
160 com::sun::star::container::XNameAccess,
161 com::sun::star::lang::XServiceInfo>
163 public:
164 ScFunctionListObj();
165 virtual ~ScFunctionListObj();
167 static ::rtl::OUString getImplementationName_Static();
168 static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static();
170 // XFunctionDescriptions
171 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
172 getById( sal_Int32 nId )
173 throw(::com::sun::star::lang::IllegalArgumentException,
174 ::com::sun::star::uno::RuntimeException);
176 // XNameAccess
177 virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
178 throw(::com::sun::star::container::NoSuchElementException,
179 ::com::sun::star::lang::WrappedTargetException,
180 ::com::sun::star::uno::RuntimeException);
181 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
182 throw(::com::sun::star::uno::RuntimeException);
183 virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
184 throw(::com::sun::star::uno::RuntimeException);
186 // XIndexAccess
187 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
188 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
189 throw(::com::sun::star::lang::IndexOutOfBoundsException,
190 ::com::sun::star::lang::WrappedTargetException,
191 ::com::sun::star::uno::RuntimeException);
193 // XEnumerationAccess
194 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
195 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
197 // XElementAccess
198 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
199 throw(::com::sun::star::uno::RuntimeException);
200 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
202 // XServiceInfo
203 virtual ::rtl::OUString SAL_CALL getImplementationName()
204 throw(::com::sun::star::uno::RuntimeException);
205 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
206 throw(::com::sun::star::uno::RuntimeException);
207 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
208 throw(::com::sun::star::uno::RuntimeException);
213 #endif