[Libreoffice-commits] core.git: sw/source
Noel Grandin
noelgrandin at gmail.com
Wed Sep 23 06:07:19 PDT 2015
sw/source/ui/dbui/mmlayoutpage.cxx | 7 +++----
sw/source/ui/dbui/mmlayoutpage.hxx | 2 +-
sw/source/ui/envelp/labelexp.cxx | 5 ++---
sw/source/ui/envelp/swuilabimp.hxx | 2 +-
sw/source/ui/index/cntex.cxx | 3 +--
sw/source/ui/index/cnttab.cxx | 2 +-
sw/source/ui/misc/glossary.cxx | 5 ++---
sw/source/uibase/inc/glossary.hxx | 2 +-
sw/source/uibase/inc/swuicnttab.hxx | 2 +-
sw/source/uibase/inc/unotools.hxx | 4 ++--
sw/source/uibase/utlui/unotools.cxx | 4 ++--
11 files changed, 17 insertions(+), 21 deletions(-)
New commits:
commit b2cd2e79b6fc152072d0f1e46b5c4ed2d489c09c
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Tue Sep 22 22:00:22 2015 +0200
convert Link<> to typed
Change-Id: If1e53fee4b39daed44632b2395ddb42064c698fb
Reviewed-on: https://gerrit.libreoffice.org/18800
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 0662cde..678db18 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -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)
diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx
index fcd387e..2b46221 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hxx
+++ b/sw/source/ui/dbui/mmlayoutpage.hxx
@@ -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);
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx
index 346349a..206d935 100644
--- a/sw/source/ui/envelp/labelexp.cxx
+++ b/sw/source/ui/envelp/labelexp.cxx
@@ -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 )
diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx
index 4167c43..6dacd6b 100644
--- a/sw/source/ui/envelp/swuilabimp.hxx
+++ b/sw/source/ui/envelp/swuilabimp.hxx
@@ -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();
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx
index e015207..f94e1e1 100644
--- a/sw/source/ui/index/cntex.cxx
+++ b/sw/source/ui/index/cntex.cxx
@@ -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(
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index fdab9dc..d1347b8 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -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);
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 6162a97..4d9e78b 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -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)
diff --git a/sw/source/uibase/inc/glossary.hxx b/sw/source/uibase/inc/glossary.hxx
index 22c175e..e7ad2c5 100644
--- a/sw/source/uibase/inc/glossary.hxx
+++ b/sw/source/uibase/inc/glossary.hxx
@@ -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();
diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx
index 8d74ab9..6e225fd 100644
--- a/sw/source/uibase/inc/swuicnttab.hxx
+++ b/sw/source/uibase/inc/swuicnttab.hxx
@@ -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:
diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx
index 28a5d37..ff7839c 100644
--- a/sw/source/uibase/inc/unotools.hxx
+++ b/sw/source/uibase/inc/unotools.hxx
@@ -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();
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index cd5ab41..0b3525c 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -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);
More information about the Libreoffice-commits
mailing list