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) :
uno::Reference< frame::XStorable > xStore( pView->GetDocShell()->GetModel(), uno::UNO_QUERY);
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,
EX_SHOW_DEFAULT_PAGE, &aLink, &m_sExampleURL );
......@@ -619,7 +619,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
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);
......@@ -633,7 +633,7 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl)
m_pExampleWrtShell = pDocShell->GetWrtShell();
OSL_ENSURE(m_pExampleWrtShell, "No SwWrtShell found!");
if(!m_pExampleWrtShell)
return 0;
return;
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
if(rConfigItem.IsAddressBlock())
......@@ -657,7 +657,6 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl)
m_pExampleWrtShell->GetCurPageDesc()).GetMaster().GetFrmSize();
m_pLeftMF->SetMax(rPageSize.GetWidth() - DEFAULT_LEFT_DISTANCE);
m_pTopMF->SetMax(rPageSize.GetHeight() - DEFAULT_TOP_DISTANCE);
return 0;
}
IMPL_LINK(SwMailMergeLayoutPage, ZoomHdl_Impl, ListBox*, pBox)
......
......@@ -65,7 +65,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage
::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(ChangeAddressHdl_Impl, void *);
DECL_LINK_TYPED(GreetingsHdl_Impl, Button*, void);
......
......@@ -38,7 +38,7 @@ using namespace ::comphelper;
void SwVisitingCardPage::InitFrameControl()
{
Link<> aLink(LINK(this, SwVisitingCardPage, FrameControlInitializedHdl));
Link<SwOneExampleFrame&,void> aLink(LINK(this, SwVisitingCardPage, FrameControlInitializedHdl));
m_pExampleWIN->Show();
pExampleFrame = new SwOneExampleFrame( *m_pExampleWIN,
EX_SHOW_BUSINESS_CARDS, &aLink );
......@@ -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();
OUString sEntry;
......@@ -130,7 +130,6 @@ IMPL_LINK_NOARG(SwVisitingCardPage, FrameControlInitializedHdl)
UpdateFields();
}
}
return 0;
}
IMPL_LINK_TYPED( SwVisitingCardPage, AutoTextSelectTreeListBoxHdl, SvTreeListBox*, pBox, void )
......
......@@ -99,7 +99,7 @@ class SwVisitingCardPage : public SfxTabPage
DECL_LINK_TYPED( AutoTextSelectTreeListBoxHdl, SvTreeListBox*, void );
DECL_LINK( AutoTextSelectHdl, void* );
DECL_LINK( FrameControlInitializedHdl, void* );
DECL_LINK_TYPED( FrameControlInitializedHdl, SwOneExampleFrame&, void );
void InitFrameControl();
void UpdateFields();
......
......@@ -96,7 +96,7 @@ static void lcl_SetBOOLProp(
}
}
IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl)
IMPL_LINK_NOARG_TYPED(SwMultiTOXTabDialog, CreateExample_Hdl, SwOneExampleFrame&, void)
{
try
{
......@@ -139,7 +139,6 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl)
{
OSL_FAIL("::CreateExample() - exception caught");
}
return 0;
}
void SwMultiTOXTabDialog::CreateOrUpdateExample(
......
......@@ -494,7 +494,7 @@ IMPL_LINK_NOARG_TYPED( SwMultiTOXTabDialog, ShowPreviewHdl, Button*, void )
}
else
{
Link<> aLink(LINK(this, SwMultiTOXTabDialog, CreateExample_Hdl));
Link<SwOneExampleFrame&,void> aLink(LINK(this, SwMultiTOXTabDialog, CreateExample_Hdl));
pExampleFrame = new SwOneExampleFrame(
*m_pExampleContainerWIN, EX_SHOW_ONLINE_LAYOUT, &aLink, &sTemplate);
......
......@@ -1063,7 +1063,7 @@ void SwGlossaryDlg::ShowPreview()
//create example
if (!pExampleFrame)
{
Link<> aLink(LINK(this, SwGlossaryDlg, PreviewLoadedHdl));
Link<SwOneExampleFrame&,void> aLink(LINK(this, SwGlossaryDlg, PreviewLoadedHdl));
pExampleFrame = new SwOneExampleFrame( *m_pExampleWIN,
EX_SHOW_ONLINE_LAYOUT, &aLink );
}
......@@ -1071,10 +1071,9 @@ void SwGlossaryDlg::ShowPreview()
ShowAutoText(::GetCurrGlosGroup(), m_pShortNameEdit->GetText());
};
IMPL_LINK_NOARG(SwGlossaryDlg, PreviewLoadedHdl)
IMPL_LINK_NOARG_TYPED(SwGlossaryDlg, PreviewLoadedHdl, SwOneExampleFrame&, void)
{
ResumeShowAutoText();
return 0;
}
void SwGlossaryDlg::ShowAutoText(const OUString& rGroup, const OUString& rShortName)
......
......@@ -133,7 +133,7 @@ class SwGlossaryDlg : public SvxStandardDialog
DECL_LINK_TYPED(InsertHdl, Button *, void);
DECL_LINK_TYPED( PathHdl, Button *, void );
DECL_LINK_TYPED( CheckBoxHdl, Button*, void );
DECL_LINK( PreviewLoadedHdl, void * );
DECL_LINK_TYPED( PreviewLoadedHdl, SwOneExampleFrame&, void );
virtual void Apply() SAL_OVERRIDE;
void Init();
......
......@@ -93,7 +93,7 @@ class SwMultiTOXTabDialog : public SfxTabDialog
virtual short Ok() SAL_OVERRIDE;
SwTOXDescription* CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX);
DECL_LINK(CreateExample_Hdl, void*);
DECL_LINK_TYPED(CreateExample_Hdl, SwOneExampleFrame&, void);
DECL_LINK_TYPED(ShowPreviewHdl, Button*, void);
public:
......
......@@ -75,7 +75,7 @@ class SW_DLLPUBLIC SwOneExampleFrame
VclPtr<SwFrmCtrlWindow> aTopWindow;
Idle aLoadedIdle;
Link<> aInitializedLink;
Link<SwOneExampleFrame&,void> aInitializedLink;
MenuResource aMenuRes;
OUString sArgumentURL;
......@@ -98,7 +98,7 @@ class SW_DLLPUBLIC SwOneExampleFrame
public:
SwOneExampleFrame(vcl::Window& rWin,
sal_uInt32 nStyleFlags = EX_SHOW_ONLINE_LAYOUT,
const Link<>* pInitalizedLink = 0,
const Link<SwOneExampleFrame&,void>* pInitalizedLink = 0,
const OUString* pURL = 0);
~SwOneExampleFrame();
......
......@@ -64,7 +64,7 @@ bool SwOneExampleFrame::bShowServiceNotAvailableMessage = true;
SwOneExampleFrame::SwOneExampleFrame( vcl::Window& rWin,
sal_uInt32 nFlags,
const Link<>* pInitializedLink,
const Link<SwOneExampleFrame&,void>* pInitializedLink,
const OUString* pURL ) :
aTopWindow(VclPtr<SwFrmCtrlWindow>::Create(&rWin, this)),
aMenuRes(SW_RES(RES_FRMEX_MENU)),
......@@ -369,7 +369,7 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void )
disableScrollBars(xViewProps, (nStyleFlags&EX_SHOW_ONLINE_LAYOUT) != 0);
if (aInitializedLink.IsSet())
aInitializedLink.Call(this);
aInitializedLink.Call(*this);
uno::Reference< text::XTextViewCursorSupplier > xCrsrSupp(_xController, 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