[Libreoffice-commits] core.git: 3 commits - chart2/source cui/source dbaccess/source desktop/source filter/source include/svtools include/svx include/vcl sc/source sd/source sfx2/source svtools/source svx/source toolkit/source vcl/inc vcl/source
Noel Grandin
noel at peralex.com
Mon Sep 14 01:01:20 PDT 2015
chart2/source/controller/dialogs/res_ErrorBar.cxx | 3
chart2/source/controller/dialogs/res_LegendPosition.cxx | 6 -
chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx | 12 +-
chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx | 4
chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx | 7 -
chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx | 4
chart2/source/controller/dialogs/tp_ChartType.cxx | 20 +---
chart2/source/controller/dialogs/tp_RangeChooser.cxx | 11 +-
chart2/source/controller/dialogs/tp_RangeChooser.hxx | 1
chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx | 11 +-
chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx | 1
chart2/source/controller/inc/res_ErrorBar.hxx | 2
chart2/source/controller/inc/res_LegendPosition.hxx | 2
cui/source/dialogs/cuifmsearch.cxx | 46 ++++------
cui/source/dialogs/cuigrfflt.cxx | 14 ++-
cui/source/inc/autocdlg.hxx | 4
cui/source/inc/cuifmsearch.hxx | 2
cui/source/inc/cuigrfflt.hxx | 5 -
cui/source/inc/cuitabarea.hxx | 4
cui/source/options/optgdlg.cxx | 6 -
cui/source/options/optgdlg.hxx | 2
cui/source/tabpages/autocdlg.cxx | 19 +---
cui/source/tabpages/tparea.cxx | 8 -
cui/source/tabpages/tpcolor.cxx | 3
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 4
dbaccess/source/ui/dlg/adminpages.cxx | 4
dbaccess/source/ui/dlg/adminpages.hxx | 1
dbaccess/source/ui/dlg/detailpages.cxx | 6 -
dbaccess/source/ui/querydesign/querydlg.cxx | 8 -
dbaccess/source/ui/querydesign/querydlg.hxx | 2
desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 3
desktop/source/deployment/gui/dp_gui_updatedialog.hxx | 2
filter/source/flash/impswfdialog.cxx | 6 -
filter/source/flash/impswfdialog.hxx | 2
filter/source/pdf/impdialog.cxx | 21 +---
filter/source/pdf/impdialog.hxx | 10 +-
filter/source/svg/impsvgdialog.cxx | 10 --
filter/source/svg/impsvgdialog.hxx | 2
include/svtools/ServerDetailsControls.hxx | 2
include/svx/compressgraphicdialog.hxx | 2
include/vcl/button.hxx | 4
include/vcl/layout.hxx | 2
include/vcl/svapp.hxx | 2
include/vcl/vclevent.hxx | 2
include/vcl/window.hxx | 2
sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx | 5 -
sc/source/ui/cctrl/checklistmenu.cxx | 6 +
sc/source/ui/dbgui/foptmgr.cxx | 8 -
sc/source/ui/inc/RandomNumberGeneratorDialog.hxx | 2
sc/source/ui/inc/checklistmenu.hxx | 1
sc/source/ui/inc/foptmgr.hxx | 2
sc/source/ui/inc/namedlg.hxx | 1
sc/source/ui/inc/sharedocdlg.hxx | 2
sc/source/ui/miscdlgs/sharedocdlg.cxx | 4
sc/source/ui/namedlg/namedlg.cxx | 23 +++--
sd/source/ui/dlg/vectdlg.cxx | 8 -
sd/source/ui/inc/vectdlg.hxx | 2
sfx2/source/dialog/securitypage.cxx | 6 -
svtools/source/dialogs/ServerDetailsControls.cxx | 6 -
svx/source/dialog/compressgraphicdialog.cxx | 4
toolkit/source/awt/vclxwindow.cxx | 3
vcl/inc/printdlg.hxx | 4
vcl/inc/svdata.hxx | 2
vcl/source/app/svapp.cxx | 11 +-
vcl/source/app/vclevent.cxx | 8 -
vcl/source/control/button.cxx | 2
vcl/source/window/event.cxx | 6 -
vcl/source/window/layout.cxx | 5 -
vcl/source/window/menu.cxx | 2
vcl/source/window/printdlg.cxx | 14 +--
70 files changed, 210 insertions(+), 221 deletions(-)
New commits:
commit 2a4ccc0c1e836fb7cde991c1233ca5a63599ec8b
Author: Noel Grandin <noel at peralex.com>
Date: Fri Sep 11 13:27:40 2015 +0200
convert Link<> to typed
Change-Id: I1c501671d72edd5b998e80c7fa1e91dbeb507af8
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index e0fc718..748dcc1 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -404,11 +404,10 @@ IMPL_LINK_NOARG_TYPED( ErrorBarResources, CategoryChosen, Button*, void )
UpdateControlStates();
}
-IMPL_LINK_NOARG(ErrorBarResources, SynchronizePosAndNeg)
+IMPL_LINK_NOARG_TYPED(ErrorBarResources, SynchronizePosAndNeg, CheckBox&, void)
{
UpdateControlStates();
PosValueChanged( 0 );
- return 0;
}
IMPL_LINK_NOARG(ErrorBarResources, PosValueChanged)
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index 57c948c..8202e1a 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -88,7 +88,7 @@ void LegendPositionResources::writeToResources( const uno::Reference< frame::XMo
xProp->getPropertyValue( "Show" ) >>= bShowLegend;
if (m_pCbxShow)
m_pCbxShow->Check( bShowLegend );
- PositionEnableHdl(0);
+ PositionEnableHdl(*m_pCbxShow);
//position
chart2::LegendPosition ePos;
@@ -165,7 +165,7 @@ void LegendPositionResources::writeToModel( const ::com::sun::star::uno::Referen
}
}
-IMPL_LINK_NOARG(LegendPositionResources, PositionEnableHdl)
+IMPL_LINK_NOARG_TYPED(LegendPositionResources, PositionEnableHdl, CheckBox&, void)
{
bool bEnable = m_pCbxShow == nullptr || m_pCbxShow->IsChecked();
@@ -175,8 +175,6 @@ IMPL_LINK_NOARG(LegendPositionResources, PositionEnableHdl)
m_pRbtBottom->Enable( bEnable );
m_aChangeLink.Call(NULL);
-
- return 0;
}
void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs )
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
index 0e48c33..fafa6fc 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
@@ -317,22 +317,21 @@ IMPL_LINK_NOARG(ThreeD_SceneAppearance_TabPage, SelectSchemeHdl)
return 0;
}
-IMPL_LINK_NOARG(ThreeD_SceneAppearance_TabPage, SelectShading)
+IMPL_LINK_NOARG_TYPED(ThreeD_SceneAppearance_TabPage, SelectShading, CheckBox&, void)
{
if( !m_bUpdateOtherControls )
- return 0;
+ return;
m_pCB_Shading->EnableTriState( false );
applyShadeModeToModel();
updateScheme();
- return 0;
}
-IMPL_LINK( ThreeD_SceneAppearance_TabPage, SelectRoundedEdgeOrObjectLines, CheckBox*, pCheckBox )
+IMPL_LINK_TYPED( ThreeD_SceneAppearance_TabPage, SelectRoundedEdgeOrObjectLines, CheckBox&, rCheckBox, void )
{
if( !m_bUpdateOtherControls )
- return 0;
+ return;
- if( pCheckBox == m_pCB_ObjectLines )
+ if( &rCheckBox == m_pCB_ObjectLines )
{
m_pCB_ObjectLines->EnableTriState( false );
m_bUpdateOtherControls = false;
@@ -345,7 +344,6 @@ IMPL_LINK( ThreeD_SceneAppearance_TabPage, SelectRoundedEdgeOrObjectLines, Check
m_pCB_RoundedEdge->EnableTriState( false );
applyRoundedEdgeAndObjectLinesToModel();
updateScheme();
- return 0;
}
} //namespace chart
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
index 80720d0..6896466 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
@@ -45,8 +45,8 @@ public:
private:
DECL_LINK( SelectSchemeHdl, void* );
- DECL_LINK( SelectShading, void* );
- DECL_LINK( SelectRoundedEdgeOrObjectLines, CheckBox* );
+ DECL_LINK_TYPED( SelectShading, CheckBox&, void );
+ DECL_LINK_TYPED( SelectRoundedEdgeOrObjectLines, CheckBox&, void );
void initControlsFromModel();
void applyShadeModeToModel();
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
index b1cf19f..f0c9c10 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
@@ -245,14 +245,13 @@ IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, PerspectiveChanged)
return 0;
}
-IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, PerspectiveToggled)
+IMPL_LINK_NOARG_TYPED(ThreeD_SceneGeometry_TabPage, PerspectiveToggled, CheckBox&, void)
{
m_pMFPerspective->Enable( m_pCbxPerspective->IsChecked() );
applyPerspectiveToModel();
- return 0;
}
-IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled)
+IMPL_LINK_NOARG_TYPED(ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled, CheckBox&, void)
{
ControllerLockHelperGuard aGuard( m_rControllerLockHelper );
@@ -284,8 +283,6 @@ IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled)
}
ThreeDHelper::switchRightAngledAxes( m_xSceneProperties, m_pCbxRightAngledAxes->IsChecked() );
-
- return 0;
}
} //namespace chart
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
index 8bdba7c..be6c44b 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
@@ -54,8 +54,8 @@ public:
DECL_LINK( PerspectiveChanged, void* );
// is called immediately when a field changes
DECL_LINK( PerspectiveEdited, void* );
- DECL_LINK( PerspectiveToggled, void* );
- DECL_LINK( RightAngledAxesToggled, void* );
+ DECL_LINK_TYPED( PerspectiveToggled, CheckBox&, void );
+ DECL_LINK_TYPED( RightAngledAxesToggled, CheckBox&, void );
private:
void applyAnglesToModel();
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 59e5b9c..f356a05 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -55,7 +55,7 @@ public:
void fillParameter( ChartTypeParameter& rParameter );
private:
- DECL_LINK( Dim3DLookCheckHdl, void* );
+ DECL_LINK_TYPED( Dim3DLookCheckHdl, CheckBox&, void );
DECL_LINK( SelectSchemeHdl, void* );
private:
@@ -104,11 +104,10 @@ void Dim3DLookResourceGroup::fillParameter( ChartTypeParameter& rParameter )
rParameter.eThreeDLookScheme = ThreeDLookScheme_Unknown;
}
-IMPL_LINK_NOARG(Dim3DLookResourceGroup, Dim3DLookCheckHdl)
+IMPL_LINK_NOARG_TYPED(Dim3DLookResourceGroup, Dim3DLookCheckHdl, CheckBox&, void)
{
if(m_pChangeListener)
m_pChangeListener->stateChanged(this);
- return 0;
}
IMPL_LINK_NOARG(Dim3DLookResourceGroup, SelectSchemeHdl)
@@ -129,7 +128,7 @@ public:
void fillParameter( ChartTypeParameter& rParameter );
private:
- DECL_LINK( SortByXValuesCheckHdl, void* );
+ DECL_LINK_TYPED( SortByXValuesCheckHdl, CheckBox&, void );
private:
VclPtr<CheckBox> m_pCB_XValueSorting;
@@ -157,11 +156,10 @@ void SortByXValuesResourceGroup::fillParameter( ChartTypeParameter& rParameter )
rParameter.bSortByXValues = m_pCB_XValueSorting->IsChecked();
}
-IMPL_LINK_NOARG(SortByXValuesResourceGroup, SortByXValuesCheckHdl)
+IMPL_LINK_NOARG_TYPED(SortByXValuesResourceGroup, SortByXValuesCheckHdl, CheckBox&, void)
{
if(m_pChangeListener)
m_pChangeListener->stateChanged(this);
- return 0;
}
class StackingResourceGroup : public ChangingResource
@@ -176,7 +174,7 @@ public:
private:
DECL_LINK_TYPED( StackingChangeHdl, RadioButton&, void );
- DECL_LINK( StackingEnableHdl, void* );
+ DECL_LINK_TYPED( StackingEnableHdl, CheckBox&, void );
private:
VclPtr<CheckBox> m_pCB_Stacked;
@@ -261,11 +259,10 @@ IMPL_LINK_TYPED( StackingResourceGroup, StackingChangeHdl, RadioButton&, rRadio,
if( m_pChangeListener && rRadio.IsChecked() )
m_pChangeListener->stateChanged(this);
}
-IMPL_LINK_NOARG(StackingResourceGroup, StackingEnableHdl)
+IMPL_LINK_NOARG_TYPED(StackingResourceGroup, StackingEnableHdl, CheckBox&, void)
{
if( m_pChangeListener )
m_pChangeListener->stateChanged(this);
- return 0;
}
class GL3DResourceGroup : public ChangingResource
@@ -278,7 +275,7 @@ public:
void fillParameter( ChartTypeParameter& rParam );
private:
- DECL_LINK( SettingChangedHdl, void* );
+ DECL_LINK_TYPED( SettingChangedHdl, CheckBox&, void );
private:
VclPtr<CheckBox> m_pCB_RoundedEdge;
};
@@ -304,11 +301,10 @@ void GL3DResourceGroup::fillParameter( ChartTypeParameter& rParam )
rParam.mbRoundedEdge = m_pCB_RoundedEdge->IsChecked();
}
-IMPL_LINK_NOARG( GL3DResourceGroup, SettingChangedHdl )
+IMPL_LINK_NOARG_TYPED( GL3DResourceGroup, SettingChangedHdl, CheckBox&, void )
{
if (m_pChangeListener)
m_pChangeListener->stateChanged(this);
- return 0;
}
class SplinePropertiesDialog : public ModalDialog
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 3b6584f..7888fb8 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -119,9 +119,9 @@ RangeChooserTabPage::RangeChooserTabPage( vcl::Window* pParent
m_pED_Range->SetUpdateDataHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ));
m_pED_Range->SetModifyHdl( LINK( this, RangeChooserTabPage, ControlEditedHdl ));
m_pRB_Rows->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedRadioHdl ) );
- m_pCB_FirstRowAsLabel->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
- m_pCB_FirstColumnAsLabel->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
- m_pCB_TimeBased->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
+ m_pCB_FirstRowAsLabel->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedCheckBoxHdl ) );
+ m_pCB_FirstColumnAsLabel->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedCheckBoxHdl ) );
+ m_pCB_TimeBased->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedCheckBoxHdl ) );
m_pEd_TimeStart->SetModifyHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
m_pEd_TimeEnd->SetModifyHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
@@ -363,6 +363,11 @@ IMPL_LINK_NOARG_TYPED(RangeChooserTabPage, ControlChangedRadioHdl, RadioButton&,
ControlChangedHdl(NULL);
}
+IMPL_LINK_NOARG_TYPED(RangeChooserTabPage, ControlChangedCheckBoxHdl, CheckBox&, void)
+{
+ ControlChangedHdl(NULL);
+}
+
IMPL_LINK_NOARG(RangeChooserTabPage, ControlChangedHdl)
{
setDirty();
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
index 3cbb7ee..bfa75f9 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
@@ -73,6 +73,7 @@ protected: //methods
DECL_LINK_TYPED( ChooseRangeHdl, Button*, void );
DECL_LINK( ControlChangedHdl, void* );
+ DECL_LINK_TYPED( ControlChangedCheckBoxHdl, CheckBox&, void );
DECL_LINK_TYPED( ControlChangedRadioHdl, RadioButton&, void );
DECL_LINK( ControlEditedHdl, void* );
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
index 8c40e6d..ef5a731 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
@@ -52,9 +52,9 @@ TitlesAndObjectsTabPage::TitlesAndObjectsTabPage( svt::OWizardMachine* pParent
m_xTitleResources->SetUpdateDataHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl ));
m_xLegendPositionResources->SetChangeHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl ));
- m_pCB_Grid_X->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl ));
- m_pCB_Grid_Y->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl ));
- m_pCB_Grid_Z->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl ));
+ m_pCB_Grid_X->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeCheckBoxHdl ));
+ m_pCB_Grid_Y->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeCheckBoxHdl ));
+ m_pCB_Grid_Z->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeCheckBoxHdl ));
}
TitlesAndObjectsTabPage::~TitlesAndObjectsTabPage()
@@ -145,6 +145,11 @@ void TitlesAndObjectsTabPage::commitToModel()
}
}
+
+IMPL_LINK_NOARG_TYPED(TitlesAndObjectsTabPage, ChangeCheckBoxHdl, CheckBox&, void)
+{
+ ChangeHdl(NULL);
+}
IMPL_LINK_NOARG(TitlesAndObjectsTabPage, ChangeHdl)
{
if( m_bCommitToModel )
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
index 520453c..949e579 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
@@ -54,6 +54,7 @@ public:
protected:
void commitToModel();
DECL_LINK( ChangeHdl, void* );
+ DECL_LINK_TYPED( ChangeCheckBoxHdl, CheckBox&, void );
protected:
boost::scoped_ptr< TitleResources > m_xTitleResources;
diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx
index a2b309d..efbfc8a 100644
--- a/chart2/source/controller/inc/res_ErrorBar.hxx
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -124,7 +124,7 @@ private:
DECL_LINK_TYPED( CategoryChosen, Button*, void );
DECL_LINK( CategoryChosen2, void* );
- DECL_LINK( SynchronizePosAndNeg, void * );
+ DECL_LINK_TYPED( SynchronizePosAndNeg, CheckBox&, void );
DECL_LINK( PosValueChanged, void * );
DECL_LINK_TYPED( IndicatorChanged, Button *, void );
DECL_LINK_TYPED( ChooseRange, Button *, void );
diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx b/chart2/source/controller/inc/res_LegendPosition.hxx
index 17cd166..348045d 100644
--- a/chart2/source/controller/inc/res_LegendPosition.hxx
+++ b/chart2/source/controller/inc/res_LegendPosition.hxx
@@ -50,7 +50,7 @@ public:
void SetChangeHdl( const Link<>& rLink );
- DECL_LINK( PositionEnableHdl, void* );
+ DECL_LINK_TYPED( PositionEnableHdl, CheckBox&, void );
DECL_LINK_TYPED( PositionChangeHdl, RadioButton&, void );
private:
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 8120707..8929c98 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -387,9 +387,9 @@ IMPL_LINK_TYPED(FmSearchDialog, OnClickedSpecialSettings, Button*, pButton, void
m_pSearchEngine->SetTransliterationFlags(nFlags);
m_pcbCase->Check(m_pSearchEngine->GetCaseSensitive());
- OnCheckBoxToggled( m_pcbCase );
+ OnCheckBoxToggled( *m_pcbCase );
m_pHalfFullFormsCJK->Check( !m_pSearchEngine->GetIgnoreWidthCJK() );
- OnCheckBoxToggled( m_pHalfFullFormsCJK );
+ OnCheckBoxToggled( *m_pHalfFullFormsCJK );
}
}
}
@@ -434,28 +434,28 @@ IMPL_LINK(FmSearchDialog, OnFieldSelected, ListBox*, pBox)
return 0;
}
-IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox*, pBox)
+IMPL_LINK_TYPED(FmSearchDialog, OnCheckBoxToggled, CheckBox&, rBox, void)
{
- bool bChecked = pBox->IsChecked();
+ bool bChecked = rBox.IsChecked();
// formatter or case -> pass on to the engine
- if (pBox == m_pcbUseFormat)
+ if (&rBox == m_pcbUseFormat)
m_pSearchEngine->SetFormatterUsing(bChecked);
- else if (pBox == m_pcbCase)
+ else if (&rBox == m_pcbCase)
m_pSearchEngine->SetCaseSensitive(bChecked);
// direction -> pass on and reset the checkbox-text for StartOver
- else if (pBox == m_pcbBackwards)
+ else if (&rBox == m_pcbBackwards)
{
m_pcbStartOver->SetText( OUString( CUI_RES( bChecked ? RID_STR_FROM_BOTTOM : RID_STR_FROM_TOP ) ) );
m_pSearchEngine->SetDirection(!bChecked);
}
// similarity-search or regular expression
- else if ((pBox == m_pcbApprox) || (pBox == m_pcbRegular) || (pBox == m_pcbWildCard))
+ else if ((&rBox == m_pcbApprox) || (&rBox == m_pcbRegular) || (&rBox == m_pcbWildCard))
{
CheckBox* pBoxes[] = { m_pcbWildCard, m_pcbRegular, m_pcbApprox };
for (sal_uInt32 i=0; i< SAL_N_ELEMENTS(pBoxes); ++i)
{
- if (pBoxes[i] != pBox)
+ if (pBoxes[i] != &rBox)
{
if (bChecked)
pBoxes[i]->Disable();
@@ -471,7 +471,7 @@ IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox*, pBox)
// (disabled boxes have to be passed to the engine as sal_False)
// adjust the Position-Listbox (which is not allowed during Wildcard-search)
- if (pBox == m_pcbWildCard)
+ if (&rBox == m_pcbWildCard)
{
if (bChecked)
{
@@ -486,7 +486,7 @@ IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox*, pBox)
}
// and the button for similarity-search
- if (pBox == m_pcbApprox)
+ if (&rBox == m_pcbApprox)
{
if (bChecked)
m_ppbApproxSettings->Enable();
@@ -494,12 +494,12 @@ IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox*, pBox)
m_ppbApproxSettings->Disable();
}
}
- else if (pBox == m_pHalfFullFormsCJK)
+ else if (&rBox == m_pHalfFullFormsCJK)
{
// forward to the search engine
m_pSearchEngine->SetIgnoreWidthCJK( !bChecked );
}
- else if (pBox == m_pSoundsLikeCJK)
+ else if (&rBox == m_pSoundsLikeCJK)
{
m_pSoundsLikeCJKSettings->Enable(bChecked);
@@ -514,8 +514,6 @@ IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox*, pBox)
// forward to the search engine
m_pSearchEngine->SetTransliteration( bChecked );
}
-
- return 0;
}
void FmSearchDialog::InitContext(sal_Int16 nContext)
@@ -803,21 +801,21 @@ void FmSearchDialog::LoadParams()
m_pcbUseFormat->Check(aParams.bUseFormatter);
m_pcbCase->Check( aParams.isCaseSensitive() );
m_pcbBackwards->Check(aParams.bBackwards);
- LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pcbUseFormat);
- LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pcbCase);
- LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pcbBackwards);
+ LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pcbUseFormat);
+ LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pcbCase);
+ LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pcbBackwards);
m_pHalfFullFormsCJK->Check( !aParams.isIgnoreWidthCJK( ) ); // BEWARE: this checkbox has a inverse semantics!
m_pSoundsLikeCJK->Check( aParams.bSoundsLikeCJK );
- LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pHalfFullFormsCJK);
- LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pSoundsLikeCJK);
+ LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pHalfFullFormsCJK);
+ LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pSoundsLikeCJK);
m_pcbWildCard->Check(false);
m_pcbRegular->Check(false);
m_pcbApprox->Check(false);
- LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pcbWildCard);
- LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pcbRegular);
- LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(m_pcbApprox);
+ LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pcbWildCard);
+ LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pcbRegular);
+ LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*m_pcbApprox);
CheckBox* pToCheck = NULL;
if (aParams.bWildcard)
@@ -831,7 +829,7 @@ void FmSearchDialog::LoadParams()
if (pToCheck)
{
pToCheck->Check();
- LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(pToCheck);
+ LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(*pToCheck);
}
// set Levenshtein-parameters directly at the SearchEngine
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 89794f7..73bb4c3 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -203,11 +203,16 @@ GraphicFilterMosaic::GraphicFilterMosaic( vcl::Window* pParent, const Graphic& r
mpMtrHeight->SetModifyHdl( GetModifyHdl() );
mpCbxEdges->Check( bEnhanceEdges );
- mpCbxEdges->SetToggleHdl( GetModifyHdl() );
+ mpCbxEdges->SetToggleHdl( LINK(this, GraphicFilterMosaic, CheckBoxModifyHdl) );
mpMtrWidth->GrabFocus();
}
+IMPL_LINK_TYPED(GraphicFilterMosaic, CheckBoxModifyHdl, CheckBox&, rCheckBox, void)
+{
+ GetModifyHdl().Call(&rCheckBox);
+}
+
GraphicFilterMosaic::~GraphicFilterMosaic()
{
disposeOnce();
@@ -327,7 +332,12 @@ GraphicFilterSolarize::GraphicFilterSolarize( vcl::Window* pParent, const Graphi
mpMtrThreshold->SetModifyHdl( GetModifyHdl() );
mpCbxInvert->Check( bInvert );
- mpCbxInvert->SetToggleHdl( GetModifyHdl() );
+ mpCbxInvert->SetToggleHdl( LINK(this, GraphicFilterSolarize, CheckBoxModifyHdl) );
+}
+
+IMPL_LINK_TYPED(GraphicFilterSolarize, CheckBoxModifyHdl, CheckBox&, rCheckBox, void)
+{
+ GetModifyHdl().Call(&rCheckBox);
}
GraphicFilterSolarize::~GraphicFilterSolarize()
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 472e9ab..3c034fe 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -441,7 +441,7 @@ private:
editeng::SortedAutoCompleteStrings* m_pAutoCompleteList;
sal_uInt16 m_nAutoCmpltListCnt;
- DECL_LINK( CheckHdl, CheckBox* );
+ DECL_LINK_TYPED( CheckHdl, CheckBox&, void );
OfaAutoCompleteTabPage( vcl::Window* pParent,
const SfxItemSet& rSet );
@@ -492,7 +492,7 @@ private:
Enables/disables all controls in the tab page (except from the
check box.
*/
- DECL_LINK(CheckHdl, void *);
+ DECL_LINK_TYPED(CheckHdl, CheckBox&, void);
/** Handler for the push button
diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx
index 7cca082..fb1d9b2 100644
--- a/cui/source/inc/cuifmsearch.hxx
+++ b/cui/source/inc/cuifmsearch.hxx
@@ -167,7 +167,7 @@ private:
DECL_LINK( OnFieldSelected, ListBox* );
DECL_LINK( OnFocusGrabbed, ComboBox* );
- DECL_LINK( OnCheckBoxToggled, CheckBox* );
+ DECL_LINK_TYPED( OnCheckBoxToggled, CheckBox&, void );
DECL_LINK( OnContextSelection, ListBox* );
diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx
index 93efc3b..1a9e1b6 100644
--- a/cui/source/inc/cuigrfflt.hxx
+++ b/cui/source/inc/cuigrfflt.hxx
@@ -112,7 +112,7 @@ private:
VclPtr<MetricField> mpMtrWidth;
VclPtr<MetricField> mpMtrHeight;
VclPtr<CheckBox> mpCbxEdges;
-
+ DECL_LINK_TYPED(CheckBoxModifyHdl, CheckBox&, void);
public:
GraphicFilterMosaic(vcl::Window* pParent, const Graphic& rGraphic,
@@ -123,7 +123,7 @@ public:
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE;
long GetTileWidth() const { return static_cast<long>(mpMtrWidth->GetValue()); }
long GetTileHeight() const { return static_cast<long>(mpMtrHeight->GetValue()); }
- bool IsEnhanceEdges() const { return mpCbxEdges->IsChecked(); }
+ bool IsEnhanceEdges() const { return mpCbxEdges->IsChecked(); }
};
class GraphicFilterSolarize : public GraphicFilterDialog
@@ -131,6 +131,7 @@ class GraphicFilterSolarize : public GraphicFilterDialog
private:
VclPtr<MetricField> mpMtrThreshold;
VclPtr<CheckBox> mpCbxInvert;
+ DECL_LINK_TYPED(CheckBoxModifyHdl, CheckBox&, void);
public:
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 29dbd03..4514c29 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -268,7 +268,7 @@ private:
DECL_LINK( ModifyHatchBckgrdColorHdl_Impl, void * );
DECL_LINK( ModifyGradientHdl_Impl, void * );
DECL_LINK( ModifyHatchingHdl_Impl, void * );
- DECL_LINK( ToggleHatchBckgrdColorHdl_Impl, void * );
+ DECL_LINK_TYPED( ToggleHatchBckgrdColorHdl_Impl, CheckBox&, void );
DECL_LINK( ModifyBitmapHdl_Impl, void * );
DECL_LINK( ModifyStepCountHdl_Impl, void* );
DECL_LINK_TYPED( ModifyStepCountClickHdl_Impl, Button*, void );
@@ -651,7 +651,7 @@ private:
VclPtr<PushButton> m_pBtnSave;
VclPtr<FixedText> m_pTableName;
- DECL_LINK( EmbedToggleHdl_Impl, void * );
+ DECL_LINK_TYPED( EmbedToggleHdl_Impl, CheckBox&, void );
DECL_LINK_TYPED( ClickLoadHdl_Impl, Button*, void );
DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void );
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 7f84f2c..2feda57 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -711,14 +711,12 @@ void OfaViewTabPage::dispose()
}
#if defined( UNX )
-IMPL_LINK_NOARG( OfaViewTabPage, OnAntialiasingToggled )
+IMPL_LINK_NOARG_TYPED( OfaViewTabPage, OnAntialiasingToggled, CheckBox&, void )
{
bool bAAEnabled = m_pFontAntiAliasing->IsChecked();
m_pAAPointLimitLabel->Enable( bAAEnabled );
m_pAAPointLimit->Enable( bAAEnabled );
-
- return 0L;
}
#endif
@@ -972,7 +970,7 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
m_pFontShowCB->SaveValue();
#if defined( UNX )
- LINK( this, OfaViewTabPage, OnAntialiasingToggled ).Call( NULL );
+ LINK( this, OfaViewTabPage, OnAntialiasingToggled ).Call( *m_pFontAntiAliasing );
#endif
}
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index b66a628..24558d5 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -115,7 +115,7 @@ private:
std::vector<vcl::IconThemeInfo> mInstalledIconThemes;
#if defined( UNX )
- DECL_LINK( OnAntialiasingToggled, void* );
+ DECL_LINK_TYPED( OnAntialiasingToggled, CheckBox&, void );
#endif
public:
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index d51c47b..f1e5f23 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2356,8 +2356,8 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet* )
m_pPBEntries->Disable();
}
- CheckHdl(m_pCBActiv);
- CheckHdl(m_pCBCollect);
+ CheckHdl(*m_pCBActiv);
+ CheckHdl(*m_pCBCollect);
}
void OfaAutoCompleteTabPage::ActivatePage( const SfxItemSet& )
@@ -2379,19 +2379,18 @@ IMPL_LINK_NOARG_TYPED(OfaAutoCompleteTabPage, DeleteHdl, Button*, void)
}
}
-IMPL_LINK( OfaAutoCompleteTabPage, CheckHdl, CheckBox*, pBox )
+IMPL_LINK_TYPED( OfaAutoCompleteTabPage, CheckHdl, CheckBox&, rBox, void )
{
- bool bEnable = pBox->IsChecked();
- if (pBox == m_pCBActiv)
+ bool bEnable = rBox.IsChecked();
+ if (&rBox == m_pCBActiv)
{
m_pCBAppendSpace->Enable( bEnable );
m_pCBAppendSpace->Enable( bEnable );
m_pCBAsTip->Enable( bEnable );
m_pDCBExpandKey->Enable( bEnable );
}
- else if (m_pCBCollect == pBox)
+ else if (m_pCBCollect == &rBox)
m_pCBRemoveList->Enable( bEnable );
- return 0;
}
void OfaAutoCompleteTabPage::CopyToClipboard() const
@@ -2601,7 +2600,7 @@ IMPL_LINK_NOARG_TYPED(OfaSmartTagOptionsTabPage, ClickHdl, Button*, void)
/** Handler for the check box
*/
-IMPL_LINK_NOARG(OfaSmartTagOptionsTabPage, CheckHdl)
+IMPL_LINK_NOARG_TYPED(OfaSmartTagOptionsTabPage, CheckHdl, CheckBox&, void)
{
const bool bEnable = m_pMainCB->IsChecked();
m_pSmartTagTypesLB->Enable( bEnable );
@@ -2614,8 +2613,6 @@ IMPL_LINK_NOARG(OfaSmartTagOptionsTabPage, CheckHdl)
// We do this by calling SelectHdl:
if ( bEnable )
SelectHdl(m_pSmartTagTypesLB);
-
- return 0;
}
/** Handler for the list box
@@ -2696,7 +2693,7 @@ void OfaSmartTagOptionsTabPage::Reset( const SfxItemSet* )
FillListBox( *pSmartTagMgr );
m_pSmartTagTypesLB->SelectEntryPos( 0 );
m_pMainCB->Check( pSmartTagMgr->IsLabelTextWithSmartTags() );
- CheckHdl(m_pMainCB);
+ CheckHdl(*m_pMainCB);
}
void OfaSmartTagOptionsTabPage::ActivatePage( const SfxItemSet& )
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 288fc2f..e03c987 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -1583,7 +1583,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs )
case drawing::FillStyle_HATCH:
ClickHatchingHdl_Impl();
- ToggleHatchBckgrdColorHdl_Impl( this );
+ ToggleHatchBckgrdColorHdl_Impl( *m_pCbxHatchBckgrd );
break;
case drawing::FillStyle_BITMAP:
@@ -2020,7 +2020,7 @@ void SvxAreaTabPage::ClickHatchingHdl_Impl()
ModifyHatchingHdl_Impl( this );
ModifyHatchBckgrdColorHdl_Impl( this );
- ToggleHatchBckgrdColorHdl_Impl( this );
+ ToggleHatchBckgrdColorHdl_Impl( *m_pCbxHatchBckgrd );
}
@@ -2078,7 +2078,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl)
-IMPL_LINK_NOARG(SvxAreaTabPage, ToggleHatchBckgrdColorHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SvxAreaTabPage, ToggleHatchBckgrdColorHdl_Impl, CheckBox&, void)
{
// switch on/off backgroundcolor for hatches
m_pLbHatchBckgrdColor->Enable( m_pCbxHatchBckgrd->IsChecked() );
@@ -2097,8 +2097,6 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ToggleHatchBckgrdColorHdl_Impl)
m_pLbHatchBckgrdColor->SelectEntry( aColorItem.GetColorValue() );
}
}
-
- return 0L;
}
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index a1c4174..2f16de2 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -89,10 +89,9 @@ bool SvxColorTabPage::GetEmbed()
return pList.is() && pList->IsEmbedInDocument();
}
-IMPL_LINK_NOARG(SvxColorTabPage, EmbedToggleHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SvxColorTabPage, EmbedToggleHdl_Impl, CheckBox&, void)
{
SetEmbed( m_pBoxEmbed->IsChecked() );
- return 0;
}
void SvxColorTabPage::UpdateTableName()
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index b8e744c..5284f1c 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -151,7 +151,7 @@ using namespace ::com::sun::star;
m_pETHostServer->SetModifyHdl(getControlModifiedLink());
m_pETBaseDN->SetModifyHdl(getControlModifiedLink());
m_pNFPortNumber->SetModifyHdl(getControlModifiedLink());
- m_pCBUseSSL->SetToggleHdl(getControlModifiedLink());
+ m_pCBUseSSL->SetToggleHdl( LINK(this, OGenericAdministrationPage, ControlModifiedCheckBoxHdl) );
SetRoadmapStateValue(false);
}
@@ -701,7 +701,7 @@ using namespace ::com::sun::star;
:OConnectionTabPageSetup(pParent, "DBWizSpreadsheetPage", "dbaccess/ui/dbwizspreadsheetpage.ui", _rCoreAttrs, STR_SPREADSHEET_HELPTEXT, STR_SPREADSHEET_HEADERTEXT, STR_SPREADSHEETPATH)
{
get(m_pPasswordrequired, "passwordrequired");
- m_pPasswordrequired->SetToggleHdl(getControlModifiedLink());
+ m_pPasswordrequired->SetToggleHdl( LINK(this, OGenericAdministrationPage, ControlModifiedCheckBoxHdl) );
}
OSpreadSheetConnectionPageSetup::~OSpreadSheetConnectionPageSetup()
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index 82b68b3..aae3d12 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -111,6 +111,10 @@ namespace dbaui
{
getControlModifiedLink().Call(pCtrl);
}
+ IMPL_LINK_TYPED(OGenericAdministrationPage, ControlModifiedCheckBoxHdl, CheckBox&, rCtrl, void)
+ {
+ getControlModifiedLink().Call(&rCtrl);
+ }
bool OGenericAdministrationPage::getSelectedDataSource(OUString& _sReturn, OUString& _sCurr)
{
// collect all ODBC data source names
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx
index 552857c..f046c46 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -213,6 +213,7 @@ namespace dbaui
virtual Link<> getControlModifiedLink() { return LINK(this, OGenericAdministrationPage, OnControlModified); }
// calls via getControlModifiedLink()
Link<Button*,void> getControlModifiedClickLink() { return LINK(this, OGenericAdministrationPage, OnControlModifiedClick); }
+ DECL_LINK_TYPED(ControlModifiedCheckBoxHdl, CheckBox&, void);
private:
DECL_LINK_TYPED(OnControlModifiedClick, Button*, void);
};
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index d51829c..00f6027 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -275,7 +275,7 @@ namespace dbaui
:OCommonBehaviourTabPage(pParent, "ODBC", "dbaccess/ui/odbcpage.ui", _rCoreAttrs, CBTP_USE_CHARSET | CBTP_USE_OPTIONS)
{
get(m_pUseCatalog, "useCatalogCheckbutton");
- m_pUseCatalog->SetToggleHdl(getControlModifiedLink());
+ m_pUseCatalog->SetToggleHdl( LINK(this, OGenericAdministrationPage, ControlModifiedCheckBoxHdl) );
}
OOdbcDetailsPage::~OOdbcDetailsPage()
@@ -324,7 +324,7 @@ namespace dbaui
get(m_pNFPortNumber, "portnumber");
m_pNFPortNumber->SetUseThousandSep(false);
get(m_pUseCatalog, "usecatalog");
- m_pUseCatalog->SetToggleHdl(getControlModifiedLink());
+ m_pUseCatalog->SetToggleHdl( LINK(this, OGenericAdministrationPage, ControlModifiedCheckBoxHdl) );
}
OUserDriverDetailsPage::~OUserDriverDetailsPage()
@@ -662,7 +662,7 @@ namespace dbaui
get(m_pNFRowCount, "LDAPRowCountspinbutton");
m_pETBaseDN->SetModifyHdl(getControlModifiedLink());
- m_pCBUseSSL->SetToggleHdl(getControlModifiedLink());
+ m_pCBUseSSL->SetToggleHdl( LINK(this, OGenericAdministrationPage, ControlModifiedCheckBoxHdl) );
m_pNFPortNumber->SetModifyHdl(getControlModifiedLink());
m_pNFRowCount->SetModifyHdl(getControlModifiedLink());
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index e0a9038..ebb3188 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -219,7 +219,7 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ )
if ( eJoinType != CROSS_JOIN )
{
m_pTableControl->NotifyCellChange();
- NaturalToggleHdl(m_pCBNatural);
+ NaturalToggleHdl(*m_pCBNatural);
}
m_pTableControl->Invalidate();
@@ -248,7 +248,7 @@ IMPL_LINK_NOARG_TYPED( DlgQryJoin, OKClickHdl, Button*, void )
EndDialog(RET_OK);
}
-IMPL_LINK( DlgQryJoin, NaturalToggleHdl, CheckBox*, /*pButton*/ )
+IMPL_LINK_NOARG_TYPED( DlgQryJoin, NaturalToggleHdl, CheckBox&, void )
{
bool bChecked = m_pCBNatural->IsChecked();
static_cast<OQueryTableConnectionData*>(m_pConnData.get())->setNatural(bChecked);
@@ -275,8 +275,6 @@ IMPL_LINK( DlgQryJoin, NaturalToggleHdl, CheckBox*, /*pButton*/ )
m_pTableControl->NotifyCellChange();
m_pTableControl->Invalidate();
}
-
- return 1;
}
TTableConnectionData::value_type DlgQryJoin::getConnectionData() const
@@ -293,7 +291,7 @@ void DlgQryJoin::notifyConnectionChange( )
{
setJoinType( static_cast<OQueryTableConnectionData*>(m_pConnData.get())->GetJoinType() );
m_pCBNatural->Check(static_cast<OQueryTableConnectionData*>(m_pConnData.get())->isNatural());
- NaturalToggleHdl(m_pCBNatural);
+ NaturalToggleHdl(*m_pCBNatural);
}
void DlgQryJoin::setJoinType(EJoinType _eNewJoinType)
diff --git a/dbaccess/source/ui/querydesign/querydlg.hxx b/dbaccess/source/ui/querydesign/querydlg.hxx
index c90d13b..feca1af 100644
--- a/dbaccess/source/ui/querydesign/querydlg.hxx
+++ b/dbaccess/source/ui/querydesign/querydlg.hxx
@@ -56,7 +56,7 @@ namespace dbaui
DECL_LINK_TYPED( OKClickHdl, Button*, void );
DECL_LINK( LBChangeHdl, ListBox* );
- DECL_LINK( NaturalToggleHdl, CheckBox* );
+ DECL_LINK_TYPED( NaturalToggleHdl, CheckBox&, void );
/** setJoinType enables and set the new join type
@param _eNewJoinType the new jointype
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 4cc82d6..5fb517d 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -1246,7 +1246,7 @@ IMPL_LINK_NOARG_TYPED(UpdateDialog, selectionHandler, SvTreeListBox*, void)
showDescription( b.makeStringAndClear() );
}
-IMPL_LINK_NOARG(UpdateDialog, allHandler)
+IMPL_LINK_NOARG_TYPED(UpdateDialog, allHandler, CheckBox&, void)
{
if (m_pAll->IsChecked())
{
@@ -1286,7 +1286,6 @@ IMPL_LINK_NOARG(UpdateDialog, allHandler)
showDescription(m_noInstallable);
}
}
- return 0;
}
IMPL_LINK_NOARG_TYPED(UpdateDialog, okHandler, Button*, void)
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
index f4807c8..b3298da 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
@@ -160,7 +160,7 @@ private:
bool showDescription( const OUString& rDescription);
DECL_LINK_TYPED(selectionHandler, SvTreeListBox*, void);
- DECL_LINK(allHandler, void *);
+ DECL_LINK_TYPED(allHandler, CheckBox&, void);
DECL_LINK_TYPED(okHandler, Button*, void);
DECL_LINK_TYPED(closeHandler, Button*, void);
DECL_LINK(hyperlink_clicked, FixedHyperlink *);
diff --git a/filter/source/flash/impswfdialog.cxx b/filter/source/flash/impswfdialog.cxx
index 9a0da76..120bdcd 100644
--- a/filter/source/flash/impswfdialog.cxx
+++ b/filter/source/flash/impswfdialog.cxx
@@ -96,16 +96,14 @@ Sequence< PropertyValue > ImpSWFDialog::GetFilterData()
}
// AS: This is called whenever the user toggles one of the checkboxes
-IMPL_LINK( ImpSWFDialog, OnToggleCheckbox, CheckBox*, pBox )
+IMPL_LINK_TYPED( ImpSWFDialog, OnToggleCheckbox, CheckBox&, rBox, void )
{
- if (pBox == mpCheckExportAll)
+ if (&rBox == mpCheckExportAll)
{
mpCheckExportBackgrounds->Enable(!mpCheckExportBackgrounds->IsEnabled());
mpCheckExportBackgroundObjects->Enable(!mpCheckExportBackgroundObjects->IsEnabled());
mpCheckExportSlideContents->Enable(!mpCheckExportSlideContents->IsEnabled());
}
-
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/flash/impswfdialog.hxx b/filter/source/flash/impswfdialog.hxx
index aae9ecf..5ff6f08 100644
--- a/filter/source/flash/impswfdialog.hxx
+++ b/filter/source/flash/impswfdialog.hxx
@@ -52,7 +52,7 @@ private:
FilterConfigItem maConfigItem;
- DECL_LINK( OnToggleCheckbox, CheckBox* );
+ DECL_LINK_TYPED( OnToggleCheckbox, CheckBox&, void );
public:
ImpSWFDialog( vcl::Window* pParent,
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 5d89feb..5cb213e 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -632,7 +632,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( ImpPDFTabDialog* paParent )
case 1: mpCbPDFA1b->Check(); // PDF/A-1a
break;
}
- ToggleExportPDFAHdl( NULL );
+ ToggleExportPDFAHdl( *mpCbPDFA1b );
mpCbExportFormFields->SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleExportFormFieldsHdl ) );
@@ -678,7 +678,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( ImpPDFTabDialog* paParent )
mpCbAddStream->SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleAddStreamHdl ) );
// init addstream dependencies
- ToggleAddStreamHdl(NULL);
+ ToggleAddStreamHdl(*mpCbAddStream);
}
@@ -755,10 +755,9 @@ void ImpPDFTabGeneralPage::TogglePagesHdl()
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportFormFieldsHdl)
+IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleExportFormFieldsHdl, CheckBox&, void)
{
mpFormsFrame->Enable(mpCbExportFormFields->IsChecked());
- return 0;
}
@@ -768,25 +767,22 @@ IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleCompressionHdl, RadioButton&,
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleReduceImageResolutionHdl)
+IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleReduceImageResolutionHdl, CheckBox&, void)
{
mpCoReduceImageResolution->Enable( mpCbReduceImageResolution->IsChecked() );
- return 0;
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleWatermarkHdl)
+IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleWatermarkHdl, CheckBox&, void)
{
mpEdWatermark->Enable( mpCbWatermark->IsChecked() );
mpFtWatermark->Enable (mpCbWatermark->IsChecked() );
if ( mpCbWatermark->IsChecked() )
mpEdWatermark->GrabFocus();
-
- return 0;
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleAddStreamHdl)
+IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleAddStreamHdl, CheckBox&, void)
{
if( mpCbAddStream->IsVisible() )
{
@@ -805,11 +801,10 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleAddStreamHdl)
mpRbSelection->Enable( true );
}
}
- return 0;
}
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportPDFAHdl)
+IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleExportPDFAHdl, CheckBox&, void)
{
//set the security page status (and its controls as well)
ImpPDFTabSecurityPage* pSecPage = mpaParent ? mpaParent->getSecurityPage() : NULL;
@@ -851,8 +846,6 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportPDFAHdl)
ScopedVclPtrInstance< MessageDialog > aBox(this, PDFFilterResId(STR_WARN_PASSWORD_PDFA), VCL_MESSAGE_WARNING);
aBox->Execute();
}
-
- return 0;
}
// the option features tab page
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 4dfbe30..f656ab8 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -233,14 +233,14 @@ class ImpPDFTabGeneralPage : public SfxTabPage
DECL_LINK_TYPED( TogglePagesHdl, RadioButton&, void );
DECL_LINK_TYPED( ToggleCompressionHdl, RadioButton&, void );
- DECL_LINK( ToggleReduceImageResolutionHdl, void* );
- DECL_LINK( ToggleWatermarkHdl, void* );
- DECL_LINK( ToggleAddStreamHdl, void* );
- DECL_LINK( ToggleExportFormFieldsHdl, void* );
+ DECL_LINK_TYPED( ToggleReduceImageResolutionHdl, CheckBox&, void );
+ DECL_LINK_TYPED( ToggleWatermarkHdl, CheckBox&, void );
+ DECL_LINK_TYPED( ToggleAddStreamHdl, CheckBox&, void );
+ DECL_LINK_TYPED( ToggleExportFormFieldsHdl, CheckBox&, void );
void TogglePagesHdl();
public:
- DECL_LINK( ToggleExportPDFAHdl, void* );
+ DECL_LINK_TYPED( ToggleExportPDFAHdl, CheckBox&, void );
ImpPDFTabGeneralPage( vcl::Window* pParent,
const SfxItemSet& rSet );
diff --git a/filter/source/svg/impsvgdialog.cxx b/filter/source/svg/impsvgdialog.cxx
index 2fe2bb4..c513a1c 100644
--- a/filter/source/svg/impsvgdialog.cxx
+++ b/filter/source/svg/impsvgdialog.cxx
@@ -77,7 +77,7 @@ ImpSVGDialog::ImpSVGDialog( vcl::Window* pParent, Sequence< PropertyValue >& rFi
Size( implMap( *this, 50 ), implMap( *this, 14 ) ) );
maCBTinyProfile->SetToggleHdl( LINK( this, ImpSVGDialog, OnToggleCheckbox ) );
- OnToggleCheckbox( maCBTinyProfile.get() );
+ OnToggleCheckbox( *maCBTinyProfile.get() );
maFI->Show();
@@ -123,11 +123,11 @@ Sequence< PropertyValue > ImpSVGDialog::GetFilterData()
-IMPL_LINK( ImpSVGDialog, OnToggleCheckbox, CheckBox*, pBox )
+IMPL_LINK_TYPED( ImpSVGDialog, OnToggleCheckbox, CheckBox&, rBox, void )
{
- if( pBox == maCBTinyProfile.get() )
+ if( &rBox == maCBTinyProfile.get() )
{
- if( pBox->IsChecked() )
+ if( rBox.IsChecked() )
{
mbOldNativeDecoration = maCBUseNativeDecoration->IsChecked();
@@ -140,8 +140,6 @@ IMPL_LINK( ImpSVGDialog, OnToggleCheckbox, CheckBox*, pBox )
maCBUseNativeDecoration->Check( mbOldNativeDecoration );
}
}
-
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/impsvgdialog.hxx b/filter/source/svg/impsvgdialog.hxx
index ada5b71..c10400e 100644
--- a/filter/source/svg/impsvgdialog.hxx
+++ b/filter/source/svg/impsvgdialog.hxx
@@ -60,7 +60,7 @@ private:
FilterConfigItem maConfigItem;
bool mbOldNativeDecoration;
- DECL_LINK( OnToggleCheckbox, CheckBox* );
+ DECL_LINK_TYPED( OnToggleCheckbox, CheckBox&, void );
public:
diff --git a/include/svtools/ServerDetailsControls.hxx b/include/svtools/ServerDetailsControls.hxx
index 334778b..5f69525 100644
--- a/include/svtools/ServerDetailsControls.hxx
+++ b/include/svtools/ServerDetailsControls.hxx
@@ -103,7 +103,7 @@ class DavDetailsContainer : public HostDetailsContainer
virtual bool verifyScheme( const OUString& rScheme ) SAL_OVERRIDE;
private:
- DECL_LINK ( ToggledDavsHdl, CheckBox * );
+ DECL_LINK_TYPED( ToggledDavsHdl, CheckBox&, void );
};
class SmbDetailsContainer : public DetailsContainer
diff --git a/include/svx/compressgraphicdialog.hxx b/include/svx/compressgraphicdialog.hxx
index eacf312..f14a517 100644
--- a/include/svx/compressgraphicdialog.hxx
+++ b/include/svx/compressgraphicdialog.hxx
@@ -67,7 +67,7 @@ private:
DECL_LINK( NewHeightModifiedHdl, void* );
DECL_LINK( ResolutionModifiedHdl, void* );
DECL_LINK_TYPED( ToggleCompressionRB, RadioButton&, void );
- DECL_LINK( ToggleReduceResolutionRB, void* );
+ DECL_LINK_TYPED( ToggleReduceResolutionRB, CheckBox&, void );
DECL_LINK_TYPED( CalculateClickHdl, Button*, void );
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 5717ebc..408eda9 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -409,7 +409,7 @@ private:
TriState meState;
TriState meSaveValue;
bool mbTriState;
- Link<> maToggleHdl;
+ Link<CheckBox&,void> maToggleHdl;
// when mbLegacyNoTextAlign is set then the old behaviour where
// the WB_LEFT, WB_RIGHT & WB_CENTER affect the image placement
// occurs, otherwise the image ( checkbox box ) is placed
@@ -482,7 +482,7 @@ public:
Size CalcMinimumSize( long nMaxWidth = 0 ) const;
virtual Size GetOptimalSize() const SAL_OVERRIDE;
- void SetToggleHdl( const Link<>& rLink ) { maToggleHdl = rLink; }
+ void SetToggleHdl( const Link<CheckBox&,void>& rLink ) { maToggleHdl = rLink; }
void SetLegacyNoTextAlign( bool bVal ) { mbLegacyNoTextAlign = bVal; }
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index e0a72bc..3dab30b 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -506,7 +506,7 @@ private:
bool m_bResizeTopLevel;
VclPtr<DisclosureButton> m_pDisclosureButton;
Link<> maExpandedHdl;
- DECL_DLLPRIVATE_LINK(ClickHdl, DisclosureButton* pBtn);
+ DECL_DLLPRIVATE_LINK_TYPED(ClickHdl, CheckBox&, void);
};
class VCL_DLLPUBLIC VclScrolledWindow : public VclBin
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index ff9b751..7482da6 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -130,7 +130,7 @@ void ScRandomNumberGeneratorDialog::Init()
mpEnableRounding->SetToggleHdl( LINK( this, ScRandomNumberGeneratorDialog, CheckChanged ));
DistributionChanged(NULL);
- CheckChanged(NULL);
+ CheckChanged(*mpEnableSeed);
}
void ScRandomNumberGeneratorDialog::GetRangeFromSelection()
@@ -417,11 +417,10 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, Parameter2ValueModified)
return 0;
}
-IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, CheckChanged)
+IMPL_LINK_NOARG_TYPED(ScRandomNumberGeneratorDialog, CheckChanged, CheckBox&, void)
{
mpSeed->Enable(mpEnableSeed->IsChecked());
mpDecimalPlaces->Enable(mpEnableRounding->IsChecked());
- return 0;
}
IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged)
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 4fae698..9911d3b 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1215,6 +1215,10 @@ IMPL_LINK_NOARG_TYPED(ScCheckListMenuWindow, TriStateHdl, Button*, void)
mePrevToggleAllState = maChkToggleAll->GetState();
}
+IMPL_LINK_NOARG_TYPED(ScCheckListMenuWindow, EdModifyCheckBoxHdl, CheckBox&, void)
+{
+ EdModifyHdl(nullptr);
+}
IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl)
{
OUString aSearchText = maEdSearch->GetText();
diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx
index 2b1cd62..29b6dc2 100644
--- a/sc/source/ui/dbgui/foptmgr.cxx
+++ b/sc/source/ui/dbgui/foptmgr.cxx
@@ -253,11 +253,11 @@ IMPL_LINK( ScFilterOptionsMgr, EdAreaModifyHdl, Edit*, pEd )
return 0;
}
-IMPL_LINK( ScFilterOptionsMgr, BtnCopyResultHdl, CheckBox*, pBox )
+IMPL_LINK_TYPED( ScFilterOptionsMgr, BtnCopyResultHdl, CheckBox&, rBox, void )
{
- if ( pBox == pBtnCopyResult )
+ if ( &rBox == pBtnCopyResult )
{
- if ( pBox->IsChecked() )
+ if ( rBox.IsChecked() )
{
pBtnDestPers->Enable();
pLbCopyArea->Enable();
@@ -273,8 +273,6 @@ IMPL_LINK( ScFilterOptionsMgr, BtnCopyResultHdl, CheckBox*, pBox )
pRbCopyArea->Disable();
}
}
-
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
index dc751e4..a588b50 100644
--- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
+++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
@@ -80,7 +80,7 @@ private:
DECL_LINK( Parameter1ValueModified, void* );
DECL_LINK( Parameter2ValueModified, void* );
DECL_LINK( DistributionChanged, void* );
- DECL_LINK( CheckChanged, void* );
+ DECL_LINK_TYPED( CheckChanged, CheckBox&, void );
};
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index 5f42cfc..f3289aa 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -332,6 +332,7 @@ private:
DECL_LINK_TYPED( TriStateHdl, Button*, void );
DECL_LINK_TYPED( CheckHdl, SvTreeListBox*, void );
DECL_LINK( EdModifyHdl, void* );
+ DECL_LINK_TYPED( EdModifyCheckBoxHdl, CheckBox&, void );
private:
VclPtr<Edit> maEdSearch;
diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx
index ee27b40..e5626ba 100644
--- a/sc/source/ui/inc/foptmgr.hxx
+++ b/sc/source/ui/inc/foptmgr.hxx
@@ -79,7 +79,7 @@ private:
// Handler:
DECL_LINK( EdAreaModifyHdl, Edit* );
DECL_LINK( LbAreaSelHdl, ListBox* );
- DECL_LINK( BtnCopyResultHdl, CheckBox* );
+ DECL_LINK_TYPED( BtnCopyResultHdl, CheckBox&, void );
};
#endif // INCLUDED_SC_SOURCE_UI_INC_FOPTMGR_HXX
diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx
index 6678b31..9a8329a 100644
--- a/sc/source/ui/inc/namedlg.hxx
+++ b/sc/source/ui/inc/namedlg.hxx
@@ -105,6 +105,7 @@ private:
DECL_LINK_TYPED( AddBtnHdl, Button*, void );
DECL_LINK_TYPED( RemoveBtnHdl, Button*, void );
DECL_LINK( EdModifyHdl, void * );
+ DECL_LINK_TYPED( EdModifyCheckBoxHdl, CheckBox&, void );
DECL_LINK( AssignGetFocusHdl, void * );
DECL_LINK_TYPED( SelectionChangedHdl_Impl, SvTreeListBox*, void );
DECL_LINK( ScopeChangedHdl, void* );
diff --git a/sc/source/ui/inc/sharedocdlg.hxx b/sc/source/ui/inc/sharedocdlg.hxx
index 41f5311..85abd56 100644
--- a/sc/source/ui/inc/sharedocdlg.hxx
+++ b/sc/source/ui/inc/sharedocdlg.hxx
@@ -44,7 +44,7 @@ private:
ScViewData* mpViewData;
ScDocShell* mpDocShell;
- DECL_LINK( ToggleHandle, void* );
+ DECL_LINK_TYPED( ToggleHandle, CheckBox&, void );
public:
ScShareDocumentDlg( vcl::Window* pParent, ScViewData* pViewData );
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index 9cb3ca2..2a82c98 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -119,11 +119,9 @@ void ScShareDocumentDlg::dispose()
ModalDialog::dispose();
}
-IMPL_LINK_NOARG(ScShareDocumentDlg, ToggleHandle)
+IMPL_LINK_NOARG_TYPED(ScShareDocumentDlg, ToggleHandle, CheckBox&, void)
{
m_pFtWarning->Enable( m_pCbShare->IsChecked() );
-
- return 0;
}
bool ScShareDocumentDlg::IsShareDocumentChecked() const
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index eee65db..1a103ed 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -149,10 +149,10 @@ void ScNameDlg::Init()
m_pEdName->SetModifyHdl ( LINK( this, ScNameDlg, EdModifyHdl ) );
m_pLbScope->SetSelectHdl( LINK(this, ScNameDlg, ScopeChangedHdl) );
m_pBtnDelete->SetClickHdl ( LINK( this, ScNameDlg, RemoveBtnHdl ) );
- m_pBtnPrintArea->SetToggleHdl( LINK(this, ScNameDlg, EdModifyHdl ) );
- m_pBtnCriteria->SetToggleHdl( LINK(this, ScNameDlg, EdModifyHdl ) );
- m_pBtnRowHeader->SetToggleHdl( LINK(this, ScNameDlg, EdModifyHdl ) );
- m_pBtnColHeader->SetToggleHdl( LINK(this, ScNameDlg, EdModifyHdl ) );
+ m_pBtnPrintArea->SetToggleHdl( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) );
+ m_pBtnCriteria->SetToggleHdl( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) );
+ m_pBtnRowHeader->SetToggleHdl( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) );
+ m_pBtnColHeader->SetToggleHdl( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) );
// Initialize scope list.
m_pLbScope->InsertEntry(maGlobalNameStr);
@@ -253,10 +253,10 @@ void ScNameDlg::UpdateChecks(ScRangeData* pData)
// handlers, triggering handlers while already processing a handler can
// ( and does in this case ) corrupt the internal data
- m_pBtnCriteria->SetToggleHdl( Link<>() );
- m_pBtnPrintArea->SetToggleHdl( Link<>() );
- m_pBtnColHeader->SetToggleHdl( Link<>() );
- m_pBtnRowHeader->SetToggleHdl( Link<>() );
+ m_pBtnCriteria->SetToggleHdl( Link<CheckBox&,void>() );
+ m_pBtnPrintArea->SetToggleHdl( Link<CheckBox&,void>() );
+ m_pBtnColHeader->SetToggleHdl( Link<CheckBox&,void>() );
+ m_pBtnRowHeader->SetToggleHdl( Link<CheckBox&,void>() );
m_pBtnCriteria->Check( pData->HasType( RT_CRITERIA ) );
m_pBtnPrintArea->Check( pData->HasType( RT_PRINTAREA ) );
@@ -264,7 +264,7 @@ void ScNameDlg::UpdateChecks(ScRangeData* pData)
m_pBtnRowHeader->Check( pData->HasType( RT_ROWHEADER ) );
// Restore handlers so user input is processed again
- Link<> aToggleHandler = LINK( this, ScNameDlg, EdModifyHdl );
+ Link<CheckBox&,void> aToggleHandler = LINK( this, ScNameDlg, EdModifyCheckBoxHdl );
m_pBtnCriteria->SetToggleHdl( aToggleHandler );
m_pBtnPrintArea->SetToggleHdl( aToggleHandler );
m_pBtnColHeader->SetToggleHdl( aToggleHandler );
@@ -503,6 +503,11 @@ IMPL_LINK_NOARG_TYPED(ScNameDlg, RemoveBtnHdl, Button*, void)
RemovePushed();
}
+IMPL_LINK_NOARG_TYPED(ScNameDlg, EdModifyCheckBoxHdl, CheckBox&, void)
+{
+ NameModified();
+}
+
IMPL_LINK_NOARG(ScNameDlg, EdModifyHdl)
{
NameModified();
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index ffcdbe2..82533c2 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -282,9 +282,9 @@ IMPL_LINK_NOARG_TYPED(SdVectorizeDlg, ClickOKHdl, Button*, void)
EndDialog( RET_OK );
}
-IMPL_LINK( SdVectorizeDlg, ToggleHdl, CheckBox*, pCb )
+IMPL_LINK_TYPED( SdVectorizeDlg, ToggleHdl, CheckBox&, rCb, void )
{
- if( pCb->IsChecked() )
+ if( rCb.IsChecked() )
{
m_pFtFillHoles->Enable();
m_pMtFillHoles->Enable();
@@ -296,8 +296,6 @@ IMPL_LINK( SdVectorizeDlg, ToggleHdl, CheckBox*, pCb )
}
ModifyHdl( NULL );
-
- return 0L;
}
IMPL_LINK_NOARG(SdVectorizeDlg, ModifyHdl)
@@ -334,7 +332,7 @@ void SdVectorizeDlg::LoadSettings()
m_pMtFillHoles->SetValue( nFillHoles );
m_pCbFillHoles->Check( bFillHoles );
- ToggleHdl(m_pCbFillHoles);
+ ToggleHdl(*m_pCbFillHoles);
}
void SdVectorizeDlg::SaveSettings() const
diff --git a/sd/source/ui/inc/vectdlg.hxx b/sd/source/ui/inc/vectdlg.hxx
index 3c9a758..13997a7 100644
--- a/sd/source/ui/inc/vectdlg.hxx
+++ b/sd/source/ui/inc/vectdlg.hxx
@@ -75,7 +75,7 @@ class SdVectorizeDlg : public ModalDialog
DECL_LINK( ProgressHdl, void* );
DECL_LINK_TYPED( ClickPreviewHdl, Button*, void );
DECL_LINK_TYPED( ClickOKHdl, Button*, void );
- DECL_LINK( ToggleHdl, CheckBox* );
+ DECL_LINK_TYPED( ToggleHdl, CheckBox&, void );
DECL_LINK( ModifyHdl, void* );
public:
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index c92981f..8236a6e 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -149,7 +149,7 @@ struct SfxSecurityPage_Impl
OUString m_aEndRedliningWarning;
bool m_bEndRedliningWarningDone;
- DECL_LINK( RecordChangesCBToggleHdl, void* );
+ DECL_LINK_TYPED( RecordChangesCBToggleHdl, CheckBox&, void );
DECL_LINK_TYPED( ChangeProtectionPBHdl, Button*, void );
SfxSecurityPage_Impl( SfxSecurityPage &rDlg, const SfxItemSet &rItemSet );
@@ -327,7 +327,7 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & )
}
-IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl)
+IMPL_LINK_NOARG_TYPED(SfxSecurityPage_Impl, RecordChangesCBToggleHdl, CheckBox&, void)
{
// when change recording gets disabled protection must be disabled as well
if (!m_pRecordChangesCB->IsChecked()) // the new check state is already present, thus the '!'
@@ -372,8 +372,6 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl)
m_pUnProtectPB->Hide();
}
}
-
- return 0;
}
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index 9a495f8..22edbf2 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -185,10 +185,10 @@ bool DavDetailsContainer::verifyScheme( const OUString& rScheme )
return bValid;
}
-IMPL_LINK( DavDetailsContainer, ToggledDavsHdl, CheckBox*, pCheckBox )
+IMPL_LINK_TYPED( DavDetailsContainer, ToggledDavsHdl, CheckBox&, rCheckBox, void )
{
// Change default port if needed
- bool bCheckedDavs = pCheckBox->IsChecked();
+ bool bCheckedDavs = rCheckBox.IsChecked();
if ( m_pEDPort->GetValue() == 80 && bCheckedDavs )
m_pEDPort->SetValue( 443 );
else if ( m_pEDPort->GetValue() == 443 && !bCheckedDavs )
@@ -200,8 +200,6 @@ IMPL_LINK( DavDetailsContainer, ToggledDavsHdl, CheckBox*, pCheckBox )
setScheme( sScheme );
notifyChange( );
-
- return 0;
}
SmbDetailsContainer::SmbDetailsContainer( VclBuilderContainer* pBuilder ) :
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 19ce031..05a379e 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -328,15 +328,13 @@ IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, ToggleCompressionRB, RadioButton&
m_pQualitySlider->Enable(!choice);
}
-IMPL_LINK_NOARG( CompressGraphicsDialog, ToggleReduceResolutionRB )
+IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, ToggleReduceResolutionRB, CheckBox&, void )
{
bool choice = m_pReduceResolutionCB->IsChecked();
m_pMFNewWidth->Enable(choice);
m_pMFNewHeight->Enable(choice);
m_pResolutionLB->Enable(choice);
m_pInterpolationCombo->Enable(choice);
-
- return 0L;
}
IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, CalculateClickHdl, Button*, void )
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 3294340..2d50217 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -944,9 +944,8 @@ void VCLXWindow::dispose( ) throw(::com::sun::star::uno::RuntimeException, std:
{
VclPtr<OutputDevice> pOutDev = GetOutputDevice();
SetWindow( NULL ); // so that handlers are logged off, if necessary (virtual)
- SetOutputDevice( pOutDev );
- pOutDev.disposeAndClear();
SetOutputDevice( NULL );
+ pOutDev.disposeAndClear();
}
// #i14103# dispose the accessible context after the window has been destroyed,
diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx
index 198bc0f..8d3d722 100644
--- a/vcl/inc/printdlg.hxx
+++ b/vcl/inc/printdlg.hxx
@@ -242,12 +242,12 @@ namespace vcl
DECL_LINK( SelectHdl, ListBox* );
DECL_LINK_TYPED( ClickHdl, Button*, void );
- DECL_LINK( ToggleHdl, void* );
+ DECL_LINK_TYPED( ToggleHdl, CheckBox&, void );
DECL_LINK_TYPED( ToggleRadioHdl, RadioButton&, void );
DECL_LINK( ModifyHdl, Edit* );
DECL_LINK( UIOptionsChanged, void* );
- DECL_LINK( UIOption_CheckHdl, CheckBox* );
+ DECL_LINK_TYPED( UIOption_CheckHdl, CheckBox&, void );
DECL_LINK_TYPED( UIOption_RadioHdl, RadioButton&, void );
DECL_LINK( UIOption_SelectHdl, ListBox* );
DECL_LINK( UIOption_ModifyHdl, Edit* );
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 49ad2cf..78278c5 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -3591,7 +3591,7 @@ bool CheckBox::PreNotify( NotifyEvent& rNEvt )
void CheckBox::Toggle()
{
- ImplCallEventListenersAndHandler( VCLEVENT_CHECKBOX_TOGGLE, [this] () { maToggleHdl.Call(this); } );
+ ImplCallEventListenersAndHandler( VCLEVENT_CHECKBOX_TOGGLE, [this] () { maToggleHdl.Call(*this); } );
}
void CheckBox::SetState( TriState eState )
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 3b2f042..08692cc 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1609,19 +1609,18 @@ void VclExpander::StateChanged(StateChangedType nType)
}
}
-IMPL_LINK( VclExpander, ClickHdl, DisclosureButton*, pBtn )
+IMPL_LINK_TYPED( VclExpander, ClickHdl, CheckBox&, rBtn, void )
{
vcl::Window *pChild = get_child();
if (pChild)
{
- pChild->Show(pBtn->IsChecked());
+ pChild->Show(rBtn.IsChecked());
queue_resize();
Dialog* pResizeDialog = m_bResizeTopLevel ? GetParentDialog() : NULL;
if (pResizeDialog)
pResizeDialog->setOptimalLayoutSize();
}
maExpandedHdl.Call(this);
- return 0;
}
VclScrolledWindow::VclScrolledWindow(vcl::Window *pParent, WinBits nStyle)
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 37fbfdc..2c81a2a 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1551,10 +1551,9 @@ IMPL_LINK_TYPED( PrintDialog, ToggleRadioHdl, RadioButton&, rButton, void )
ClickHdl(static_cast<Button*>(&rButton));
}
-IMPL_LINK( PrintDialog, ToggleHdl, void*, pButton )
+IMPL_LINK_TYPED( PrintDialog, ToggleHdl, CheckBox&, rButton, void )
{
- ClickHdl(static_cast<Button*>(pButton));
- return 0;
+ ClickHdl(&rButton);
}
IMPL_LINK_TYPED( PrintDialog, ClickHdl, Button*, pButton, void )
@@ -1761,14 +1760,14 @@ void PrintDialog::makeEnabled( vcl::Window* i_pWindow )
}
}
-IMPL_LINK( PrintDialog, UIOption_CheckHdl, CheckBox*, i_pBox )
+IMPL_LINK_TYPED( PrintDialog, UIOption_CheckHdl, CheckBox&, i_rBox, void )
{
- PropertyValue* pVal = getValueForWindow( i_pBox );
+ PropertyValue* pVal = getValueForWindow( &i_rBox );
if( pVal )
{
- makeEnabled( i_pBox );
+ makeEnabled( &i_rBox );
- bool bVal = i_pBox->IsChecked();
+ bool bVal = i_rBox.IsChecked();
pVal->Value <<= bVal;
checkOptionalControlDependencies();
@@ -1776,7 +1775,6 @@ IMPL_LINK( PrintDialog, UIOption_CheckHdl, CheckBox*, i_pBox )
// update preview and page settings
preparePreview();
}
- return 0;
}
IMPL_LINK_TYPED( PrintDialog, UIOption_RadioHdl, RadioButton&, i_rBtn, void )
commit 6532cb0e5ec3a59c248b332e868c4c03c31659f1
Author: Noel Grandin <noel at peralex.com>
Date: Fri Sep 11 09:53:51 2015 +0200
ImplCallEventListeners and FireVclEvent can take references
Change-Id: Ibfb5ae40edd0db1f6b99bd5178d4d871ede37d7d
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index bdfa88d..1721012 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -804,7 +804,7 @@ public:
@see ImplCallEventListeners(sal_uLong nEvent, Windows* pWin, void* pData);
*/
- static void ImplCallEventListeners( VclSimpleEvent* pEvent );
+ static void ImplCallEventListeners( VclSimpleEvent& rEvent );
/** Handle keypress event
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 63be0ac..13eb1db 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -800,7 +800,7 @@ protected:
void SetCompoundControl( bool bCompound );
void CallEventListeners( sal_uLong nEvent, void* pData = NULL );
- static void FireVclEvent( VclSimpleEvent* pEvent );
+ static void FireVclEvent( VclSimpleEvent& rEvent );
virtual bool AcquireGraphics() const SAL_OVERRIDE;
virtual void ReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index b917770..4fae698 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -779,7 +779,7 @@ void ScMenuFloatingWindow::fireMenuHighlightedEvent()
return;
VclAccessibleEvent aEvent(VCLEVENT_MENU_HIGHLIGHT, xAccMenu);
- FireVclEvent(&aEvent);
+ FireVclEvent(aEvent);
}
void ScMenuFloatingWindow::setSubMenuFocused(ScMenuFloatingWindow* pSubMenu)
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 8f56172..0295b91 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -665,12 +665,12 @@ void Application::ImplCallEventListeners( sal_uLong nEvent, vcl::Window *pWin, v
pSVData->maAppData.mpEventListeners->Call( &aEvent );
}
-void Application::ImplCallEventListeners( VclSimpleEvent* pEvent )
+void Application::ImplCallEventListeners( VclSimpleEvent& rEvent )
{
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maAppData.mpEventListeners )
- pSVData->maAppData.mpEventListeners->Call( pEvent );
+ pSVData->maAppData.mpEventListeners->Call( &rEvent );
}
void Application::AddEventListener( const Link<>& rEventListener )
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 8fcc65b..d2ac5b7 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -206,7 +206,7 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData )
ImplDelData aDelData;
ImplAddDel( &aDelData );
- Application::ImplCallEventListeners( &aEvent );
+ Application::ImplCallEventListeners( aEvent );
if ( aDelData.IsDead() )
return;
@@ -237,9 +237,9 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData )
}
}
-void Window::FireVclEvent( VclSimpleEvent* pEvent )
+void Window::FireVclEvent( VclSimpleEvent& rEvent )
{
- Application::ImplCallEventListeners(pEvent);
+ Application::ImplCallEventListeners(rEvent);
}
void Window::AddEventListener( const Link<>& rEventListener )
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 98d9740..e627377 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -336,7 +336,7 @@ void Menu::ImplCallEventListeners( sal_uLong nEvent, sal_uInt16 nPos )
// This is needed by atk accessibility bridge
if ( nEvent == VCLEVENT_MENU_HIGHLIGHT )
{
- Application::ImplCallEventListeners( &aEvent );
+ Application::ImplCallEventListeners( aEvent );
}
if ( !aDelData.isDeleted() )
commit bcb5756cb0997923ea565459440767e22ce34e7d
Author: Noel Grandin <noel at peralex.com>
Date: Fri Sep 11 09:21:55 2015 +0200
list->vector
since we are copying these before iterating over them, we don't need the
iterator guarantees of std::list
Change-Id: I9cb2048e1527f37104c3077e69b5f3b827f08c7b
diff --git a/include/vcl/vclevent.hxx b/include/vcl/vclevent.hxx
index 982958c..f9e8b51 100644
--- a/include/vcl/vclevent.hxx
+++ b/include/vcl/vclevent.hxx
@@ -259,7 +259,7 @@ public:
void addListener( const Link<>& rListener );
void removeListener( const Link<>& rListener );
private:
- std::list<Link<>> m_aListeners;
+ std::vector<Link<>> m_aListeners;
};
class VCL_DLLPUBLIC VclEventListeners2 : public vcl::DeletionNotifier
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index bb22ad6..0d8e02c 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -101,7 +101,7 @@ public:
virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) SAL_OVERRIDE;
};
-typedef std::list<Link<VclWindowEvent&,bool> > SVAppKeyListeners;
+typedef std::vector<Link<VclWindowEvent&,bool> > SVAppKeyListeners;
struct ImplSVAppData
{
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 789da50..8f56172 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -700,7 +700,10 @@ void Application::RemoveKeyListener( const Link<VclWindowEvent&,bool>& rKeyListe
{
ImplSVData* pSVData = ImplGetSVData();
if( pSVData->maAppData.mpKeyListeners )
- pSVData->maAppData.mpKeyListeners->remove( rKeyListener );
+ {
+ auto pVec = pSVData->maAppData.mpKeyListeners;
+ pVec->erase( std::remove(pVec->begin(), pVec->end(), rKeyListener ), pVec->end() );
+ }
}
bool Application::HandleKey( sal_uLong nEvent, vcl::Window *pWin, KeyEvent* pKeyEvent )
@@ -718,7 +721,7 @@ bool Application::HandleKey( sal_uLong nEvent, vcl::Window *pWin, KeyEvent* pKey
bool bProcessed = false;
// Copy the list, because this can be destroyed when calling a Link...
- std::list<Link<VclWindowEvent&,bool>> aCopy( *pSVData->maAppData.mpKeyListeners );
+ std::vector<Link<VclWindowEvent&,bool>> aCopy( *pSVData->maAppData.mpKeyListeners );
for ( Link<VclWindowEvent&,bool>& rLink : aCopy )
{
if( rLink.Call( aEvent ) )
diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index 00a016d..bc3ca53 100644
--- a/vcl/source/app/vclevent.cxx
+++ b/vcl/source/app/vclevent.cxx
@@ -48,9 +48,9 @@ void VclEventListeners::Call( VclSimpleEvent* pEvent ) const
return;
// Copy the list, because this can be destroyed when calling a Link...
- std::list<Link<>> aCopy( m_aListeners );
- std::list<Link<>>::iterator aIter( aCopy.begin() );
- std::list<Link<>>::const_iterator aEnd( aCopy.end() );
+ std::vector<Link<>> aCopy( m_aListeners );
+ std::vector<Link<>>::iterator aIter( aCopy.begin() );
+ std::vector<Link<>>::const_iterator aEnd( aCopy.end() );
if( pEvent->IsA( VclWindowEvent::StaticType() ) )
{
VclWindowEvent* pWinEvent = static_cast<VclWindowEvent*>(pEvent);
@@ -83,7 +83,7 @@ void VclEventListeners::addListener( const Link<>& rListener )
void VclEventListeners::removeListener( const Link<>& rListener )
{
- m_aListeners.remove( rListener );
+ m_aListeners.erase( std::remove(m_aListeners.begin(), m_aListeners.end(), rListener ), m_aListeners.end() );
}
VclEventListeners2::VclEventListeners2()
More information about the Libreoffice-commits
mailing list