summaryrefslogtreecommitdiff
path: root/cui/source/options
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 /cui/source/options
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 'cui/source/options')
-rw-r--r--cui/source/options/optasian.cxx8
-rw-r--r--cui/source/options/optchart.cxx10
-rw-r--r--cui/source/options/optchart.hxx2
-rw-r--r--cui/source/options/optcolor.cxx29
-rw-r--r--cui/source/options/optcolor.hxx2
-rw-r--r--cui/source/options/optdict.cxx6
-rw-r--r--cui/source/options/optgdlg.cxx7
-rw-r--r--cui/source/options/optgdlg.hxx2
-rw-r--r--cui/source/options/optinet2.cxx5
-rw-r--r--cui/source/options/optinet2.hxx2
-rw-r--r--cui/source/options/optjava.cxx8
-rw-r--r--cui/source/options/optjava.hxx4
-rw-r--r--cui/source/options/optlingu.cxx10
-rw-r--r--cui/source/options/optopencl.cxx8
-rw-r--r--cui/source/options/optsave.cxx19
-rw-r--r--cui/source/options/optsave.hxx4
-rw-r--r--cui/source/options/personalization.cxx4
-rw-r--r--cui/source/options/personalization.hxx2
18 files changed, 58 insertions, 74 deletions
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 9f2ac0421969..1ccc1ce4af65 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -139,7 +139,7 @@ SvxAsianLayoutPage::SvxAsianLayoutPage( vcl::Window* pParent, const SfxItemSet&
get(m_pEndED, "end");
get(m_pHintFT, "hintft");
- LanguageHdl(m_pLanguageLB);
+ LanguageHdl(*m_pLanguageLB);
m_pLanguageLB->SetSelectHdl(LINK(this, SvxAsianLayoutPage, LanguageHdl));
m_pStandardCB->SetClickHdl(LINK(this, SvxAsianLayoutPage, ChangeStandardHdl));
Link<> aLk(LINK(this, SvxAsianLayoutPage, ModifyHdl));
@@ -310,10 +310,10 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet* )
eLastUsedLanguageTypeForForbiddenCharacters = LANGUAGE_CHINESE_TRADITIONAL;
}
m_pLanguageLB->SelectLanguage( eLastUsedLanguageTypeForForbiddenCharacters );
- LanguageHdl(m_pLanguageLB);
+ LanguageHdl(*m_pLanguageLB);
}
-IMPL_LINK_NOARG(SvxAsianLayoutPage, LanguageHdl)
+IMPL_LINK_NOARG_TYPED(SvxAsianLayoutPage, LanguageHdl, ListBox&, void)
{
//set current value
LanguageType eSelectLanguage = m_pLanguageLB->GetSelectLanguage();
@@ -374,8 +374,6 @@ IMPL_LINK_NOARG(SvxAsianLayoutPage, LanguageHdl)
m_pEndFT->Enable(bAvail);
m_pStartED->SetText(sStart);
m_pEndED->SetText(sEnd);
-
- return 0;
}
IMPL_LINK_TYPED(SvxAsianLayoutPage, ChangeStandardHdl, Button*, pBox, void)
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 9f12dc047dc6..555915e9743d 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -115,7 +115,7 @@ void SvxDefaultColorOptPage::Construct()
FillColorBox();
m_pLbChartColors->SelectEntryPos( 0 );
- ListClickedHdl(m_pLbChartColors);
+ ListClickedHdl(*m_pLbChartColors);
}
@@ -135,7 +135,7 @@ bool SvxDefaultColorOptPage::FillItemSet( SfxItemSet* rOutAttrs )
void SvxDefaultColorOptPage::Reset( const SfxItemSet* )
{
m_pLbChartColors->SelectEntryPos( 0 );
- ListClickedHdl(m_pLbChartColors);
+ ListClickedHdl(*m_pLbChartColors);
}
void SvxDefaultColorOptPage::FillColorBox()
@@ -247,9 +247,9 @@ IMPL_LINK_TYPED( SvxDefaultColorOptPage, RemoveChartColor, Button*, pButton, voi
}
}
-IMPL_LINK( SvxDefaultColorOptPage, ListClickedHdl, ColorLB*, _pColorList )
+IMPL_LINK_TYPED( SvxDefaultColorOptPage, ListClickedHdl, ListBox&, _rBox, void )
{
- Color aCol = _pColorList->GetSelectEntryColor();
+ Color aCol = static_cast<ColorLB&>(_rBox).GetSelectEntryColor();
long nIndex = GetColorIndex( aCol );
@@ -257,8 +257,6 @@ IMPL_LINK( SvxDefaultColorOptPage, ListClickedHdl, ColorLB*, _pColorList )
m_pValSetColorBox->SetNoSelection();
else
m_pValSetColorBox->SelectItem( nIndex + 1 ); // ValueSet is 1-based
-
- return 0L;
}
IMPL_LINK_NOARG_TYPED(SvxDefaultColorOptPage, BoxClickedHdl, ValueSet*, void)
diff --git a/cui/source/options/optchart.hxx b/cui/source/options/optchart.hxx
index 8046c1daa42f..bd2d2f013717 100644
--- a/cui/source/options/optchart.hxx
+++ b/cui/source/options/optchart.hxx
@@ -46,7 +46,7 @@ private:
DECL_LINK_TYPED( ResetToDefaults, Button *, void );
DECL_LINK_TYPED( AddChartColor, Button *, void );
DECL_LINK_TYPED( RemoveChartColor, Button *, void );
- DECL_LINK( ListClickedHdl, ColorLB * );
+ DECL_LINK_TYPED( ListClickedHdl, ListBox&, void );
DECL_LINK_TYPED(BoxClickedHdl, ValueSet*, void);
void FillColorBox();
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index d95fd2a6a0d5..916ea82461c6 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -177,7 +177,7 @@ public:
virtual void dispose() SAL_OVERRIDE;
public:
- void SetLinks (Link<Button*,void> const&, Link<> const&, Link<Control&,void> const&);
+ void SetLinks (Link<Button*,void> const&, Link<ListBox&,void> const&, Link<Control&,void> const&);
unsigned GetEntryHeight () const { return vEntries[0]->GetHeight(); }
void Update (EditableColorConfig const*, EditableExtendedColorConfig const*);
void ScrollHdl(const ScrollBar&);
@@ -219,7 +219,7 @@ private:
void SetAppearance(Wallpaper const& aTextWall, ColorListBox const& aSampleList);
void SetTextColor (Color C) { m_pText->SetTextColor(C); }
public:
- void SetLinks (Link<Button*,void> const&, Link<> const&, Link<Control&,void> const&);
+ void SetLinks (Link<Button*,void> const&, Link<ListBox&,void> const&, Link<Control&,void> const&);
void Update (ColorConfigEntry, ColorConfigValue const&);
void Update (ExtendedColorConfigValue const&);
void ColorChanged (ColorConfigEntry, ColorConfigValue&);
@@ -414,7 +414,7 @@ void ColorConfigWindow_Impl::Entry::SetAppearance(
// SetLinks()
void ColorConfigWindow_Impl::Entry::SetLinks(
- Link<Button*,void> const& aCheckLink, Link<> const& aColorLink,
+ Link<Button*,void> const& aCheckLink, Link<ListBox&,void> const& aColorLink,
Link<Control&,void> const& aGetFocusLink)
{
m_pColorList->SetSelectHdl(aColorLink);
@@ -689,7 +689,7 @@ void ColorConfigWindow_Impl::Init(ScrollBar *pVScroll, HeaderBar *pHeaderHB)
// SetLinks()
void ColorConfigWindow_Impl::SetLinks (
- Link<Button*,void> const& aCheckLink, Link<> const& aColorLink, Link<Control&,void> const& aGetFocusLink
+ Link<Button*,void> const& aCheckLink, Link<ListBox&,void> const& aColorLink, Link<Control&,void> const& aGetFocusLink
) {
for (unsigned i = 0; i != vEntries.size(); ++i)
vEntries[i]->SetLinks(aCheckLink, aColorLink, aGetFocusLink);
@@ -846,7 +846,7 @@ class ColorConfigCtrl_Impl : public VclVBox
DECL_LINK_TYPED(ScrollHdl, ScrollBar*, void);
DECL_LINK_TYPED(ClickHdl, Button*, void);
- DECL_LINK(ColorHdl, ColorListBox*);
+ DECL_LINK_TYPED(ColorHdl, ListBox&, void);
DECL_LINK_TYPED(ControlFocusHdl, Control&, void);
virtual bool PreNotify (NotifyEvent& rNEvt) SAL_OVERRIDE;
@@ -900,7 +900,7 @@ ColorConfigCtrl_Impl::ColorConfigCtrl_Impl(vcl::Window* pParent)
m_pVScroll->SetEndScrollHdl(aScrollLink);
Link<Button*,void> aCheckLink = LINK(this, ColorConfigCtrl_Impl, ClickHdl);
- Link<> aColorLink = LINK(this, ColorConfigCtrl_Impl, ColorHdl);
+ Link<ListBox&,void> aColorLink = LINK(this, ColorConfigCtrl_Impl, ColorHdl);
Link<Control&,void> aGetFocusLink = LINK(this, ColorConfigCtrl_Impl, ControlFocusHdl);
m_pScrollWindow->SetLinks(aCheckLink, aColorLink, aGetFocusLink);
@@ -1006,12 +1006,10 @@ IMPL_LINK_TYPED(ColorConfigCtrl_Impl, ClickHdl, Button*, pBox, void)
}
// a color list has changed
-IMPL_LINK(ColorConfigCtrl_Impl, ColorHdl, ColorListBox*, pBox)
+IMPL_LINK_TYPED(ColorConfigCtrl_Impl, ColorHdl, ListBox&, rBox, void)
{
DBG_ASSERT(pColorConfig, "Configuration not set" );
- if (pBox)
- m_pScrollWindow->ColorHdl(pColorConfig, pExtColorConfig, pBox);
- return 0;
+ m_pScrollWindow->ColorHdl(pColorConfig, pExtColorConfig, static_cast<ColorListBox*>(&rBox));
}
IMPL_LINK_TYPED(ColorConfigCtrl_Impl, ControlFocusHdl, Control&, rCtrl, void)
{
@@ -1175,12 +1173,11 @@ void SvxColorOptionsTabPage::UpdateColorConfig()
m_pColorConfigCT->Update();
}
-IMPL_LINK(SvxColorOptionsTabPage, SchemeChangedHdl_Impl, ListBox*, pBox)
+IMPL_LINK_TYPED(SvxColorOptionsTabPage, SchemeChangedHdl_Impl, ListBox&, rBox, void)
{
- pColorConfig->LoadScheme(pBox->GetSelectEntry());
- pExtColorConfig->LoadScheme(pBox->GetSelectEntry());
+ pColorConfig->LoadScheme(rBox.GetSelectEntry());
+ pExtColorConfig->LoadScheme(rBox.GetSelectEntry());
UpdateColorConfig();
- return 0;
}
IMPL_LINK_TYPED(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, Button*, pButton, void )
@@ -1205,7 +1202,7 @@ IMPL_LINK_TYPED(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, Button*, pButton, vo
pExtColorConfig->AddScheme(sName);
m_pColorSchemeLB->InsertEntry(sName);
m_pColorSchemeLB->SelectEntry(sName);
- m_pColorSchemeLB->GetSelectHdl().Call(m_pColorSchemeLB);
+ m_pColorSchemeLB->GetSelectHdl().Call(*m_pColorSchemeLB);
}
}
else
@@ -1218,7 +1215,7 @@ IMPL_LINK_TYPED(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, Button*, pButton, vo
OUString sDeleteScheme(m_pColorSchemeLB->GetSelectEntry());
m_pColorSchemeLB->RemoveEntry(m_pColorSchemeLB->GetSelectEntryPos());
m_pColorSchemeLB->SelectEntryPos(0);
- m_pColorSchemeLB->GetSelectHdl().Call(m_pColorSchemeLB);
+ m_pColorSchemeLB->GetSelectHdl().Call(*m_pColorSchemeLB);
//first select the new scheme and then delete the old one
pColorConfig->DeleteScheme(sDeleteScheme);
pExtColorConfig->DeleteScheme(sDeleteScheme);
diff --git a/cui/source/options/optcolor.hxx b/cui/source/options/optcolor.hxx
index f182e4bd5d3d..3fa8d3a120a7 100644
--- a/cui/source/options/optcolor.hxx
+++ b/cui/source/options/optcolor.hxx
@@ -41,7 +41,7 @@ class SvxColorOptionsTabPage : public SfxTabPage
svtools::EditableColorConfig* pColorConfig;
svtools::EditableExtendedColorConfig* pExtColorConfig;
- DECL_LINK(SchemeChangedHdl_Impl, ListBox*);
+ DECL_LINK_TYPED(SchemeChangedHdl_Impl, ListBox&, void);
DECL_LINK_TYPED(SaveDeleteHdl_Impl, Button*, void);
DECL_LINK_TYPED(CheckNameHdl_Impl, AbstractSvxNameDialog&, bool);
void UpdateColorConfig();
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 802763a5ca2e..28535aaaa1d3 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -433,7 +433,7 @@ void SvxEditDictionaryDialog::RemoveDictEntry(SvTreeListEntry* pEntry)
-IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectBookHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SvxEditDictionaryDialog, SelectBookHdl_Impl, ListBox&, void)
{
sal_Int32 nPos = pAllDictsLB->GetSelectEntryPos();
@@ -453,12 +453,11 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectBookHdl_Impl)
pLangFT->Enable( bEnable );
pLangLB->Enable( bEnable );
}
- return 0;
}
-IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SvxEditDictionaryDialog, SelectLangHdl_Impl, ListBox&, void)
{
sal_Int32 nDicPos = pAllDictsLB->GetSelectEntryPos();
sal_Int32 nLang = pLangLB->GetSelectLanguage();
@@ -488,7 +487,6 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl)
else
SetLanguage_Impl( nOldLang );
}
- return 1;
}
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 79e037c9d467..0764524c0b6d 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1473,7 +1473,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet )
// let LocaleSettingHdl enable/disable checkboxes for CJK/CTL support
// #i15812# must be done *before* the configured currency is set
// and update the decimal separator used for the given locale
- LocaleSettingHdl(m_pLocaleSettingLB);
+ LocaleSettingHdl(*m_pLocaleSettingLB);
// configured currency, for example, USD-en-US or EUR-de-DE, or empty for locale default
OUString aAbbrev;
@@ -1651,8 +1651,9 @@ namespace
}
}
-IMPL_LINK( OfaLanguagesTabPage, LocaleSettingHdl, SvxLanguageBox*, pBox )
+IMPL_LINK_TYPED( OfaLanguagesTabPage, LocaleSettingHdl, ListBox&, rListBox, void )
{
+ SvxLanguageBox* pBox = static_cast<SvxLanguageBox*>(&rListBox);
LanguageType eLang = pBox->GetSelectLanguage();
SvtScriptType nType = SvtLanguageOptions::GetScriptTypeOfLanguage(eLang);
// first check if CTL must be enabled
@@ -1697,8 +1698,6 @@ IMPL_LINK( OfaLanguagesTabPage, LocaleSettingHdl, SvxLanguageBox*, pBox )
OUString aDatePatternsString = lcl_getDatePatternsConfigString( aLocaleWrapper);
m_bDatePatternsValid = true;
m_pDatePatternsED->SetText( aDatePatternsString);
-
- return 0;
}
IMPL_LINK( OfaLanguagesTabPage, DatePatternsHdl, Edit*, pEd )
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index ae66faa9b637..c2f5fac0e18d 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -160,7 +160,7 @@ class OfaLanguagesTabPage : public SfxTabPage
bool m_bDatePatternsValid;
DECL_LINK_TYPED( SupportHdl, Button*, void ) ;
- DECL_LINK( LocaleSettingHdl, SvxLanguageBox* ) ;
+ DECL_LINK_TYPED( LocaleSettingHdl, ListBox&, void ) ;
DECL_LINK( DatePatternsHdl, Edit* ) ;
public:
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 3033918c8751..345468494451 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -525,9 +525,9 @@ void SvxProxyTabPage::EnableControls_Impl(bool bEnable)
-IMPL_LINK( SvxProxyTabPage, ProxyHdl_Impl, ListBox *, pBox )
+IMPL_LINK_TYPED( SvxProxyTabPage, ProxyHdl_Impl, ListBox&, rBox, void )
{
- sal_Int32 nPos = pBox->GetSelectEntryPos();
+ sal_Int32 nPos = rBox.GetSelectEntryPos();
// Restore original system values
if( nPos == 1 )
@@ -536,7 +536,6 @@ IMPL_LINK( SvxProxyTabPage, ProxyHdl_Impl, ListBox *, pBox )
}
EnableControls_Impl(nPos == 2);
- return 0;
}
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index 32804fb4a9d9..0183f077af0c 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -95,7 +95,7 @@ private:
void ReadConfigDefaults_Impl();
void RestoreConfigDefaults_Impl();
- DECL_LINK( ProxyHdl_Impl, ListBox * );
+ DECL_LINK_TYPED( ProxyHdl_Impl, ListBox&, void );
DECL_STATIC_LINK_TYPED( SvxProxyTabPage, LoseFocusHdl_Impl, Control&, void );
public:
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 552bd17f2a49..b43d1e90e092 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -861,10 +861,9 @@ IMPL_LINK_NOARG_TYPED(SvxJavaParameterDlg, AssignHdl_Impl, Button*, void)
-IMPL_LINK_NOARG(SvxJavaParameterDlg, SelectHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SvxJavaParameterDlg, SelectHdl_Impl, ListBox&, void)
{
EnableRemoveButton();
- return 0;
}
@@ -1066,10 +1065,9 @@ IMPL_LINK_NOARG_TYPED(SvxJavaClassPathDlg, RemoveHdl_Impl, Button*, void)
-IMPL_LINK_NOARG(SvxJavaClassPathDlg, SelectHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SvxJavaClassPathDlg, SelectHdl_Impl, ListBox&, void)
{
EnableRemoveButton();
- return 0;
}
@@ -1129,7 +1127,7 @@ void SvxJavaClassPathDlg::SetClassPath( const OUString& _rPath )
}
// select first entry
m_pPathList->SelectEntryPos(0);
- SelectHdl_Impl( NULL );
+ SelectHdl_Impl( *m_pPathList );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index a139fa27da17..294f5e910db3 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -129,7 +129,7 @@ private:
DECL_LINK(ModifyHdl_Impl, void *);
DECL_LINK_TYPED(AssignHdl_Impl, Button*, void);
- DECL_LINK(SelectHdl_Impl, void *);
+ DECL_LINK_TYPED(SelectHdl_Impl, ListBox&, void);
DECL_LINK_TYPED(DblClickHdl_Impl, ListBox&, void);
DECL_LINK_TYPED(RemoveHdl_Impl, Button*, void);
@@ -165,7 +165,7 @@ private:
DECL_LINK_TYPED(AddArchiveHdl_Impl, Button*, void);
DECL_LINK_TYPED(AddPathHdl_Impl, Button*, void);
DECL_LINK_TYPED(RemoveHdl_Impl, Button*, void);
- DECL_LINK(SelectHdl_Impl, void *);
+ DECL_LINK_TYPED(SelectHdl_Impl, ListBox&, void);
bool IsPathDuplicate( const OUString& _rPath );
inline void EnableRemoveButton()
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 40b77cb3d6bf..278355608267 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1901,7 +1901,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(vcl::Window* pParent, SvxLinguData_Impl& rD
if(!m_pLanguageLB->IsLanguageSelected( eSysLang ) )
m_pLanguageLB->SelectEntryPos(0);
- m_pLanguageLB->SetSelectHdl( LINK( this, SvxEditModulesDlg, LangSelectHdl_Impl ));
+ m_pLanguageLB->SetSelectHdl( LINK( this, SvxEditModulesDlg, LangSelectListBoxHdl_Impl ));
LangSelectHdl_Impl(m_pLanguageLB);
}
@@ -2010,7 +2010,12 @@ IMPL_LINK_NOARG_TYPED( SvxEditModulesDlg, BoxCheckButtonHdl_Impl, SvTreeListBox
}
}
-IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox )
+IMPL_LINK_TYPED( SvxEditModulesDlg, LangSelectListBoxHdl_Impl, ListBox&, rBox, void )
+{
+ LangSelectHdl_Impl(&rBox);
+}
+
+void SvxEditModulesDlg::LangSelectHdl_Impl(ListBox* pBox)
{
LanguageType eCurLanguage = m_pLanguageLB->GetSelectLanguage();
static Locale aLastLocale;
@@ -2262,7 +2267,6 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox )
}
}
aLastLocale = aCurLocale;
- return 0;
}
IMPL_LINK_TYPED( SvxEditModulesDlg, UpDownHdl_Impl, Button *, pBtn, void )
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index 22f65cceaf7c..8042509293ce 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -219,7 +219,7 @@ public:
VclPtr<Edit> mpDevice;
VclPtr<Edit> mpDriverVersion;
- DECL_LINK(OSSelectHdl, ListBox*);
+ DECL_LINK_TYPED(OSSelectHdl, ListBox&, void);
DECL_LINK(EditModifiedHdl, Edit*);
ListEntryDialog(vcl::Window* pParent, const OpenCLConfig::ImplMatcher& rEntry, const OString& rTag);
@@ -274,17 +274,15 @@ ListEntryDialog::ListEntryDialog(vcl::Window* pParent, const OpenCLConfig::ImplM
SetText(get<FixedText>(rTag + "title")->GetText());
}
-IMPL_LINK(ListEntryDialog, OSSelectHdl, ListBox*, pListBox)
+IMPL_LINK_TYPED(ListEntryDialog, OSSelectHdl, ListBox&, rListBox, void)
{
- if (pListBox == mpOS)
+ if (&rListBox == mpOS)
{
if (mpOS->GetSelectEntryPos() == 0)
maEntry.maOS.clear();
else
maEntry.maOS = mpOS->GetSelectEntry();
}
-
- return 0;
}
IMPL_LINK(ListEntryDialog, EditModifiedHdl, Edit*, pEdit)
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index eee1ad2ff536..cdde1a1dffec 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -185,7 +185,7 @@ SvxSaveTabPage::SvxSaveTabPage( vcl::Window* pParent, const SfxItemSet& rCoreSet
pImpl->aDefaultReadonlyArr[APP_WRITER_GLOBAL] = aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::EFactory::WRITERGLOBAL);
}
- Link<> aLink = LINK( this, SvxSaveTabPage, ODFVersionHdl_Impl );
+ Link<ListBox&,void> aLink = LINK( this, SvxSaveTabPage, ODFVersionHdl_Impl );
aODFVersionLB->SetSelectHdl( aLink );
aLink = LINK( this, SvxSaveTabPage, FilterHdl_Impl );
aDocTypeLB->SetSelectHdl( aLink );
@@ -460,7 +460,7 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
}
}
aDocTypeLB->SelectEntryPos(0);
- FilterHdl_Impl(aDocTypeLB);
+ FilterHdl_Impl(*aDocTypeLB);
}
catch(Exception& e)
{
@@ -497,7 +497,7 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
aODFVersionLB->SelectEntryPos( aODFVersionLB->GetEntryPos( pDefaultVersion ) );
AutoClickHdl_Impl( aAutoSaveCB );
- ODFVersionHdl_Impl( aODFVersionLB );
+ ODFVersionHdl_Impl( *aODFVersionLB );
aDocInfoCB->SaveValue();
aBackupCB->SaveValue();
@@ -558,7 +558,7 @@ static OUString lcl_ExtracUIName(const Sequence<PropertyValue> &rProperties)
return sName;
}
-IMPL_LINK( SvxSaveTabPage, FilterHdl_Impl, ListBox *, pBox )
+IMPL_LINK_TYPED( SvxSaveTabPage, FilterHdl_Impl, ListBox&, rBox, void )
{
const sal_Int32 nCurPos = aDocTypeLB->GetSelectEntryPos();
@@ -568,7 +568,7 @@ IMPL_LINK( SvxSaveTabPage, FilterHdl_Impl, ListBox *, pBox )
if ( nData >= 0 && nData < APP_COUNT )
{
- if(aDocTypeLB == pBox)
+ if(aDocTypeLB == &rBox)
{
aSaveAsLB->Clear();
const OUString* pFilters = pImpl->aFilterArr[nData].getConstArray();
@@ -604,7 +604,7 @@ IMPL_LINK( SvxSaveTabPage, FilterHdl_Impl, ListBox *, pBox )
}
else
{
- OUString sSelect = pBox->GetSelectEntry();
+ OUString sSelect = rBox.GetSelectEntry();
const OUString* pFilters = pImpl->aFilterArr[nData].getConstArray();
OUString* pUIFilters = pImpl->aUIFilterArr[nData].getArray();
for(int i = 0; i < pImpl->aUIFilterArr[nData].getLength(); i++)
@@ -618,11 +618,10 @@ IMPL_LINK( SvxSaveTabPage, FilterHdl_Impl, ListBox *, pBox )
}
}
- ODFVersionHdl_Impl( aSaveAsLB );
- return 0;
+ ODFVersionHdl_Impl( *aSaveAsLB );
};
-IMPL_LINK_NOARG(SvxSaveTabPage, ODFVersionHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SvxSaveTabPage, ODFVersionHdl_Impl, ListBox&, void)
{
sal_IntPtr nVersion = sal_IntPtr( aODFVersionLB->GetSelectEntryData() );
bool bShown = SvtSaveOptions::ODFDefaultVersion( nVersion ) != SvtSaveOptions::ODFVER_LATEST;
@@ -645,8 +644,6 @@ IMPL_LINK_NOARG(SvxSaveTabPage, ODFVersionHdl_Impl)
aODFWarningFI->Show( bShown );
aODFWarningFT->Show( bShown );
-
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx
index 0a33a2a36239..06f450723cfc 100644
--- a/cui/source/options/optsave.hxx
+++ b/cui/source/options/optsave.hxx
@@ -61,8 +61,8 @@ private:
SvxSaveTabPage_Impl* pImpl;
DECL_LINK_TYPED( AutoClickHdl_Impl, Button*, void );
- DECL_LINK( FilterHdl_Impl, ListBox * );
- DECL_LINK(ODFVersionHdl_Impl, void *);
+ DECL_LINK_TYPED( FilterHdl_Impl, ListBox&, void );
+ DECL_LINK_TYPED(ODFVersionHdl_Impl, ListBox&, void );
void DetectHiddenControls();
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 2450e1ab9484..905cf4e98a61 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -500,7 +500,7 @@ IMPL_LINK_TYPED( SvxPersonalizationTabPage, DefaultPersona, Button*, pButton, vo
}
}
-IMPL_LINK( SvxPersonalizationTabPage, SelectInstalledPersona, ListBox*, )
+IMPL_LINK_NOARG_TYPED( SvxPersonalizationTabPage, SelectInstalledPersona, ListBox&, void)
{
m_pOwnPersona->Check();
@@ -519,8 +519,6 @@ IMPL_LINK( SvxPersonalizationTabPage, SelectInstalledPersona, ListBox*, )
aFilter.ImportGraphic( aGraphic, aURLObj );
Bitmap aBmp = aGraphic.GetBitmap();
m_pExtensionPersonaPreview->SetModeImage( Image( aBmp ) );
-
- return 0;
}
/// Find the value on the Persona page, and convert it to a usable form.
diff --git a/cui/source/options/personalization.hxx b/cui/source/options/personalization.hxx
index 59e9cbdf81a9..5878033abfd2 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -68,7 +68,7 @@ private:
DECL_LINK_TYPED( DefaultPersona, Button*, void );
/// Handle the Personas installed through extensions selection
- DECL_LINK( SelectInstalledPersona, ListBox* );
+ DECL_LINK_TYPED( SelectInstalledPersona, ListBox&, void );
};
/** Dialog that will allow the user to choose a Persona to use.