summaryrefslogtreecommitdiff
path: root/svtools
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 /svtools
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 'svtools')
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx9
-rw-r--r--svtools/source/dialogs/PlaceEditDialog.cxx10
-rw-r--r--svtools/source/dialogs/ServerDetailsControls.cxx3
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx10
-rw-r--r--svtools/source/dialogs/prnsetup.cxx3
-rw-r--r--svtools/source/filter/exportdialog.cxx12
-rw-r--r--svtools/source/filter/exportdialog.hxx1
7 files changed, 26 insertions, 22 deletions
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index e486e0e7b0bb..491f02be8f89 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -175,6 +174,7 @@ namespace svt
ListBoxCellController::ListBoxCellController(ListBoxControl* pWin)
:CellController(pWin)
{
+ GetListBox().SetSelectHdl(LINK(this, ListBoxCellController, ListBoxSelectHdl));
}
@@ -217,7 +217,12 @@ namespace svt
void ListBoxCellController::SetModifyHdl(const Link<>& rLink)
{
- GetListBox().SetSelectHdl(rLink);
+ maModifyHdl = rLink;
+ }
+
+ IMPL_LINK_TYPED(ListBoxCellController, ListBoxSelectHdl, ListBox&, rListBox, void)
+ {
+ maModifyHdl.Call(&rListBox);
}
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index 7f9ffa576ab0..eb0cbd1231b9 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -102,7 +102,7 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent, const std::shared_ptr<Pla
}
m_pLBServerType->SelectEntryPos( i );
- SelectTypeHdl( m_pLBServerType );
+ SelectTypeHdl( *m_pLBServerType );
}
}
@@ -210,7 +210,7 @@ void PlaceEditDialog::InitDetails( )
if ( m_pLBServerType->GetSelectEntry() == "--------------------" )
m_pLBServerType->SelectEntryPos( 1 );
- SelectTypeHdl( m_pLBServerType );
+ SelectTypeHdl( *m_pLBServerType );
}
void PlaceEditDialog::UpdateLabel( )
@@ -317,7 +317,7 @@ IMPL_LINK_NOARG( PlaceEditDialog, EditUsernameHdl )
return 1;
}
-IMPL_LINK_NOARG( PlaceEditDialog, SelectTypeHdl )
+IMPL_LINK_NOARG_TYPED( PlaceEditDialog, SelectTypeHdl, ListBox&, void )
{
if ( m_pLBServerType->GetSelectEntry() == "--------------------" )
{
@@ -326,7 +326,7 @@ IMPL_LINK_NOARG( PlaceEditDialog, SelectTypeHdl )
else
m_pLBServerType->SetNoSelection();
- return 0;
+ return;
}
if (m_xCurrentDetails.get())
@@ -345,8 +345,6 @@ IMPL_LINK_NOARG( PlaceEditDialog, SelectTypeHdl )
SetSizePixel(GetOptimalSize());
EditHdl(NULL);
-
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index accb47f73571..7943e65e446a 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -493,10 +493,9 @@ IMPL_LINK_NOARG_TYPED( CmisDetailsContainer, RefreshReposHdl, Button*, void )
{}
}
-IMPL_LINK_NOARG( CmisDetailsContainer, SelectRepoHdl )
+IMPL_LINK_NOARG_TYPED( CmisDetailsContainer, SelectRepoHdl, ListBox&, void )
{
selectRepository( );
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index a54c68177e8a..62fc3085d893 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -981,22 +981,20 @@ void AssignmentPersistentData::ImplCommit()
}
- IMPL_LINK(AddressBookSourceDialog, OnFieldSelect, ListBox*, _pListbox)
+ IMPL_LINK_TYPED(AddressBookSourceDialog, OnFieldSelect, ListBox&, _rListbox, void)
{
// the index of the affected list box in our array
- sal_IntPtr nListBoxIndex = reinterpret_cast<sal_IntPtr>(_pListbox->GetEntryData(0));
+ sal_IntPtr nListBoxIndex = reinterpret_cast<sal_IntPtr>(_rListbox.GetEntryData(0));
DBG_ASSERT(nListBoxIndex >= 0 && nListBoxIndex < FIELD_CONTROLS_VISIBLE,
"AddressBookSourceDialog::OnFieldScroll: invalid list box entry!");
// update the array where we remember the field selections
- if (0 == _pListbox->GetSelectEntryPos())
+ if (0 == _rListbox.GetSelectEntryPos())
// it's the "no field selection" entry
m_pImpl->aFieldAssignments[m_pImpl->nFieldScrollPos * 2 + nListBoxIndex].clear();
else
// it's a regular field entry
- m_pImpl->aFieldAssignments[m_pImpl->nFieldScrollPos * 2 + nListBoxIndex] = _pListbox->GetSelectEntry();
-
- return 0L;
+ m_pImpl->aFieldAssignments[m_pImpl->nFieldScrollPos * 2 + nListBoxIndex] = _rListbox.GetSelectEntry();
}
diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx
index 849714f133e5..505fc3124f3d 100644
--- a/svtools/source/dialogs/prnsetup.cxx
+++ b/svtools/source/dialogs/prnsetup.cxx
@@ -310,12 +310,11 @@ IMPL_LINK_NOARG_TYPED(PrinterSetupDialog, ImplPropertiesHdl, Button*, void)
-IMPL_LINK_NOARG(PrinterSetupDialog, ImplChangePrinterHdl)
+IMPL_LINK_NOARG_TYPED(PrinterSetupDialog, ImplChangePrinterHdl, ListBox&, void)
{
mpTempPrinter = ImplPrnDlgListBoxSelect(m_pLbName, m_pBtnProperties,
mpPrinter, mpTempPrinter );
ImplSetInfo();
- return 0;
}
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index e675a2703a99..c1613961cdfd 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -658,7 +658,7 @@ ExportDialog::ExportDialog(FltCallDialogParameter& rPara,
setupControls();
// Size
- mpLbSizeX->SetSelectHdl( LINK( this, ExportDialog, SelectHdl ) );
+ mpLbSizeX->SetSelectHdl( LINK( this, ExportDialog, SelectListBoxHdl ) );
if (mpSbCompression)
mpSbCompression->SetScrollHdl(LINK(this, ExportDialog, SbCompressionUpdateHdl));
@@ -669,9 +669,9 @@ ExportDialog::ExportDialog(FltCallDialogParameter& rPara,
mpMfSizeY->SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeY ) );
mpNfResolution->SetModifyHdl( LINK( this, ExportDialog, UpdateHdlNfResolution ) );
- mpLbResolution->SetSelectHdl( LINK( this, ExportDialog, SelectHdl ) );
+ mpLbResolution->SetSelectHdl( LINK( this, ExportDialog, SelectListBoxHdl ) );
- mpLbColorDepth->SetSelectHdl( LINK( this, ExportDialog, SelectHdl ) );
+ mpLbColorDepth->SetSelectHdl( LINK( this, ExportDialog, SelectListBoxHdl ) );
mpCbInterlaced->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
@@ -1030,9 +1030,13 @@ void ExportDialog::dispose()
\************************************************************************/
IMPL_LINK_NOARG(ExportDialog, SelectHdl)
{
- UpdateHdl(NULL);
+ updateControls();
return 0;
}
+IMPL_LINK_NOARG_TYPED(ExportDialog, SelectListBoxHdl, ListBox&, void)
+{
+ updateControls();
+}
IMPL_LINK_NOARG_TYPED(ExportDialog, UpdateHdl, Button*, void)
{
updateControls();
diff --git a/svtools/source/filter/exportdialog.hxx b/svtools/source/filter/exportdialog.hxx
index 0dc3dd05c054..61f86e7c0303 100644
--- a/svtools/source/filter/exportdialog.hxx
+++ b/svtools/source/filter/exportdialog.hxx
@@ -143,6 +143,7 @@ private:
DECL_LINK_TYPED( UpdateHdl, Button*, void );
+ DECL_LINK_TYPED( SelectListBoxHdl, ListBox&, void );
DECL_LINK( SelectHdl, void* );
DECL_LINK( UpdateHdlMtfSizeX, void* );
DECL_LINK( UpdateHdlMtfSizeY, void* );