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

convert Link<> to typed

Change-Id: If1e53fee4b39daed44632b2395ddb42064c698fb
Reviewed-on: https://gerrit.libreoffice.org/18800Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 28329d7c
...@@ -118,7 +118,7 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) : ...@@ -118,7 +118,7 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) :
uno::Reference< frame::XStorable > xStore( pView->GetDocShell()->GetModel(), uno::UNO_QUERY); uno::Reference< frame::XStorable > xStore( pView->GetDocShell()->GetModel(), uno::UNO_QUERY);
xStore->storeToURL( m_sExampleURL, aValues ); xStore->storeToURL( m_sExampleURL, aValues );
Link<> aLink(LINK(this, SwMailMergeLayoutPage, PreviewLoadedHdl_Impl)); Link<SwOneExampleFrame&,void> aLink(LINK(this, SwMailMergeLayoutPage, PreviewLoadedHdl_Impl));
m_pExampleFrame = new SwOneExampleFrame( *m_pExampleContainerWIN, m_pExampleFrame = new SwOneExampleFrame( *m_pExampleContainerWIN,
EX_SHOW_DEFAULT_PAGE, &aLink, &m_sExampleURL ); EX_SHOW_DEFAULT_PAGE, &aLink, &m_sExampleURL );
...@@ -619,7 +619,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig ...@@ -619,7 +619,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
OSL_ENSURE(0 == rShell.GetTableFormat(), "What to do with a table here?"); OSL_ENSURE(0 == rShell.GetTableFormat(), "What to do with a table here?");
} }
IMPL_LINK_NOARG(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl) IMPL_LINK_NOARG_TYPED(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, SwOneExampleFrame&, void)
{ {
m_pExampleContainerWIN->Show(true); m_pExampleContainerWIN->Show(true);
...@@ -633,7 +633,7 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl) ...@@ -633,7 +633,7 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl)
m_pExampleWrtShell = pDocShell->GetWrtShell(); m_pExampleWrtShell = pDocShell->GetWrtShell();
OSL_ENSURE(m_pExampleWrtShell, "No SwWrtShell found!"); OSL_ENSURE(m_pExampleWrtShell, "No SwWrtShell found!");
if(!m_pExampleWrtShell) if(!m_pExampleWrtShell)
return 0; return;
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
if(rConfigItem.IsAddressBlock()) if(rConfigItem.IsAddressBlock())
...@@ -657,7 +657,6 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl) ...@@ -657,7 +657,6 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl)
m_pExampleWrtShell->GetCurPageDesc()).GetMaster().GetFrmSize(); m_pExampleWrtShell->GetCurPageDesc()).GetMaster().GetFrmSize();
m_pLeftMF->SetMax(rPageSize.GetWidth() - DEFAULT_LEFT_DISTANCE); m_pLeftMF->SetMax(rPageSize.GetWidth() - DEFAULT_LEFT_DISTANCE);
m_pTopMF->SetMax(rPageSize.GetHeight() - DEFAULT_TOP_DISTANCE); m_pTopMF->SetMax(rPageSize.GetHeight() - DEFAULT_TOP_DISTANCE);
return 0;
} }
IMPL_LINK(SwMailMergeLayoutPage, ZoomHdl_Impl, ListBox*, pBox) IMPL_LINK(SwMailMergeLayoutPage, ZoomHdl_Impl, ListBox*, pBox)
......
...@@ -65,7 +65,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage ...@@ -65,7 +65,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xViewProperties; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xViewProperties;
DECL_LINK(PreviewLoadedHdl_Impl, void*); DECL_LINK_TYPED(PreviewLoadedHdl_Impl, SwOneExampleFrame&, void);
DECL_LINK(ZoomHdl_Impl, ListBox*); DECL_LINK(ZoomHdl_Impl, ListBox*);
DECL_LINK(ChangeAddressHdl_Impl, void *); DECL_LINK(ChangeAddressHdl_Impl, void *);
DECL_LINK_TYPED(GreetingsHdl_Impl, Button*, void); DECL_LINK_TYPED(GreetingsHdl_Impl, Button*, void);
......
...@@ -38,7 +38,7 @@ using namespace ::comphelper; ...@@ -38,7 +38,7 @@ using namespace ::comphelper;
void SwVisitingCardPage::InitFrameControl() void SwVisitingCardPage::InitFrameControl()
{ {
Link<> aLink(LINK(this, SwVisitingCardPage, FrameControlInitializedHdl)); Link<SwOneExampleFrame&,void> aLink(LINK(this, SwVisitingCardPage, FrameControlInitializedHdl));
m_pExampleWIN->Show(); m_pExampleWIN->Show();
pExampleFrame = new SwOneExampleFrame( *m_pExampleWIN, pExampleFrame = new SwOneExampleFrame( *m_pExampleWIN,
EX_SHOW_BUSINESS_CARDS, &aLink ); EX_SHOW_BUSINESS_CARDS, &aLink );
...@@ -101,7 +101,7 @@ void SwVisitingCardPage::InitFrameControl() ...@@ -101,7 +101,7 @@ void SwVisitingCardPage::InitFrameControl()
} }
} }
IMPL_LINK_NOARG(SwVisitingCardPage, FrameControlInitializedHdl) IMPL_LINK_NOARG_TYPED(SwVisitingCardPage, FrameControlInitializedHdl, SwOneExampleFrame&, void)
{ {
SvTreeListEntry* pSel = m_pAutoTextLB->FirstSelected(); SvTreeListEntry* pSel = m_pAutoTextLB->FirstSelected();
OUString sEntry; OUString sEntry;
...@@ -130,7 +130,6 @@ IMPL_LINK_NOARG(SwVisitingCardPage, FrameControlInitializedHdl) ...@@ -130,7 +130,6 @@ IMPL_LINK_NOARG(SwVisitingCardPage, FrameControlInitializedHdl)
UpdateFields(); UpdateFields();
} }
} }
return 0;
} }
IMPL_LINK_TYPED( SwVisitingCardPage, AutoTextSelectTreeListBoxHdl, SvTreeListBox*, pBox, void ) IMPL_LINK_TYPED( SwVisitingCardPage, AutoTextSelectTreeListBoxHdl, SvTreeListBox*, pBox, void )
......
...@@ -99,7 +99,7 @@ class SwVisitingCardPage : public SfxTabPage ...@@ -99,7 +99,7 @@ class SwVisitingCardPage : public SfxTabPage
DECL_LINK_TYPED( AutoTextSelectTreeListBoxHdl, SvTreeListBox*, void ); DECL_LINK_TYPED( AutoTextSelectTreeListBoxHdl, SvTreeListBox*, void );
DECL_LINK( AutoTextSelectHdl, void* ); DECL_LINK( AutoTextSelectHdl, void* );
DECL_LINK( FrameControlInitializedHdl, void* ); DECL_LINK_TYPED( FrameControlInitializedHdl, SwOneExampleFrame&, void );
void InitFrameControl(); void InitFrameControl();
void UpdateFields(); void UpdateFields();
......
...@@ -96,7 +96,7 @@ static void lcl_SetBOOLProp( ...@@ -96,7 +96,7 @@ static void lcl_SetBOOLProp(
} }
} }
IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl) IMPL_LINK_NOARG_TYPED(SwMultiTOXTabDialog, CreateExample_Hdl, SwOneExampleFrame&, void)
{ {
try try
{ {
...@@ -139,7 +139,6 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl) ...@@ -139,7 +139,6 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl)
{ {
OSL_FAIL("::CreateExample() - exception caught"); OSL_FAIL("::CreateExample() - exception caught");
} }
return 0;
} }
void SwMultiTOXTabDialog::CreateOrUpdateExample( void SwMultiTOXTabDialog::CreateOrUpdateExample(
......
...@@ -494,7 +494,7 @@ IMPL_LINK_NOARG_TYPED( SwMultiTOXTabDialog, ShowPreviewHdl, Button*, void ) ...@@ -494,7 +494,7 @@ IMPL_LINK_NOARG_TYPED( SwMultiTOXTabDialog, ShowPreviewHdl, Button*, void )
} }
else else
{ {
Link<> aLink(LINK(this, SwMultiTOXTabDialog, CreateExample_Hdl)); Link<SwOneExampleFrame&,void> aLink(LINK(this, SwMultiTOXTabDialog, CreateExample_Hdl));
pExampleFrame = new SwOneExampleFrame( pExampleFrame = new SwOneExampleFrame(
*m_pExampleContainerWIN, EX_SHOW_ONLINE_LAYOUT, &aLink, &sTemplate); *m_pExampleContainerWIN, EX_SHOW_ONLINE_LAYOUT, &aLink, &sTemplate);
......
...@@ -1063,7 +1063,7 @@ void SwGlossaryDlg::ShowPreview() ...@@ -1063,7 +1063,7 @@ void SwGlossaryDlg::ShowPreview()
//create example //create example
if (!pExampleFrame) if (!pExampleFrame)
{ {
Link<> aLink(LINK(this, SwGlossaryDlg, PreviewLoadedHdl)); Link<SwOneExampleFrame&,void> aLink(LINK(this, SwGlossaryDlg, PreviewLoadedHdl));
pExampleFrame = new SwOneExampleFrame( *m_pExampleWIN, pExampleFrame = new SwOneExampleFrame( *m_pExampleWIN,
EX_SHOW_ONLINE_LAYOUT, &aLink ); EX_SHOW_ONLINE_LAYOUT, &aLink );
} }
...@@ -1071,10 +1071,9 @@ void SwGlossaryDlg::ShowPreview() ...@@ -1071,10 +1071,9 @@ void SwGlossaryDlg::ShowPreview()
ShowAutoText(::GetCurrGlosGroup(), m_pShortNameEdit->GetText()); ShowAutoText(::GetCurrGlosGroup(), m_pShortNameEdit->GetText());
}; };
IMPL_LINK_NOARG(SwGlossaryDlg, PreviewLoadedHdl) IMPL_LINK_NOARG_TYPED(SwGlossaryDlg, PreviewLoadedHdl, SwOneExampleFrame&, void)
{ {
ResumeShowAutoText(); ResumeShowAutoText();
return 0;
} }
void SwGlossaryDlg::ShowAutoText(const OUString& rGroup, const OUString& rShortName) void SwGlossaryDlg::ShowAutoText(const OUString& rGroup, const OUString& rShortName)
......
...@@ -133,7 +133,7 @@ class SwGlossaryDlg : public SvxStandardDialog ...@@ -133,7 +133,7 @@ class SwGlossaryDlg : public SvxStandardDialog
DECL_LINK_TYPED(InsertHdl, Button *, void); DECL_LINK_TYPED(InsertHdl, Button *, void);
DECL_LINK_TYPED( PathHdl, Button *, void ); DECL_LINK_TYPED( PathHdl, Button *, void );
DECL_LINK_TYPED( CheckBoxHdl, Button*, void ); DECL_LINK_TYPED( CheckBoxHdl, Button*, void );
DECL_LINK( PreviewLoadedHdl, void * ); DECL_LINK_TYPED( PreviewLoadedHdl, SwOneExampleFrame&, void );
virtual void Apply() SAL_OVERRIDE; virtual void Apply() SAL_OVERRIDE;
void Init(); void Init();
......
...@@ -93,7 +93,7 @@ class SwMultiTOXTabDialog : public SfxTabDialog ...@@ -93,7 +93,7 @@ class SwMultiTOXTabDialog : public SfxTabDialog
virtual short Ok() SAL_OVERRIDE; virtual short Ok() SAL_OVERRIDE;
SwTOXDescription* CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX); SwTOXDescription* CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX);
DECL_LINK(CreateExample_Hdl, void*); DECL_LINK_TYPED(CreateExample_Hdl, SwOneExampleFrame&, void);
DECL_LINK_TYPED(ShowPreviewHdl, Button*, void); DECL_LINK_TYPED(ShowPreviewHdl, Button*, void);
public: public:
......
...@@ -75,7 +75,7 @@ class SW_DLLPUBLIC SwOneExampleFrame ...@@ -75,7 +75,7 @@ class SW_DLLPUBLIC SwOneExampleFrame
VclPtr<SwFrmCtrlWindow> aTopWindow; VclPtr<SwFrmCtrlWindow> aTopWindow;
Idle aLoadedIdle; Idle aLoadedIdle;
Link<> aInitializedLink; Link<SwOneExampleFrame&,void> aInitializedLink;
MenuResource aMenuRes; MenuResource aMenuRes;
OUString sArgumentURL; OUString sArgumentURL;
...@@ -98,7 +98,7 @@ class SW_DLLPUBLIC SwOneExampleFrame ...@@ -98,7 +98,7 @@ class SW_DLLPUBLIC SwOneExampleFrame
public: public:
SwOneExampleFrame(vcl::Window& rWin, SwOneExampleFrame(vcl::Window& rWin,
sal_uInt32 nStyleFlags = EX_SHOW_ONLINE_LAYOUT, sal_uInt32 nStyleFlags = EX_SHOW_ONLINE_LAYOUT,
const Link<>* pInitalizedLink = 0, const Link<SwOneExampleFrame&,void>* pInitalizedLink = 0,
const OUString* pURL = 0); const OUString* pURL = 0);
~SwOneExampleFrame(); ~SwOneExampleFrame();
......
...@@ -64,7 +64,7 @@ bool SwOneExampleFrame::bShowServiceNotAvailableMessage = true; ...@@ -64,7 +64,7 @@ bool SwOneExampleFrame::bShowServiceNotAvailableMessage = true;
SwOneExampleFrame::SwOneExampleFrame( vcl::Window& rWin, SwOneExampleFrame::SwOneExampleFrame( vcl::Window& rWin,
sal_uInt32 nFlags, sal_uInt32 nFlags,
const Link<>* pInitializedLink, const Link<SwOneExampleFrame&,void>* pInitializedLink,
const OUString* pURL ) : const OUString* pURL ) :
aTopWindow(VclPtr<SwFrmCtrlWindow>::Create(&rWin, this)), aTopWindow(VclPtr<SwFrmCtrlWindow>::Create(&rWin, this)),
aMenuRes(SW_RES(RES_FRMEX_MENU)), aMenuRes(SW_RES(RES_FRMEX_MENU)),
...@@ -369,7 +369,7 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void ) ...@@ -369,7 +369,7 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void )
disableScrollBars(xViewProps, (nStyleFlags&EX_SHOW_ONLINE_LAYOUT) != 0); disableScrollBars(xViewProps, (nStyleFlags&EX_SHOW_ONLINE_LAYOUT) != 0);
if (aInitializedLink.IsSet()) if (aInitializedLink.IsSet())
aInitializedLink.Call(this); aInitializedLink.Call(*this);
uno::Reference< text::XTextViewCursorSupplier > xCrsrSupp(_xController, uno::UNO_QUERY); uno::Reference< text::XTextViewCursorSupplier > xCrsrSupp(_xController, uno::UNO_QUERY);
uno::Reference< view::XScreenCursor > xScrCrsr(xCrsrSupp->getViewCursor(), uno::UNO_QUERY); uno::Reference< view::XScreenCursor > xScrCrsr(xCrsrSupp->getViewCursor(), uno::UNO_QUERY);
......
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