1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: funcuno.hxx,v $
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_FUNCUNO_HXX
32 #define SC_FUNCUNO_HXX
34 #include <com/sun/star/lang/XServiceInfo.hpp>
35 #include <com/sun/star/sheet/XFunctionAccess.hpp>
36 #include <com/sun/star/beans/XPropertySet.hpp>
37 #include <cppuhelper/implbase3.hxx>
38 #include <svtools/lstner.hxx>
44 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
45 ScFunctionAccess_CreateInstance(
46 const ::com::sun::star::uno::Reference
<
47 ::com::sun::star::lang::XMultiServiceFactory
>& );
60 ScDocument
* GetDocument() const { return pDoc
; }
61 BOOL
IsInUse() const { return bInUse
; }
62 void SetInUse( BOOL bSet
) { bInUse
= bSet
; }
64 void SetDocument( ScDocument
* pNew
);
68 class ScFunctionAccess
: public cppu::WeakImplHelper3
<
69 com::sun::star::sheet::XFunctionAccess
,
70 com::sun::star::beans::XPropertySet
,
71 com::sun::star::lang::XServiceInfo
>,
75 ScTempDocCache aDocCache
;
76 ScDocOptions
* pOptions
;
77 SfxItemPropertyMap aPropertyMap
;
82 virtual ~ScFunctionAccess();
84 static ::rtl::OUString
getImplementationName_Static();
85 static ::com::sun::star::uno::Sequence
< ::rtl::OUString
> getSupportedServiceNames_Static();
87 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
90 virtual ::com::sun::star::uno::Any SAL_CALL
callFunction(
91 const ::rtl::OUString
& aName
,
92 const ::com::sun::star::uno::Sequence
<
93 ::com::sun::star::uno::Any
>& aArguments
)
94 throw(::com::sun::star::container::NoSuchElementException
,
95 ::com::sun::star::lang::IllegalArgumentException
,
96 ::com::sun::star::uno::RuntimeException
);
99 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
100 SAL_CALL
getPropertySetInfo()
101 throw(::com::sun::star::uno::RuntimeException
);
102 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
,
103 const ::com::sun::star::uno::Any
& aValue
)
104 throw(::com::sun::star::beans::UnknownPropertyException
,
105 ::com::sun::star::beans::PropertyVetoException
,
106 ::com::sun::star::lang::IllegalArgumentException
,
107 ::com::sun::star::lang::WrappedTargetException
,
108 ::com::sun::star::uno::RuntimeException
);
109 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
110 const ::rtl::OUString
& PropertyName
)
111 throw(::com::sun::star::beans::UnknownPropertyException
,
112 ::com::sun::star::lang::WrappedTargetException
,
113 ::com::sun::star::uno::RuntimeException
);
114 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
115 const ::com::sun::star::uno::Reference
<
116 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
117 throw(::com::sun::star::beans::UnknownPropertyException
,
118 ::com::sun::star::lang::WrappedTargetException
,
119 ::com::sun::star::uno::RuntimeException
);
120 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
121 const ::com::sun::star::uno::Reference
<
122 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
123 throw(::com::sun::star::beans::UnknownPropertyException
,
124 ::com::sun::star::lang::WrappedTargetException
,
125 ::com::sun::star::uno::RuntimeException
);
126 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
127 const ::com::sun::star::uno::Reference
<
128 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
129 throw(::com::sun::star::beans::UnknownPropertyException
,
130 ::com::sun::star::lang::WrappedTargetException
,
131 ::com::sun::star::uno::RuntimeException
);
132 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
133 const ::com::sun::star::uno::Reference
<
134 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
135 throw(::com::sun::star::beans::UnknownPropertyException
,
136 ::com::sun::star::lang::WrappedTargetException
,
137 ::com::sun::star::uno::RuntimeException
);
140 virtual ::rtl::OUString SAL_CALL
getImplementationName()
141 throw(::com::sun::star::uno::RuntimeException
);
142 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
143 throw(::com::sun::star::uno::RuntimeException
);
144 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
145 throw(::com::sun::star::uno::RuntimeException
);