summaryrefslogtreecommitdiff
path: root/sw/source/ui/envelp
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-10-04 15:05:38 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-12 10:48:13 +0000
commit3c99f8500f657ed84b316390d5175a6f5e56bc69 (patch)
tree749f16652560a50d409b12a23bf1a5d93b3cd2d5 /sw/source/ui/envelp
parentbbadb38539eb233ac45b267034066a7274181c65 (diff)
convert Link<> to typed
Change-Id: Iec15042138e0715459b2c9e872a7464d75a6b1eb Reviewed-on: https://gerrit.libreoffice.org/19305 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/ui/envelp')
-rw-r--r--sw/source/ui/envelp/envfmt.cxx5
-rw-r--r--sw/source/ui/envelp/envfmt.hxx2
-rw-r--r--sw/source/ui/envelp/envlop1.cxx7
-rw-r--r--sw/source/ui/envelp/label1.cxx28
-rw-r--r--sw/source/ui/envelp/labelexp.cxx10
-rw-r--r--sw/source/ui/envelp/swuilabimp.hxx8
6 files changed, 28 insertions, 32 deletions
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 495af4caf296..7c06b38580b8 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -247,7 +247,7 @@ IMPL_LINK( SwEnvFormatPage, ModifyHdl, Edit *, pEdit )
lUserH = lHeight;
}
- m_pSizeFormatBox->GetSelectHdl().Call(m_pSizeFormatBox);
+ m_pSizeFormatBox->GetSelectHdl().Call(*m_pSizeFormatBox);
}
else
{
@@ -384,7 +384,7 @@ SfxItemSet *SwEnvFormatPage::GetCollItemSet(SwTextFormatColl* pColl, bool bSende
return pAddrSet;
}
-IMPL_LINK_NOARG(SwEnvFormatPage, FormatHdl)
+IMPL_LINK_NOARG_TYPED(SwEnvFormatPage, FormatHdl, ListBox&, void)
{
long lWidth;
long lHeight;
@@ -423,7 +423,6 @@ IMPL_LINK_NOARG(SwEnvFormatPage, FormatHdl)
FillItem(GetParentSwEnvDlg()->aEnvItem);
m_pPreview->Invalidate();
- return 0;
}
void SwEnvFormatPage::SetMinMax()
diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx
index d3a81afdaf86..6d47bc314af1 100644
--- a/sw/source/ui/envelp/envfmt.hxx
+++ b/sw/source/ui/envelp/envfmt.hxx
@@ -46,7 +46,7 @@ class SwEnvFormatPage : public SfxTabPage
DECL_LINK( ModifyHdl, Edit * );
DECL_LINK_TYPED( LoseFocusHdl, Control&, void );
DECL_LINK_TYPED( EditHdl, MenuButton *, void );
- DECL_LINK(FormatHdl, void *);
+ DECL_LINK_TYPED(FormatHdl, ListBox&, void);
void SetMinMax();
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index e24dbd09f427..89d7f9d749da 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -247,13 +247,13 @@ void SwEnvPage::dispose()
SfxTabPage::dispose();
}
-IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox )
+IMPL_LINK_TYPED( SwEnvPage, DatabaseHdl, ListBox&, rListBox, void )
{
SwWait aWait( *pSh->GetView().GetDocShell(), true );
- if (pListBox == m_pDatabaseLB)
+ if (&rListBox == m_pDatabaseLB)
{
- sActDBName = pListBox->GetSelectEntry();
+ sActDBName = rListBox.GetSelectEntry();
pSh->GetDBManager()->GetTableNames(m_pTableLB, sActDBName);
sActDBName += OUString(DB_DELIM);
}
@@ -263,7 +263,6 @@ IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox )
}
pSh->GetDBManager()->GetColumnNames(m_pDBFieldLB, m_pDatabaseLB->GetSelectEntry(),
m_pTableLB->GetSelectEntry());
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwEnvPage, FieldHdl, Button*, void)
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 90f6497e7f0e..c346b7eba36c 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -288,7 +288,7 @@ SwLabPage::SwLabPage(vcl::Window* pParent, const SfxItemSet& rSet)
}
m_pMakeBox->SelectEntryPos( nLstGroup );
- m_pMakeBox->GetSelectHdl().Call(m_pMakeBox);
+ m_pMakeBox->GetSelectHdl().Call(*m_pMakeBox);
}
SwLabPage::~SwLabPage()
@@ -336,17 +336,16 @@ IMPL_LINK_NOARG_TYPED(SwLabPage, AddrHdl, Button*, void)
m_pWritingEdit->GrabFocus();
}
-IMPL_LINK( SwLabPage, DatabaseHdl, ListBox *, pListBox )
+IMPL_LINK_TYPED( SwLabPage, DatabaseHdl, ListBox&, rListBox, void )
{
sActDBName = m_pDatabaseLB->GetSelectEntry();
WaitObject aObj( GetParentSwLabDlg() );
- if (pListBox == m_pDatabaseLB)
+ if (&rListBox == m_pDatabaseLB)
GetDBManager()->GetTableNames(m_pTableLB, sActDBName);
GetDBManager()->GetColumnNames(m_pDBFieldLB, sActDBName, m_pTableLB->GetSelectEntry());
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwLabPage, FieldHdl, Button*, void)
@@ -363,10 +362,10 @@ IMPL_LINK_NOARG_TYPED(SwLabPage, FieldHdl, Button*, void)
IMPL_LINK_NOARG_TYPED(SwLabPage, PageHdl, Button*, void)
{
- m_pMakeBox->GetSelectHdl().Call(m_pMakeBox);
+ m_pMakeBox->GetSelectHdl().Call(*m_pMakeBox);
}
-IMPL_LINK_NOARG(SwLabPage, MakeHdl)
+IMPL_LINK_NOARG_TYPED(SwLabPage, MakeHdl, ListBox&, void)
{
WaitObject aWait( GetParentSwLabDlg() );
@@ -416,15 +415,13 @@ IMPL_LINK_NOARG(SwLabPage, MakeHdl)
m_pTypeBox->SelectEntry(aItem.aLstType);
else
m_pTypeBox->SelectEntryPos(0);
- m_pTypeBox->GetSelectHdl().Call(m_pTypeBox);
- return 0;
+ m_pTypeBox->GetSelectHdl().Call(*m_pTypeBox);
}
-IMPL_LINK_NOARG(SwLabPage, TypeHdl)
+IMPL_LINK_NOARG_TYPED(SwLabPage, TypeHdl, ListBox&, void)
{
DisplayFormat();
aItem.aType = m_pTypeBox->GetSelectEntry();
- return 0;
}
void SwLabPage::DisplayFormat()
@@ -542,7 +539,7 @@ void SwLabPage::Reset(const SfxItemSet* rSet)
m_pMakeBox->SelectEntry( aItem.aMake );
//save the current type
OUString sType(aItem.aType);
- m_pMakeBox->GetSelectHdl().Call(m_pMakeBox);
+ m_pMakeBox->GetSelectHdl().Call(*m_pMakeBox);
aItem.aType = sType;
//#102806# a newly added make may not be in the type ListBox already
if (m_pTypeBox->GetEntryPos(aItem.aType) == LISTBOX_ENTRY_NOTFOUND && !aItem.aMake.isEmpty())
@@ -550,12 +547,12 @@ void SwLabPage::Reset(const SfxItemSet* rSet)
if (m_pTypeBox->GetEntryPos(aItem.aType) != LISTBOX_ENTRY_NOTFOUND)
{
m_pTypeBox->SelectEntry(aItem.aType);
- m_pTypeBox->GetSelectHdl().Call(m_pTypeBox);
+ m_pTypeBox->GetSelectHdl().Call(*m_pTypeBox);
}
if (m_pDatabaseLB->GetEntryPos(sDBName) != LISTBOX_ENTRY_NOTFOUND)
{
m_pDatabaseLB->SelectEntry(sDBName);
- m_pDatabaseLB->GetSelectHdl().Call(m_pDatabaseLB);
+ m_pDatabaseLB->GetSelectHdl().Call(*m_pDatabaseLB);
}
if (aItem.bCont)
@@ -718,7 +715,7 @@ void SwVisitingCardPage::Reset(const SfxItemSet* rSet)
if(m_pAutoTextGroupLB->GetSelectEntryPos() != i)
{
m_pAutoTextGroupLB->SelectEntryPos(i);
- AutoTextSelectHdl(m_pAutoTextGroupLB);
+ AutoTextSelectHdl(*m_pAutoTextGroupLB);
}
if(lcl_FindBlock(*m_pAutoTextLB, aLabItem.sGlossaryBlockName))
{
@@ -727,7 +724,8 @@ void SwVisitingCardPage::Reset(const SfxItemSet* rSet)
*static_cast<OUString*>(pSelEntry->GetUserData()) != aLabItem.sGlossaryBlockName)
{
lcl_SelectBlock(*m_pAutoTextLB, aLabItem.sGlossaryBlockName);
- AutoTextSelectHdl(m_pAutoTextLB);
+ if(m_xAutoText.is() && pExampleFrame->IsInitialized())
+ pExampleFrame->ClearDocument( true );
}
}
}
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx
index 206d9353d892..9bdc69ee9b00 100644
--- a/sw/source/ui/envelp/labelexp.cxx
+++ b/sw/source/ui/envelp/labelexp.cxx
@@ -132,15 +132,16 @@ IMPL_LINK_NOARG_TYPED(SwVisitingCardPage, FrameControlInitializedHdl, SwOneExamp
}
}
-IMPL_LINK_TYPED( SwVisitingCardPage, AutoTextSelectTreeListBoxHdl, SvTreeListBox*, pBox, void )
+IMPL_LINK_NOARG_TYPED( SwVisitingCardPage, AutoTextSelectTreeListBoxHdl, SvTreeListBox*, void )
{
- AutoTextSelectHdl(pBox);
+ if(m_xAutoText.is() && pExampleFrame->IsInitialized())
+ pExampleFrame->ClearDocument( true );
}
-IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, void*, pBox )
+IMPL_LINK_TYPED( SwVisitingCardPage, AutoTextSelectHdl, ListBox&, rBox, void )
{
if(m_xAutoText.is())
{
- if (m_pAutoTextGroupLB == pBox)
+ if (m_pAutoTextGroupLB == &rBox)
{
const OUString *pGroup( static_cast<const OUString*>(m_pAutoTextGroupLB->GetSelectEntryData()));
uno::Any aGroup = m_xAutoText->getByName(*pGroup);
@@ -158,7 +159,6 @@ IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, void*, pBox )
if(pExampleFrame->IsInitialized())
pExampleFrame->ClearDocument( true );
}
- return 0;
}
void SwVisitingCardPage::UpdateFields()
diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx
index 6dacd6bc6b60..7634d68ceea6 100644
--- a/sw/source/ui/envelp/swuilabimp.hxx
+++ b/sw/source/ui/envelp/swuilabimp.hxx
@@ -48,11 +48,11 @@ class SwLabPage : public SfxTabPage
bool m_bLabel;
DECL_LINK_TYPED(AddrHdl, Button*, void);
- DECL_LINK(DatabaseHdl, ListBox * );
+ DECL_LINK_TYPED(DatabaseHdl, ListBox&, void );
DECL_LINK_TYPED(FieldHdl, Button *, void);
DECL_LINK_TYPED(PageHdl, Button *, void);
- DECL_LINK(MakeHdl, void *);
- DECL_LINK(TypeHdl, void *);
+ DECL_LINK_TYPED(MakeHdl, ListBox&, void);
+ DECL_LINK_TYPED(TypeHdl, ListBox&, void);
void DisplayFormat ();
SwLabRec* GetSelectedEntryPos();
@@ -98,7 +98,7 @@ class SwVisitingCardPage : public SfxTabPage
::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextContainer2 > m_xAutoText;
DECL_LINK_TYPED( AutoTextSelectTreeListBoxHdl, SvTreeListBox*, void );
- DECL_LINK( AutoTextSelectHdl, void* );
+ DECL_LINK_TYPED( AutoTextSelectHdl, ListBox&, void );
DECL_LINK_TYPED( FrameControlInitializedHdl, SwOneExampleFrame&, void );
void InitFrameControl();