convert Link<> to typed

Change-Id: Iaca21344f6a38f508f79e6d5983e515162a6dca3
This commit is contained in:
Noel Grandin 2015-09-09 15:52:39 +02:00
parent 71d8cfc13a
commit 9ea0390f17
5 changed files with 8 additions and 9 deletions

View file

@ -1483,7 +1483,7 @@ public:
///@}
// For vclbootstrapprotector:
static void setDeInitHook(Link<> const & hook);
static void setDeInitHook(Link<LinkParamNone*,void> const & hook);
private:

View file

@ -85,12 +85,11 @@ void test_init_impl(bool bAssertOnDialog, bool bNeedUCB,
}
struct InitHook {
DECL_STATIC_LINK(InitHook, deinitHook, void*);
DECL_STATIC_LINK_TYPED(InitHook, deinitHook, LinkParamNone*, void);
};
IMPL_STATIC_LINK_NOARG(InitHook, deinitHook) {
IMPL_STATIC_LINK_NOARG_TYPED(InitHook, deinitHook, LinkParamNone*, void) {
// nothing to do for now
return 0;
}
// this is called from pyuno

View file

@ -56,14 +56,15 @@ private:
SAL_OVERRIDE
{ return functor(); }
DECL_STATIC_LINK(Protector, deinitHook, void *);
DECL_STATIC_LINK_TYPED(Protector, deinitHook, LinkParamNone*, void);
};
// HACK so that defaultBootstrap_InitialComponentContext (in
// unobootstrapprotector) is called before InitVCL (above), but component
// context is disposed (redundantly again in unobootstrapprotector) from within
// DeInitVCL (cf. Desktop::DeInit, desktop/source/app/app.cxx):
IMPL_STATIC_LINK_NOARG(Protector, deinitHook) {
IMPL_STATIC_LINK_NOARG_TYPED(Protector, deinitHook, LinkParamNone*, void)
{
css::uno::Reference<css::uno::XComponentContext> context;
try {
context = comphelper::getProcessComponentContext();
@ -82,7 +83,6 @@ IMPL_STATIC_LINK_NOARG(Protector, deinitHook) {
context, css::uno::UNO_QUERY_THROW)->dispose();
comphelper::setProcessServiceFactory(0);
}
return 0;
}
}

View file

@ -344,7 +344,7 @@ struct ImplSVData
std::list< vcl::DeleteOnDeinitBase* >* mpDeinitDeleteList;
std::unordered_map< int, OUString >* mpPaperNames;
Link<> maDeInitHook;
Link<LinkParamNone*,void> maDeInitHook;
};
void ImplDeInitSVData();

View file

@ -1600,7 +1600,7 @@ Application::createFolderPicker( const Reference< uno::XComponentContext >& xSM
return pSVData->mpDefInst->createFolderPicker( xSM );
}
void Application::setDeInitHook(Link<> const & hook) {
void Application::setDeInitHook(Link<LinkParamNone*,void> const & hook) {
ImplSVData * pSVData = ImplGetSVData();
assert(!pSVData->maDeInitHook.IsSet());
pSVData->maDeInitHook = hook;