diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-19 09:11:34 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-26 11:15:35 +0200 |
commit | 167bc621ef825ed5b961502fe9324a675ee34e42 (patch) | |
tree | 523838d8adc14a62f846529ee6eab3343b2fe87b /reportdesign | |
parent | 46a27805fb707544a844a961a3743b8b992282f0 (diff) |
Convert vcl Button Link<> click handler to typed Link<Button*,void>
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/dlg/AddField.cxx | 7 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Condition.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Condition.hxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/DateTime.cxx | 11 | ||||
-rw-r--r-- | reportdesign/source/ui/inc/AddField.hxx | 3 | ||||
-rw-r--r-- | reportdesign/source/ui/inc/DateTime.hxx | 2 |
6 files changed, 17 insertions, 16 deletions
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index 7fcf3598927e..2fceb7b71335 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -187,7 +187,7 @@ OAddFieldWindow::OAddFieldWindow(vcl::Window* pParent m_pListBox->Show(); const OUString sTitle(ModuleRes(RID_STR_INSERT)); m_aInsertButton->SetText(sTitle); - m_aInsertButton->SetClickHdl(LINK( this, OAddFieldWindow, OnDoubleClickHdl ) ); + m_aInsertButton->SetClickHdl(LINK( this, OAddFieldWindow, OnClickHdl ) ); m_aInsertButton->Show(); m_aFixedLine->SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor() ); @@ -501,6 +501,11 @@ IMPL_LINK_NOARG( OAddFieldWindow, OnSelectHdl ) return 0L; } +IMPL_LINK_NOARG_TYPED( OAddFieldWindow, OnClickHdl, Button*, void ) +{ + OnDoubleClickHdl(NULL); +} + IMPL_LINK_NOARG( OAddFieldWindow, OnDoubleClickHdl ) { if ( m_aCreateLink.IsSet() ) diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index 0339327b5b70..d5b04a130688 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -67,7 +67,7 @@ ConditionField::ConditionField(Condition* pParent, Edit* pSubEdit, PushButton *p m_pFormula->SetClickHdl( LINK( this, ConditionField, OnFormula ) ); } -IMPL_LINK( ConditionField, OnFormula, Button*, _pClickedButton ) +IMPL_LINK_TYPED( ConditionField, OnFormula, Button*, _pClickedButton, void ) { OUString sFormula(m_pSubEdit->GetText()); const sal_Int32 nLen = sFormula.getLength(); @@ -83,7 +83,6 @@ IMPL_LINK( ConditionField, OnFormula, Button*, _pClickedButton ) ReportFormula aFormula( sFormula ); m_pSubEdit->SetText(aFormula.getUndecoratedContent()); } - return 0L; } // class SvxColorWindow_Impl -------------------------------------------------- @@ -363,7 +362,7 @@ IMPL_LINK_NOARG_TYPED( Condition, OnFormatAction, ToolBox*, void ) ApplyCommand(mapToolbarItemToSlotId(m_pActions->GetCurItemId()),aCol); } -IMPL_LINK( Condition, OnConditionAction, Button*, _pClickedButton ) +IMPL_LINK_TYPED( Condition, OnConditionAction, Button*, _pClickedButton, void ) { if ( _pClickedButton == m_pMoveUp ) m_rAction.moveConditionUp( getConditionIndex() ); @@ -373,7 +372,6 @@ IMPL_LINK( Condition, OnConditionAction, Button*, _pClickedButton ) m_rAction.addCondition( getConditionIndex() ); else if ( _pClickedButton == m_pRemoveCondition ) m_rAction.deleteCondition( getConditionIndex() ); - return 0L; } void Condition::ApplyCommand( sal_uInt16 _nCommandId, const ::Color& _rColor) diff --git a/reportdesign/source/ui/dlg/Condition.hxx b/reportdesign/source/ui/dlg/Condition.hxx index bd2f64036b88..294fd18d1799 100644 --- a/reportdesign/source/ui/dlg/Condition.hxx +++ b/reportdesign/source/ui/dlg/Condition.hxx @@ -53,7 +53,7 @@ namespace rptui VclPtr<Edit> m_pSubEdit; VclPtr<PushButton> m_pFormula; - DECL_LINK( OnFormula, Button* ); + DECL_LINK_TYPED( OnFormula, Button*, void ); public: ConditionField(Condition* pParent, Edit* pSubEdit, PushButton *pFormula); void GrabFocus() { m_pSubEdit->GrabFocus(); } @@ -102,7 +102,7 @@ namespace rptui DECL_LINK_TYPED( OnFormatAction, ToolBox*, void ); DECL_LINK_TYPED( DropdownClick, ToolBox*, void ); - DECL_LINK( OnConditionAction, Button* ); + DECL_LINK_TYPED( OnConditionAction, Button*, void ); public: Condition( vcl::Window* _pParent, IConditionalFormatAction& _rAction, ::rptui::OReportController& _rController ); diff --git a/reportdesign/source/ui/dlg/DateTime.cxx b/reportdesign/source/ui/dlg/DateTime.cxx index caad1e3bf1aa..e4a6ba0689fe 100644 --- a/reportdesign/source/ui/dlg/DateTime.cxx +++ b/reportdesign/source/ui/dlg/DateTime.cxx @@ -205,13 +205,11 @@ OUString ODateTimeDialog::getFormatStringByKey(::sal_Int32 _nNumberFormatKey,con return xPreviewer->convertNumberToPreviewString(sFormat,nValue,m_nLocale,sal_True); } -IMPL_LINK( ODateTimeDialog, CBClickHdl, CheckBox*, _pBox ) +IMPL_LINK_TYPED( ODateTimeDialog, CBClickHdl, Button*, _pBox, void ) { - (void)_pBox; - - if ( _pBox == m_pDate || _pBox == m_pTime) - { - bool bDate = m_pDate->IsChecked(); + if ( _pBox == m_pDate || _pBox == m_pTime) + { + bool bDate = m_pDate->IsChecked(); bool bTime = m_pTime->IsChecked(); if (!bDate && !bTime) { @@ -222,7 +220,6 @@ IMPL_LINK( ODateTimeDialog, CBClickHdl, CheckBox*, _pBox ) m_pPB_OK->Enable(); } } - return 1L; } sal_Int32 ODateTimeDialog::getFormatKey(bool _bDate) const diff --git a/reportdesign/source/ui/inc/AddField.hxx b/reportdesign/source/ui/inc/AddField.hxx index 4fab22fc611c..aeb046382bd4 100644 --- a/reportdesign/source/ui/inc/AddField.hxx +++ b/reportdesign/source/ui/inc/AddField.hxx @@ -69,7 +69,8 @@ class OAddFieldWindow :public FloatingWindow ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pChangeListener; ::rtl::Reference< comphelper::OContainerListenerAdapter> m_pContainerListener; - DECL_LINK( OnDoubleClickHdl, void* ); + DECL_LINK_TYPED( OnClickHdl, Button*, void ); + DECL_LINK( OnDoubleClickHdl, void* ); DECL_LINK( OnSelectHdl, void* ); DECL_LINK_TYPED( OnSortAction, ToolBox*, void ); diff --git a/reportdesign/source/ui/inc/DateTime.hxx b/reportdesign/source/ui/inc/DateTime.hxx index 56c2a1a22eb1..84e3127f8784 100644 --- a/reportdesign/source/ui/inc/DateTime.hxx +++ b/reportdesign/source/ui/inc/DateTime.hxx @@ -70,7 +70,7 @@ class ODateTimeDialog : public ModalDialog */ sal_Int32 getFormatKey(bool _bDate) const; - DECL_LINK( CBClickHdl, CheckBox* ); + DECL_LINK_TYPED( CBClickHdl, Button*, void ); ODateTimeDialog(const ODateTimeDialog&) SAL_DELETED_FUNCTION; void operator =(const ODateTimeDialog&) SAL_DELETED_FUNCTION; |