diff options
author | Niklas Nebel <nn@openoffice.org> | 2000-10-06 16:47:37 +0000 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2000-10-06 16:47:37 +0000 |
commit | f06ed2a849b685739bbe999c98605d9f17e40322 (patch) | |
tree | be440bf5f26427aa33ba5478d5b745ff2c9ae7e8 /sc/inc/funcuno.hxx | |
parent | a5a378c42f34abb349043d9bfa7f6a599052a642 (diff) |
handling of cached document corrected
Diffstat (limited to 'sc/inc/funcuno.hxx')
-rw-r--r-- | sc/inc/funcuno.hxx | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/sc/inc/funcuno.hxx b/sc/inc/funcuno.hxx index 737cb6fb245b..d968d29b497b 100644 --- a/sc/inc/funcuno.hxx +++ b/sc/inc/funcuno.hxx @@ -2,9 +2,9 @@ * * $RCSfile: funcuno.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: nn $ $Date: 2000-09-28 18:17:52 $ + * last change: $Author: nn $ $Date: 2000-10-06 17:45:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,6 +73,10 @@ #include <cppuhelper/implbase2.hxx> #endif +#ifndef _SFXLSTNER_HXX +#include <svtools/lstner.hxx> +#endif + class ScDocument; @@ -82,12 +86,32 @@ class ScDocument; ::com::sun::star::lang::XMultiServiceFactory >& ); +class ScTempDocCache +{ +private: + ScDocument* pDoc; + BOOL bInUse; + +public: + ScTempDocCache(); + ~ScTempDocCache(); + + ScDocument* GetDocument() const { return pDoc; } + BOOL IsInUse() const { return bInUse; } + void SetInUse( BOOL bSet ) { bInUse = bSet; } + + void SetDocument( ScDocument* pNew ); + void Clear(); +}; + class ScFunctionAccess : public cppu::WeakImplHelper2< com::sun::star::sheet::XFunctionAccess, - com::sun::star::lang::XServiceInfo> + com::sun::star::lang::XServiceInfo>, + public SfxListener { private: - ScDocument* pDoc; + ScTempDocCache aDocCache; + BOOL bInvalid; public: ScFunctionAccess(); @@ -96,6 +120,8 @@ public: static ::rtl::OUString getImplementationName_Static(); static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(); + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + // XFunctionAccess virtual ::com::sun::star::uno::Any SAL_CALL callFunction( const ::rtl::OUString& aName, |