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_FUNCUNO_HXX
21 #define SC_FUNCUNO_HXX
23 #include <com/sun/star/lang/XServiceInfo.hpp>
24 #include <com/sun/star/sheet/XFunctionAccess.hpp>
25 #include <com/sun/star/beans/XPropertySet.hpp>
26 #include <cppuhelper/implbase3.hxx>
27 #include <svl/lstner.hxx>
33 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
34 ScFunctionAccess_CreateInstance(
35 const ::com::sun::star::uno::Reference
<
36 ::com::sun::star::lang::XMultiServiceFactory
>& );
49 ScDocument
* GetDocument() const { return pDoc
; }
50 sal_Bool
IsInUse() const { return bInUse
; }
51 void SetInUse( sal_Bool bSet
) { bInUse
= bSet
; }
53 void SetDocument( ScDocument
* pNew
);
57 class ScFunctionAccess
: public cppu::WeakImplHelper3
<
58 com::sun::star::sheet::XFunctionAccess
,
59 com::sun::star::beans::XPropertySet
,
60 com::sun::star::lang::XServiceInfo
>,
64 ScTempDocCache aDocCache
;
65 ScDocOptions
* pOptions
;
66 SfxItemPropertyMap aPropertyMap
;
72 virtual ~ScFunctionAccess();
74 static OUString
getImplementationName_Static();
75 static ::com::sun::star::uno::Sequence
< OUString
> getSupportedServiceNames_Static();
77 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
80 virtual ::com::sun::star::uno::Any SAL_CALL
callFunction(
81 const OUString
& aName
,
82 const ::com::sun::star::uno::Sequence
<
83 ::com::sun::star::uno::Any
>& aArguments
)
84 throw(::com::sun::star::container::NoSuchElementException
,
85 ::com::sun::star::lang::IllegalArgumentException
,
86 ::com::sun::star::uno::RuntimeException
);
89 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
90 SAL_CALL
getPropertySetInfo()
91 throw(::com::sun::star::uno::RuntimeException
);
92 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
93 const ::com::sun::star::uno::Any
& aValue
)
94 throw(::com::sun::star::beans::UnknownPropertyException
,
95 ::com::sun::star::beans::PropertyVetoException
,
96 ::com::sun::star::lang::IllegalArgumentException
,
97 ::com::sun::star::lang::WrappedTargetException
,
98 ::com::sun::star::uno::RuntimeException
);
99 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
100 const OUString
& PropertyName
)
101 throw(::com::sun::star::beans::UnknownPropertyException
,
102 ::com::sun::star::lang::WrappedTargetException
,
103 ::com::sun::star::uno::RuntimeException
);
104 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
105 const ::com::sun::star::uno::Reference
<
106 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
107 throw(::com::sun::star::beans::UnknownPropertyException
,
108 ::com::sun::star::lang::WrappedTargetException
,
109 ::com::sun::star::uno::RuntimeException
);
110 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
111 const ::com::sun::star::uno::Reference
<
112 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
113 throw(::com::sun::star::beans::UnknownPropertyException
,
114 ::com::sun::star::lang::WrappedTargetException
,
115 ::com::sun::star::uno::RuntimeException
);
116 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
117 const ::com::sun::star::uno::Reference
<
118 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
119 throw(::com::sun::star::beans::UnknownPropertyException
,
120 ::com::sun::star::lang::WrappedTargetException
,
121 ::com::sun::star::uno::RuntimeException
);
122 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
123 const ::com::sun::star::uno::Reference
<
124 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
125 throw(::com::sun::star::beans::UnknownPropertyException
,
126 ::com::sun::star::lang::WrappedTargetException
,
127 ::com::sun::star::uno::RuntimeException
);
130 virtual OUString SAL_CALL
getImplementationName()
131 throw(::com::sun::star::uno::RuntimeException
);
132 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
133 throw(::com::sun::star::uno::RuntimeException
);
134 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
135 throw(::com::sun::star::uno::RuntimeException
);
141 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */