1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SC_APPLUNO_HXX
21 #define SC_APPLUNO_HXX
23 #include <svl/itemprop.hxx>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <com/sun/star/beans/XPropertySet.hpp>
26 #include <com/sun/star/sheet/XRecentFunctions.hpp>
27 #include <com/sun/star/sheet/XFunctionDescriptions.hpp>
28 #include <com/sun/star/container/XEnumerationAccess.hpp>
29 #include <com/sun/star/container/XNameAccess.hpp>
30 #include <cppuhelper/implbase2.hxx>
31 #include <cppuhelper/implbase4.hxx>
32 #include <rtl/ustring.hxx>
36 com::sun::star::uno::Reference
<com::sun::star::uno::XInterface
> SAL_CALL
37 ScSpreadsheetSettings_CreateInstance(
38 const com::sun::star::uno::Reference
<
39 com::sun::star::lang::XMultiServiceFactory
>& rSMgr
);
40 com::sun::star::uno::Reference
<com::sun::star::uno::XInterface
> SAL_CALL
41 ScRecentFunctionsObj_CreateInstance(
42 const com::sun::star::uno::Reference
<
43 com::sun::star::lang::XMultiServiceFactory
>& rSMgr
);
44 com::sun::star::uno::Reference
<com::sun::star::uno::XInterface
> SAL_CALL
45 ScFunctionListObj_CreateInstance(
46 const com::sun::star::uno::Reference
<
47 com::sun::star::lang::XMultiServiceFactory
>& rSMgr
);
50 class ScSpreadsheetSettings
: public cppu::WeakImplHelper2
<
51 com::sun::star::beans::XPropertySet
,
52 com::sun::star::lang::XServiceInfo
>
55 SfxItemPropertySet aPropSet
;
58 ScSpreadsheetSettings();
59 virtual ~ScSpreadsheetSettings();
61 static ::rtl::OUString
getImplementationName_Static();
62 static ::com::sun::star::uno::Sequence
< ::rtl::OUString
> getSupportedServiceNames_Static();
65 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
66 SAL_CALL
getPropertySetInfo()
67 throw(::com::sun::star::uno::RuntimeException
);
68 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
,
69 const ::com::sun::star::uno::Any
& aValue
)
70 throw(::com::sun::star::beans::UnknownPropertyException
,
71 ::com::sun::star::beans::PropertyVetoException
,
72 ::com::sun::star::lang::IllegalArgumentException
,
73 ::com::sun::star::lang::WrappedTargetException
,
74 ::com::sun::star::uno::RuntimeException
);
75 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
76 const ::rtl::OUString
& PropertyName
)
77 throw(::com::sun::star::beans::UnknownPropertyException
,
78 ::com::sun::star::lang::WrappedTargetException
,
79 ::com::sun::star::uno::RuntimeException
);
80 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
81 const ::com::sun::star::uno::Reference
<
82 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
83 throw(::com::sun::star::beans::UnknownPropertyException
,
84 ::com::sun::star::lang::WrappedTargetException
,
85 ::com::sun::star::uno::RuntimeException
);
86 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
87 const ::com::sun::star::uno::Reference
<
88 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
89 throw(::com::sun::star::beans::UnknownPropertyException
,
90 ::com::sun::star::lang::WrappedTargetException
,
91 ::com::sun::star::uno::RuntimeException
);
92 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
93 const ::com::sun::star::uno::Reference
<
94 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
95 throw(::com::sun::star::beans::UnknownPropertyException
,
96 ::com::sun::star::lang::WrappedTargetException
,
97 ::com::sun::star::uno::RuntimeException
);
98 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
99 const ::com::sun::star::uno::Reference
<
100 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
101 throw(::com::sun::star::beans::UnknownPropertyException
,
102 ::com::sun::star::lang::WrappedTargetException
,
103 ::com::sun::star::uno::RuntimeException
);
106 virtual ::rtl::OUString SAL_CALL
getImplementationName()
107 throw(::com::sun::star::uno::RuntimeException
);
108 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
109 throw(::com::sun::star::uno::RuntimeException
);
110 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
111 throw(::com::sun::star::uno::RuntimeException
);
115 class ScRecentFunctionsObj
: public cppu::WeakImplHelper2
<
116 com::sun::star::sheet::XRecentFunctions
,
117 com::sun::star::lang::XServiceInfo
>
120 ScRecentFunctionsObj();
121 virtual ~ScRecentFunctionsObj();
123 static ::rtl::OUString
getImplementationName_Static();
124 static ::com::sun::star::uno::Sequence
< ::rtl::OUString
> getSupportedServiceNames_Static();
127 virtual ::com::sun::star::uno::Sequence
< sal_Int32
> SAL_CALL
getRecentFunctionIds()
128 throw(::com::sun::star::uno::RuntimeException
);
129 virtual void SAL_CALL
setRecentFunctionIds( const ::com::sun::star::uno::Sequence
<
130 sal_Int32
>& aRecentFunctionIds
)
131 throw(::com::sun::star::uno::RuntimeException
);
132 virtual sal_Int32 SAL_CALL
getMaxRecentFunctions()
133 throw(::com::sun::star::uno::RuntimeException
);
136 virtual ::rtl::OUString SAL_CALL
getImplementationName()
137 throw(::com::sun::star::uno::RuntimeException
);
138 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
139 throw(::com::sun::star::uno::RuntimeException
);
140 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
141 throw(::com::sun::star::uno::RuntimeException
);
145 class ScFunctionListObj
: public cppu::WeakImplHelper4
<
146 com::sun::star::sheet::XFunctionDescriptions
,
147 com::sun::star::container::XEnumerationAccess
,
148 com::sun::star::container::XNameAccess
,
149 com::sun::star::lang::XServiceInfo
>
153 virtual ~ScFunctionListObj();
155 static ::rtl::OUString
getImplementationName_Static();
156 static ::com::sun::star::uno::Sequence
< ::rtl::OUString
> getSupportedServiceNames_Static();
158 // XFunctionDescriptions
159 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> SAL_CALL
160 getById( sal_Int32 nId
)
161 throw(::com::sun::star::lang::IllegalArgumentException
,
162 ::com::sun::star::uno::RuntimeException
);
165 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
)
166 throw(::com::sun::star::container::NoSuchElementException
,
167 ::com::sun::star::lang::WrappedTargetException
,
168 ::com::sun::star::uno::RuntimeException
);
169 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames()
170 throw(::com::sun::star::uno::RuntimeException
);
171 virtual sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
)
172 throw(::com::sun::star::uno::RuntimeException
);
175 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
176 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
177 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
178 ::com::sun::star::lang::WrappedTargetException
,
179 ::com::sun::star::uno::RuntimeException
);
181 // XEnumerationAccess
182 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
183 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
186 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
187 throw(::com::sun::star::uno::RuntimeException
);
188 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
191 virtual ::rtl::OUString SAL_CALL
getImplementationName()
192 throw(::com::sun::star::uno::RuntimeException
);
193 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
194 throw(::com::sun::star::uno::RuntimeException
);
195 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
196 throw(::com::sun::star::uno::RuntimeException
);
203 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */