26#include <document.hxx>
29#include <com/sun/star/sheet/XVolatileResult.hpp>
38 const uno::Reference<sheet::XVolatileResult>& xVR,
ScDocument* pDoc )
45 xVR->addResultListener( xNew );
51 xVolRes(
std::move( xVR )),
54 pDocs->insert( pDoc );
64 sheet::XVolatileResult* pComp = xVR.get();
68 if ( pComp == listener->xVolRes.get() )
70 pLst = listener.get();
84 ScAddInDocs::iterator iter2 =
p->find( pDocumentP );
85 if( iter2 !=
p->end() )
90 if ( (*iter)->xVolRes.is() )
91 (*iter)->xVolRes->removeResultListener( *iter );
113 for (
auto const& pDoc : *
pDocs)
125 uno::Reference<sheet::XResultListener> xKeepAlive(
this );
129 xVolRes->removeResultListener(
this );
std::set< ScDocument * > ScAddInDocs
static ScAddInListener * CreateListener(const css::uno::Reference< css::sheet::XVolatileResult > &xVR, ScDocument *pDoc)
std::unique_ptr< ScAddInDocs > pDocs
virtual ~ScAddInListener() override
static void RemoveDocument(ScDocument *pDocument)
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
static ScAddInListener * Get(const css::uno::Reference< css::sheet::XVolatileResult > &xVR)
ScAddInListener(css::uno::Reference< css::sheet::XVolatileResult > xVR, ScDocument *pD)
virtual void SAL_CALL modified(const css::sheet::ResultEvent &aEvent) override
css::uno::Reference< css::sheet::XVolatileResult > xVolRes
static ::std::vector< rtl::Reference< ScAddInListener > > aAllListeners
void TrackFormulas(SfxHintId nHintId=SfxHintId::ScDataChanged)
SfxObjectShell * GetDocumentShell() const
void Broadcast(const SfxHint &rHint)
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)