diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-10 14:39:17 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-11 08:48:54 +0200 |
commit | cf0c04a428754dfd5aa477cebc5441bc74e27005 (patch) | |
tree | 6d4657ec370a3378887745b34d217a91bdab2eef /dbaccess | |
parent | e8ee8473361f09034fdcd4f30a2325a53a512a7a (diff) |
convert Link<> to typed
Change-Id: I85658fa35b9b85106a3b9c8ef303584cad6f39b0
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/app/AppDetailPageHelper.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppDetailPageHelper.hxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/control/dbtreelistbox.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/CollectionView.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/adtabdlg.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/CollectionView.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/TableWindowListBox.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/adtabdlg.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/TableWindowListBox.cxx | 4 |
9 files changed, 20 insertions, 16 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index c935867d9ddc..d2c2585587f4 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -756,7 +756,7 @@ DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, cons _pTreeView->SetDefaultExpandedEntryBmp( _rImage ); _pTreeView->SetDoubleClickHdl(LINK(this, OAppDetailPageHelper, OnEntryDoubleClick)); - _pTreeView->SetEnterKeyHdl(LINK(this, OAppDetailPageHelper, OnEntryDoubleClick)); + _pTreeView->SetEnterKeyHdl(LINK(this, OAppDetailPageHelper, OnEntryEnterKey)); _pTreeView->SetSelChangeHdl(LINK(this, OAppDetailPageHelper, OnEntrySelChange)); _pTreeView->setCutHandler(LINK(this, OAppDetailPageHelper, OnCutEntry)); @@ -904,11 +904,15 @@ void OAppDetailPageHelper::elementRemoved( ElementType _eType,const OUString& _r } } -IMPL_LINK(OAppDetailPageHelper, OnEntryDoubleClick, SvTreeListBox*, _pTree) +IMPL_LINK(OAppDetailPageHelper, OnEntryEnterKey, void*, _pTree) +{ + return OnEntryDoubleClick(static_cast<SvTreeListBox*>(_pTree)) ? 0 : 1; +} +IMPL_LINK_TYPED(OAppDetailPageHelper, OnEntryDoubleClick, SvTreeListBox*, _pTree, bool) { OSL_ENSURE( _pTree, "OAppDetailPageHelper, OnEntryDoubleClick: invalid callback!" ); bool bHandled = ( _pTree != NULL ) && getBorderWin().getView()->getAppController().onEntryDoubleClick( *_pTree ); - return bHandled ? 1L : 0L; + return bHandled; } IMPL_LINK_NOARG(OAppDetailPageHelper, OnEntrySelChange) diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index 6876f32490bb..ab2331658348 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -151,7 +151,8 @@ namespace dbaui */ DBTreeListBox* createSimpleTree( const OString& _sHelpId, const Image& _rImage); - DECL_LINK( OnEntryDoubleClick, SvTreeListBox* ); + DECL_LINK_TYPED( OnEntryDoubleClick, SvTreeListBox*, bool ); + DECL_LINK( OnEntryEnterKey, void* ); DECL_LINK( OnEntrySelChange, void* ); DECL_LINK( OnCutEntry, void* ); diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 4e264008184d..e395da6176b2 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -400,9 +400,8 @@ bool DBTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewTe bool DBTreeListBox::DoubleClickHdl() { - long nResult = aDoubleClickHdl.Call( this ); // continue default processing if the DoubleClickHandler didn't handle it - return nResult == 0; + return aDoubleClickHdl.Call( this ); } void scrollWindow(DBTreeListBox* _pListBox, const Point& _rPos,bool _bUp) diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx index 57d42019cd78..256515258bac 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -236,7 +236,7 @@ IMPL_LINK_NOARG_TYPED(OCollectionView, Up_Click, Button*, void) } } -IMPL_LINK_NOARG(OCollectionView, Dbl_Click_FileView) +IMPL_LINK_NOARG_TYPED(OCollectionView, Dbl_Click_FileView, SvTreeListBox*, bool) { try { @@ -264,7 +264,7 @@ IMPL_LINK_NOARG(OCollectionView, Dbl_Click_FileView) { DBG_UNHANDLED_EXCEPTION(); } - return 0; + return false; } void OCollectionView::initCurrentPath() diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index 8b0e43725597..d4dddc19c449 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -422,17 +422,17 @@ IMPL_LINK_NOARG_TYPED( OAddTableDlg, AddClickHdl, Button*, void ) TableListDoubleClickHdl(NULL); } -IMPL_LINK_NOARG( OAddTableDlg, TableListDoubleClickHdl ) +IMPL_LINK_NOARG_TYPED( OAddTableDlg, TableListDoubleClickHdl, SvTreeListBox*, bool ) { if ( impl_isAddAllowed() ) { impl_addTable(); if ( !impl_isAddAllowed() ) Close(); - return 1L; // handled + return true; // handled } - return 0L; // not handled + return false; // not handled } IMPL_LINK_NOARG_TYPED( OAddTableDlg, TableListSelectHdl, SvTreeListBox*, void ) diff --git a/dbaccess/source/ui/inc/CollectionView.hxx b/dbaccess/source/ui/inc/CollectionView.hxx index e90bd5d8ef29..c62020bd8fd4 100644 --- a/dbaccess/source/ui/inc/CollectionView.hxx +++ b/dbaccess/source/ui/inc/CollectionView.hxx @@ -47,7 +47,7 @@ namespace dbaui DECL_LINK_TYPED(Up_Click, Button*, void); DECL_LINK_TYPED(NewFolder_Click, Button*, void); DECL_LINK_TYPED(Save_Click, Button*, void); - DECL_LINK(Dbl_Click_FileView,void*); + DECL_LINK_TYPED(Dbl_Click_FileView, SvTreeListBox*, bool); /// sets the fixedtext to the right content void initCurrentPath(); diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx b/dbaccess/source/ui/inc/TableWindowListBox.hxx index 7b590cf38270..2bca53be2179 100644 --- a/dbaccess/source/ui/inc/TableWindowListBox.hxx +++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx @@ -47,7 +47,7 @@ namespace dbaui :public SvTreeListBox ,public IDragTransferableListener { - DECL_LINK( OnDoubleClick, SvTreeListBox* ); + DECL_LINK_TYPED( OnDoubleClick, SvTreeListBox*, bool ); DECL_LINK_TYPED( ScrollUpHdl, Timer*, void ); DECL_LINK_TYPED( ScrollDownHdl, Timer*, void ); DECL_LINK_TYPED( DropHdl, void*, void ); diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx b/dbaccess/source/ui/inc/adtabdlg.hxx index e265bbce3674..bd14dee9756d 100644 --- a/dbaccess/source/ui/inc/adtabdlg.hxx +++ b/dbaccess/source/ui/inc/adtabdlg.hxx @@ -72,7 +72,7 @@ namespace dbaui DECL_LINK_TYPED( AddClickHdl, Button*, void ); DECL_LINK_TYPED( CloseClickHdl, Button*, void); - DECL_LINK( TableListDoubleClickHdl, void* ); + DECL_LINK_TYPED( TableListDoubleClickHdl, SvTreeListBox*, bool ); DECL_LINK_TYPED( TableListSelectHdl, SvTreeListBox*, void ); DECL_LINK_TYPED( OnTypeSelected, Button*, void ); diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index b56469e24d4b..76ed893dd1b5 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -342,7 +342,7 @@ void OTableWindowListBox::GetFocus() SvTreeListBox::GetFocus(); } -IMPL_LINK( OTableWindowListBox, OnDoubleClick, SvTreeListBox *, /*pBox*/ ) +IMPL_LINK_NOARG_TYPED( OTableWindowListBox, OnDoubleClick, SvTreeListBox *, bool ) { // tell my parent vcl::Window* pParent = Window::GetParent(); @@ -350,7 +350,7 @@ IMPL_LINK( OTableWindowListBox, OnDoubleClick, SvTreeListBox *, /*pBox*/ ) static_cast<OTableWindow*>(pParent)->OnEntryDoubleClicked(GetHdlEntry()); - return 0; + return false; } void OTableWindowListBox::Command(const CommandEvent& rEvt) |