Kaydet (Commit) 9ea0390f authored tarafından Noel Grandin's avatar Noel Grandin

convert Link<> to typed

Change-Id: Iaca21344f6a38f508f79e6d5983e515162a6dca3
üst 71d8cfc1
...@@ -1483,7 +1483,7 @@ public: ...@@ -1483,7 +1483,7 @@ public:
///@} ///@}
// For vclbootstrapprotector: // For vclbootstrapprotector:
static void setDeInitHook(Link<> const & hook); static void setDeInitHook(Link<LinkParamNone*,void> const & hook);
private: private:
......
...@@ -85,12 +85,11 @@ void test_init_impl(bool bAssertOnDialog, bool bNeedUCB, ...@@ -85,12 +85,11 @@ void test_init_impl(bool bAssertOnDialog, bool bNeedUCB,
} }
struct InitHook { 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 // nothing to do for now
return 0;
} }
// this is called from pyuno // this is called from pyuno
......
...@@ -56,14 +56,15 @@ private: ...@@ -56,14 +56,15 @@ private:
SAL_OVERRIDE SAL_OVERRIDE
{ return functor(); } { return functor(); }
DECL_STATIC_LINK(Protector, deinitHook, void *); DECL_STATIC_LINK_TYPED(Protector, deinitHook, LinkParamNone*, void);
}; };
// HACK so that defaultBootstrap_InitialComponentContext (in // HACK so that defaultBootstrap_InitialComponentContext (in
// unobootstrapprotector) is called before InitVCL (above), but component // unobootstrapprotector) is called before InitVCL (above), but component
// context is disposed (redundantly again in unobootstrapprotector) from within // context is disposed (redundantly again in unobootstrapprotector) from within
// DeInitVCL (cf. Desktop::DeInit, desktop/source/app/app.cxx): // 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; css::uno::Reference<css::uno::XComponentContext> context;
try { try {
context = comphelper::getProcessComponentContext(); context = comphelper::getProcessComponentContext();
...@@ -82,7 +83,6 @@ IMPL_STATIC_LINK_NOARG(Protector, deinitHook) { ...@@ -82,7 +83,6 @@ IMPL_STATIC_LINK_NOARG(Protector, deinitHook) {
context, css::uno::UNO_QUERY_THROW)->dispose(); context, css::uno::UNO_QUERY_THROW)->dispose();
comphelper::setProcessServiceFactory(0); comphelper::setProcessServiceFactory(0);
} }
return 0;
} }
} }
......
...@@ -344,7 +344,7 @@ struct ImplSVData ...@@ -344,7 +344,7 @@ struct ImplSVData
std::list< vcl::DeleteOnDeinitBase* >* mpDeinitDeleteList; std::list< vcl::DeleteOnDeinitBase* >* mpDeinitDeleteList;
std::unordered_map< int, OUString >* mpPaperNames; std::unordered_map< int, OUString >* mpPaperNames;
Link<> maDeInitHook; Link<LinkParamNone*,void> maDeInitHook;
}; };
void ImplDeInitSVData(); void ImplDeInitSVData();
......
...@@ -1600,7 +1600,7 @@ Application::createFolderPicker( const Reference< uno::XComponentContext >& xSM ...@@ -1600,7 +1600,7 @@ Application::createFolderPicker( const Reference< uno::XComponentContext >& xSM
return pSVData->mpDefInst->createFolderPicker( xSM ); return pSVData->mpDefInst->createFolderPicker( xSM );
} }
void Application::setDeInitHook(Link<> const & hook) { void Application::setDeInitHook(Link<LinkParamNone*,void> const & hook) {
ImplSVData * pSVData = ImplGetSVData(); ImplSVData * pSVData = ImplGetSVData();
assert(!pSVData->maDeInitHook.IsSet()); assert(!pSVData->maDeInitHook.IsSet());
pSVData->maDeInitHook = hook; pSVData->maDeInitHook = hook;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment