diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-27 13:08:02 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-28 09:49:56 +0200 |
commit | bd8b93fdff93ff7b2b7e493a7bcef6a59f299dae (patch) | |
tree | f05be9665737f0667faf95702d96fbf3f0a103c5 /sc | |
parent | 1b9c3a17e8496aedfb80528c5275e6658154789d (diff) |
make PostUserEvent Link<> typed
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fupoor.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/inc/condformatdlg.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/content.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/fupoor.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/preview.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/tphf.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/navipi/content.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/pagedlg/tphf.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaeventshelper.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh2.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/preview.cxx | 3 |
12 files changed, 24 insertions, 30 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 66b3bf589a8a..4a18293ccc03 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -297,8 +297,9 @@ IMPL_LINK(ScCondFormatList, TypeListHdl, ListBox*, pBox) return 0; } -IMPL_LINK(ScCondFormatList, AfterTypeListHdl, ListBox*, pBox) +IMPL_LINK_TYPED(ScCondFormatList, AfterTypeListHdl, void*, p, void) { + ListBox* pBox = static_cast<ListBox*>(p); EntryContainer::iterator itr = maEntries.begin(); for(; itr != maEntries.end(); ++itr) { @@ -306,7 +307,7 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, ListBox*, pBox) break; } if(itr == maEntries.end()) - return 0;; + return; sal_Int32 nPos = pBox->GetSelectEntryPos(); switch(nPos) @@ -322,7 +323,7 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, ListBox*, pBox) case condformat::entry::COLORSCALE3: case condformat::entry::DATABAR: case condformat::entry::ICONSET: - return 0; + return; } itr->disposeAndClear(); *itr = VclPtr<ScColorScale3FrmtEntry>::Create(this, mpDoc, maPos); @@ -331,7 +332,7 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, ListBox*, pBox) break; case 1: if((*itr)->GetType() == condformat::entry::CONDITION) - return 0; + return; itr->disposeAndClear(); *itr = VclPtr<ScConditionFrmtEntry>::Create(this, mpDoc, mpDialogParent, maPos); @@ -340,7 +341,7 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, ListBox*, pBox) break; case 2: if((*itr)->GetType() == condformat::entry::FORMULA) - return 0; + return; itr->disposeAndClear(); *itr = VclPtr<ScFormulaFrmtEntry>::Create(this, mpDoc, mpDialogParent, maPos); @@ -349,7 +350,7 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, ListBox*, pBox) break; case 3: if((*itr)->GetType() == condformat::entry::DATE) - return 0; + return; itr->disposeAndClear(); *itr = VclPtr<ScDateFrmtEntry>::Create( this, mpDoc ); @@ -359,7 +360,6 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, ListBox*, pBox) } RecalcAll(); - return 0; } IMPL_LINK_NOARG_TYPED( ScCondFormatList, AddBtnHdl, Button*, void ) diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx index b9e4eae8a67b..d0e5d0c76a60 100644 --- a/sc/source/ui/drawfunc/fupoor.cxx +++ b/sc/source/ui/drawfunc/fupoor.cxx @@ -211,7 +211,7 @@ IMPL_LINK_NOARG_TYPED(FuPoor, DragTimerHdl, Timer *, void) Application::PostUserEvent( LINK( this, FuPoor, DragHdl ) ); } -IMPL_LINK_NOARG(FuPoor, DragHdl) +IMPL_LINK_NOARG_TYPED(FuPoor, DragHdl, void*, void) { SdrHdl* pHdl = pView->PickHandle(aMDPos); @@ -221,7 +221,6 @@ IMPL_LINK_NOARG(FuPoor, DragHdl) bIsInDragMode = true; pViewShell->GetScDrawView()->BeginDrag(pWindow, aMDPos); } - return 0; } // Detektiv-Linie diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index 5a6faed4f9da..75c211cafe38 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -92,7 +92,7 @@ public: DECL_LINK( EntrySelectHdl, ScCondFrmtEntry* ); DECL_LINK( TypeListHdl, ListBox*); - DECL_LINK( AfterTypeListHdl, ListBox*); + DECL_LINK_TYPED( AfterTypeListHdl, void*, void); DECL_LINK( ColFormatTypeHdl, ListBox*); }; diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx index 2f482a3fd16b..ecd4f0c53feb 100644 --- a/sc/source/ui/inc/content.hxx +++ b/sc/source/ui/inc/content.hxx @@ -103,7 +103,7 @@ class ScContentTree : public SvTreeListBox ScDocument* GetSourceDocument(); DECL_LINK( ContentDoubleClickHdl, void* ); - DECL_LINK( ExecDragHdl, void* ); + DECL_LINK_TYPED( ExecDragHdl, void*, void ); public: SvTreeListEntry* pTmpEntry; bool m_bFirstPaint; diff --git a/sc/source/ui/inc/fupoor.hxx b/sc/source/ui/inc/fupoor.hxx index 6ea7f7602a4e..d54d0cc45e14 100644 --- a/sc/source/ui/inc/fupoor.hxx +++ b/sc/source/ui/inc/fupoor.hxx @@ -55,7 +55,7 @@ protected: Timer aDragTimer; // for Drag&Drop DECL_LINK_TYPED( DragTimerHdl, Timer *, void ); - DECL_LINK( DragHdl, void * ); + DECL_LINK_TYPED( DragHdl, void *, void ); bool bIsInDragMode; Point aMDPos; // Position of MouseButtonDown diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx index a4ca81b9d3aa..a83d2a7a79bd 100644 --- a/sc/source/ui/inc/preview.hxx +++ b/sc/source/ui/inc/preview.hxx @@ -154,7 +154,7 @@ public: void CalcAll() { CalcPages(); } void SetInGetState(bool bSet) { bInGetState = bSet; } - DECL_STATIC_LINK( ScPreview, InvalidateHdl, void* ); + DECL_STATIC_LINK_TYPED( ScPreview, InvalidateHdl, void*, void ); static void StaticInvalidate(); FmFormView* GetDrawView() { return pDrawView; } diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx index 9933947fb837..f32ce4a9fe1a 100644 --- a/sc/source/ui/inc/tphf.hxx +++ b/sc/source/ui/inc/tphf.hxx @@ -53,9 +53,9 @@ private: sal_uInt16 nPageUsage; VclPtr<ScStyleDlg> pStyleDlg; - DECL_LINK_TYPED(BtnHdl, Button*, void); - DECL_LINK( HFEditHdl, void* ); - DECL_LINK_TYPED(TurnOnHdl, Button*, void); + DECL_LINK_TYPED( BtnHdl, Button*, void ); + DECL_LINK_TYPED( HFEditHdl, void*, void ); + DECL_LINK_TYPED( TurnOnHdl, Button*, void ); }; class ScHeaderPage : public ScHFPage diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 204e312b75be..a85e24073453 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -1448,13 +1448,12 @@ void ScContentTree::DoDrag() delete pDocLoader; // falls Dokument zum Draggen geladen wurde } -IMPL_LINK_NOARG(ScContentTree, ExecDragHdl) +IMPL_LINK_NOARG_TYPED(ScContentTree, ExecDragHdl, void*, void) { // als Link, damit asynchron ohne ImpMouseMoveMsg auf dem Stack auch der // Navigator geloescht werden darf DoDrag(); - return 0; } bool ScContentTree::LoadFile( const OUString& rUrl ) diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx index c091636f4847..f629e8bc5bc9 100644 --- a/sc/source/ui/pagedlg/tphf.cxx +++ b/sc/source/ui/pagedlg/tphf.cxx @@ -166,14 +166,14 @@ IMPL_LINK_NOARG_TYPED(ScHFPage, BtnHdl, Button*, void) Application::PostUserEvent( LINK( this, ScHFPage, HFEditHdl ), NULL, true ); } -IMPL_LINK_NOARG(ScHFPage, HFEditHdl) +IMPL_LINK_NOARG_TYPED(ScHFPage, HFEditHdl, void*, void) { SfxViewShell* pViewSh = SfxViewShell::Current(); if ( !pViewSh ) { OSL_FAIL( "Current ViewShell not found." ); - return 0; + return; } if ( m_pCntSharedBox->IsEnabled() @@ -233,8 +233,6 @@ IMPL_LINK_NOARG(ScHFPage, HFEditHdl) aDataSet.Put( *pDlg->GetOutputItemSet() ); } } - - return 0; } // class ScHeaderPage diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx index 94fa0d5b67f5..d49cc688eed9 100644 --- a/sc/source/ui/vba/vbaeventshelper.cxx +++ b/sc/source/ui/vba/vbaeventshelper.cxx @@ -160,7 +160,7 @@ private: /** Posts a Workbook_WindowResize user event. */ void postWindowResizeEvent( vcl::Window* pWindow ); /** Callback link for Application::PostUserEvent(). */ - DECL_LINK( processWindowResizeEvent, vcl::Window* ); + DECL_LINK_TYPED( processWindowResizeEvent, void*, void ); private: typedef ::std::map< VclPtr<vcl::Window>, uno::Reference< frame::XController > > WindowControllerMap; @@ -477,8 +477,9 @@ void ScVbaEventListener::postWindowResizeEvent( vcl::Window* pWindow ) } } -IMPL_LINK( ScVbaEventListener, processWindowResizeEvent, vcl::Window*, pWindow ) +IMPL_LINK_TYPED( ScVbaEventListener, processWindowResizeEvent, void*, p, void ) { + vcl::Window* pWindow = static_cast<vcl::Window*>(p); ::osl::MutexGuard aGuard( maMutex ); /* Check that the passed window is still alive (it must be registered in @@ -507,7 +508,6 @@ IMPL_LINK( ScVbaEventListener, processWindowResizeEvent, vcl::Window*, pWindow ) } maPostedWindows.erase(pWindow); release(); - return 0; } ScVbaEventsHelper::ScVbaEventsHelper( const uno::Sequence< uno::Any >& rArgs, const uno::Reference< uno::XComponentContext >& xContext ) : diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index d16b70dab1ed..e106cb3cd823 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -187,10 +187,9 @@ static bool lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam ) //after end execute from !IsModalInputMode, it is safer to delay deleting namespace { - sal_IntPtr DelayDeleteAbstractDialog( void *pAbstractDialog, void * /*pArg*/ ) + void DelayDeleteAbstractDialog( void *pAbstractDialog, void * /*pArg*/ ) { delete static_cast<SfxAbstractTabDialog*>( pAbstractDialog ); - return 0; } } @@ -947,7 +946,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) } //after end execute from !IsModalInputMode, it is safer to delay deleting //delete pDlg; - Application::PostUserEvent( Link<>( pDlg, &DelayDeleteAbstractDialog ) ); + Application::PostUserEvent( Link<void*,void>( pDlg, &DelayDeleteAbstractDialog ) ); } } break; diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 470634229483..666abee73ca2 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -927,10 +927,9 @@ void ScPreview::StaticInvalidate() rBindings.Invalidate(SID_ATTR_ZOOMSLIDER); } -IMPL_STATIC_LINK_NOARG( ScPreview, InvalidateHdl ) +IMPL_STATIC_LINK_NOARG_TYPED( ScPreview, InvalidateHdl, void*, void ) { StaticInvalidate(); - return 0; } void ScPreview::DataChanged( const DataChangedEvent& rDCEvt ) |