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 /sw | |
parent | 1b9c3a17e8496aedfb80528c5275e6658154789d (diff) |
make PostUserEvent Link<> typed
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
Diffstat (limited to 'sw')
23 files changed, 129 insertions, 147 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index d31e4d71ae04..0172fac75359 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -171,120 +171,120 @@ class SwPostItMgr: public SfxListener const Rectangle& rBorder, long lNeededHeight); void CheckForRemovedPostIts(); - bool ArrowEnabled(sal_uInt16 aDirection,unsigned long aPage) const; - bool BorderOverPageBorder(unsigned long aPage) const; - bool HasScrollbars() const; + bool ArrowEnabled(sal_uInt16 aDirection,unsigned long aPage) const; + bool BorderOverPageBorder(unsigned long aPage) const; + bool HasScrollbars() const; void Focus(SfxBroadcaster& rBC); - sal_Int32 GetInitialAnchorDistance() const; - sal_Int32 GetScrollSize() const; - sal_Int32 GetSpaceBetween() const; + sal_Int32 GetInitialAnchorDistance() const; + sal_Int32 GetScrollSize() const; + sal_Int32 GetSpaceBetween() const; void SetReadOnlyState(); - DECL_LINK( CalcHdl, void*); + DECL_LINK_TYPED( CalcHdl, void*, void); sw::sidebarwindows::SwSidebarWin* GetSidebarWin(const SfxBroadcaster* pBroadcaster) const; - void InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus); - void RemoveItem( SfxBroadcaster* pBroadcast ); + void InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus); + void RemoveItem( SfxBroadcaster* pBroadcast ); - void Sort(); + void Sort(); public: - SwPostItMgr(SwView* aDoc); - virtual ~SwPostItMgr(); + SwPostItMgr(SwView* aDoc); + virtual ~SwPostItMgr(); - typedef std::list< SwSidebarItem* >::const_iterator const_iterator; - const_iterator begin() const { return mvPostItFields.begin(); } - const_iterator end() const { return mvPostItFields.end(); } + typedef std::list< SwSidebarItem* >::const_iterator const_iterator; + const_iterator begin() const { return mvPostItFields.begin(); } + const_iterator end() const { return mvPostItFields.end(); } - void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; + void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; - void LayoutPostIts(); - bool CalcRects(); + void LayoutPostIts(); + bool CalcRects(); - void MakeVisible( const sw::sidebarwindows::SwSidebarWin* pPostIt, - long aPage = -1); + void MakeVisible( const sw::sidebarwindows::SwSidebarWin* pPostIt, + long aPage = -1); - bool ShowScrollbar(const unsigned long aPage) const; - bool HasNotes() const ; - bool ShowNotes() const; - bool IsShowAnchor() { return mbIsShowAnchor;} - unsigned long GetSidebarWidth(bool bPx = false) const; - unsigned long GetSidebarBorderWidth(bool bPx = false) const; - unsigned long GetNoteWidth(); + bool ShowScrollbar(const unsigned long aPage) const; + bool HasNotes() const ; + bool ShowNotes() const; + bool IsShowAnchor() { return mbIsShowAnchor;} + unsigned long GetSidebarWidth(bool bPx = false) const; + unsigned long GetSidebarBorderWidth(bool bPx = false) const; + unsigned long GetNoteWidth(); - void PrepareView(bool bIgnoreCount = false); + void PrepareView(bool bIgnoreCount = false); - void CorrectPositions(); + void CorrectPositions(); - void SetLayout() { mbLayout = true; }; - void Delete(const OUString& aAuthor); - void Delete(); + void SetLayout() { mbLayout = true; }; + void Delete(const OUString& aAuthor); + void Delete(); - void ExecuteFormatAllDialog(SwView& rView); - void FormatAll(const SfxItemSet &rNewAttr); + void ExecuteFormatAllDialog(SwView& rView); + void FormatAll(const SfxItemSet &rNewAttr); - void Hide( const OUString& rAuthor ); - void Hide(); - void Show(); + void Hide( const OUString& rAuthor ); + void Hide(); + void Show(); - void Rescale(); + void Rescale(); - Rectangle GetBottomScrollRect(const unsigned long aPage) const; - Rectangle GetTopScrollRect(const unsigned long aPage) const; + Rectangle GetBottomScrollRect(const unsigned long aPage) const; + Rectangle GetTopScrollRect(const unsigned long aPage) const; - bool IsHit(const Point &aPointPixel); - Color GetArrowColor(sal_uInt16 aDirection,unsigned long aPage) const; + bool IsHit(const Point &aPointPixel); + Color GetArrowColor(sal_uInt16 aDirection,unsigned long aPage) const; - sw::annotation::SwAnnotationWin* GetAnnotationWin(const SwPostItField* pField) const; + sw::annotation::SwAnnotationWin* GetAnnotationWin(const SwPostItField* pField) const; - sw::sidebarwindows::SwSidebarWin* GetNextPostIt( sal_uInt16 aDirection, - sw::sidebarwindows::SwSidebarWin* aPostIt); - long GetNextBorder(); + sw::sidebarwindows::SwSidebarWin* GetNextPostIt( sal_uInt16 aDirection, + sw::sidebarwindows::SwSidebarWin* aPostIt); + long GetNextBorder(); - sw::sidebarwindows::SwSidebarWin* GetActiveSidebarWin() { return mpActivePostIt; } - void SetActiveSidebarWin( sw::sidebarwindows::SwSidebarWin* p); - bool HasActiveSidebarWin() const; - bool HasActiveAnnotationWin() const; - void GrabFocusOnActiveSidebarWin(); - void UpdateDataOnActiveSidebarWin(); - void DeleteActiveSidebarWin(); - void HideActiveSidebarWin(); - void ToggleInsModeOnActiveSidebarWin(); + sw::sidebarwindows::SwSidebarWin* GetActiveSidebarWin() { return mpActivePostIt; } + void SetActiveSidebarWin( sw::sidebarwindows::SwSidebarWin* p); + bool HasActiveSidebarWin() const; + bool HasActiveAnnotationWin() const; + void GrabFocusOnActiveSidebarWin(); + void UpdateDataOnActiveSidebarWin(); + void DeleteActiveSidebarWin(); + void HideActiveSidebarWin(); + void ToggleInsModeOnActiveSidebarWin(); - sal_Int32 GetMinimumSizeWithMeta() const; - sal_Int32 GetSidebarScrollerHeight() const; + sal_Int32 GetMinimumSizeWithMeta() const; + sal_Int32 GetSidebarScrollerHeight() const; - void SetShadowState(const SwPostItField* pField,bool bCursor = true); + void SetShadowState(const SwPostItField* pField,bool bCursor = true); - void SetSpellChecking(); + void SetSpellChecking(); - static Color GetColorDark(sal_uInt16 aAuthorIndex); - static Color GetColorLight(sal_uInt16 aAuthorIndex); - static Color GetColorAnchor(sal_uInt16 aAuthorIndex); + static Color GetColorDark(sal_uInt16 aAuthorIndex); + static Color GetColorLight(sal_uInt16 aAuthorIndex); + static Color GetColorAnchor(sal_uInt16 aAuthorIndex); - void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;} - OutlinerParaObject* IsAnswer() {return mpAnswer;} - void CheckMetaText(); + void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;} + OutlinerParaObject* IsAnswer() {return mpAnswer;} + void CheckMetaText(); - sal_uInt16 Replace(SvxSearchItem* pItem); - sal_uInt16 SearchReplace(const SwFormatField &pField, const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward); - sal_uInt16 FinishSearchReplace(const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward); + sal_uInt16 Replace(SvxSearchItem* pItem); + sal_uInt16 SearchReplace(const SwFormatField &pField, const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward); + sal_uInt16 FinishSearchReplace(const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward); - void AssureStdModeAtShell(); + void AssureStdModeAtShell(); - void ConnectSidebarWinToFrm( const SwFrm& rFrm, - const SwFormatField& rFormatField, - sw::sidebarwindows::SwSidebarWin& rSidebarWin ); - void DisconnectSidebarWinFromFrm( const SwFrm& rFrm, - sw::sidebarwindows::SwSidebarWin& rSidebarWin ); - bool HasFrmConnectedSidebarWins( const SwFrm& rFrm ); - vcl::Window* GetSidebarWinForFrmByIndex( const SwFrm& rFrm, - const sal_Int32 nIndex ); - void GetAllSidebarWinForFrm( const SwFrm& rFrm, - std::vector< vcl::Window* >* pChildren ); + void ConnectSidebarWinToFrm( const SwFrm& rFrm, + const SwFormatField& rFormatField, + sw::sidebarwindows::SwSidebarWin& rSidebarWin ); + void DisconnectSidebarWinFromFrm( const SwFrm& rFrm, + sw::sidebarwindows::SwSidebarWin& rSidebarWin ); + bool HasFrmConnectedSidebarWins( const SwFrm& rFrm ); + vcl::Window* GetSidebarWinForFrmByIndex( const SwFrm& rFrm, + const sal_Int32 nIndex ); + void GetAllSidebarWinForFrm( const SwFrm& rFrm, + std::vector< vcl::Window* >* pChildren ); - void DrawNotesForPage(OutputDevice *pOutDev, sal_uInt32 nPage); + void DrawNotesForPage(OutputDevice *pOutDev, sal_uInt32 nPage); }; #endif diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx index 7bbbb2ecffb1..b3a62474f4cd 100644 --- a/sw/inc/SidebarWin.hxx +++ b/sw/inc/SidebarWin.hxx @@ -190,7 +190,7 @@ class SwSidebarWin : public vcl::Window DECL_LINK(ModifyHdl, void*); DECL_LINK(ScrollHdl, ScrollBar*); - DECL_LINK(DeleteHdl, void*); + DECL_LINK_TYPED(DeleteHdl, void*, void); inline SwView& DocView() { return mrView;} inline SwPostItMgr& Mgr() { return mrMgr; } diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 44d19603a3de..6398b92f192c 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -455,7 +455,7 @@ public: static sal_uInt16 GetMoveType(); static void SetMoveType(sal_uInt16 nSet); - DECL_LINK( MoveNavigationHdl, bool* ); // #i75416# + DECL_LINK_TYPED( MoveNavigationHdl, void*, void ); static void SetActMark(sal_Int32 nSet); bool HandleWheelCommands( const CommandEvent& ); diff --git a/sw/source/core/docnode/retrievedinputstreamdata.cxx b/sw/source/core/docnode/retrievedinputstreamdata.cxx index d8168abfba96..1bbba464d1f9 100644 --- a/sw/source/core/docnode/retrievedinputstreamdata.cxx +++ b/sw/source/core/docnode/retrievedinputstreamdata.cxx @@ -122,14 +122,14 @@ bool SwRetrievedInputStreamDataManager::PopData( const tDataKey nDataKey, #i73788# Note: This method has to be run in the main thread. */ -IMPL_LINK( SwRetrievedInputStreamDataManager, +IMPL_LINK_TYPED( SwRetrievedInputStreamDataManager, LinkedInputStreamReady, - SwRetrievedInputStreamDataManager::tDataKey*, - pDataKey ) + void*, p, void ) { + SwRetrievedInputStreamDataManager::tDataKey* pDataKey = static_cast<SwRetrievedInputStreamDataManager::tDataKey*>(p); if ( !pDataKey ) { - return 0; + return; } osl::MutexGuard aGuard(maMutex); @@ -148,8 +148,6 @@ IMPL_LINK( SwRetrievedInputStreamDataManager, } } delete pDataKey; - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/inc/retrievedinputstreamdata.hxx b/sw/source/core/inc/retrievedinputstreamdata.hxx index c89686fe08fb..831df4ee563a 100644 --- a/sw/source/core/inc/retrievedinputstreamdata.hxx +++ b/sw/source/core/inc/retrievedinputstreamdata.hxx @@ -75,7 +75,7 @@ class SwRetrievedInputStreamDataManager bool PopData( const tDataKey nDataKey, tData& rData ); - DECL_LINK( LinkedInputStreamReady, SwRetrievedInputStreamDataManager::tDataKey* ); + DECL_LINK_TYPED( LinkedInputStreamReady, void*, void ); private: diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index f24fb15fe512..7ad8b7b05d4f 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -489,7 +489,7 @@ SwHTMLParser::~SwHTMLParser() } } -IMPL_LINK_NOARG( SwHTMLParser, AsyncCallback ) +IMPL_LINK_NOARG_TYPED( SwHTMLParser, AsyncCallback, void*, void ) { nEventId=0; @@ -503,7 +503,6 @@ IMPL_LINK_NOARG( SwHTMLParser, AsyncCallback ) } GetAsynchCallLink().Call(0); - return 0; } SvParserState SwHTMLParser::CallParser() diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 73eb990bd338..dfe788654790 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -486,7 +486,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient SwViewShell *CallEndAction( bool bChkAction = false, bool bChkPtr = true ); SwViewShell *CheckActionViewShell(); - DECL_LINK( AsyncCallback, void* ); + DECL_LINK_TYPED( AsyncCallback, void*, void ); // Attribute am Dok setzen void _SetAttr( bool bChkEnd, bool bBeforeTable, _HTMLAttrs *pPostIts ); diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index b21c252bc1e6..18fa4f8d7e25 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -68,7 +68,7 @@ class SwTestAccountSettingsDialog : public SfxModalDialog void Test(); DECL_LINK_TYPED(StopHdl, Button*, void); - DECL_LINK(TestHdl, void*); + DECL_LINK_TYPED(TestHdl, void*, void); public: explicit SwTestAccountSettingsDialog(SwMailConfigPage* pParent); virtual ~SwTestAccountSettingsDialog(); @@ -278,12 +278,11 @@ IMPL_LINK_NOARG_TYPED(SwTestAccountSettingsDialog, StopHdl, Button*, void) m_bStop = true; } -IMPL_LINK_NOARG(SwTestAccountSettingsDialog, TestHdl) +IMPL_LINK_NOARG_TYPED(SwTestAccountSettingsDialog, TestHdl, void*, void) { EnterWait(); Test(); LeaveWait(); - return 0; } void SwTestAccountSettingsDialog::Test() diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index c7b708837dac..33f283b69730 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -477,11 +477,12 @@ IMPL_LINK_NOARG(SwAddressListDialog, ListBoxSelectHdl_Impl) return 0; } -IMPL_LINK(SwAddressListDialog, StaticListBoxSelectHdl_Impl, SvTreeListEntry*, pSelect) +IMPL_LINK_TYPED(SwAddressListDialog, StaticListBoxSelectHdl_Impl, void*, p, void) { + SvTreeListEntry* pSelect = static_cast<SvTreeListEntry*>(p); //prevent nested calls of the select handler if(m_bInSelectHdl) - return 0; + return; EnterWait(); m_bInSelectHdl = true; AddressUserData_Impl* pUserData = 0; @@ -530,7 +531,6 @@ IMPL_LINK(SwAddressListDialog, StaticListBoxSelectHdl_Impl, SvTreeListEntry*, pS !SWUnoHelper::UCB_IsReadOnlyFileName( pUserData->sURL ) ); m_bInSelectHdl = false; LeaveWait(); - return 0; } // detect the number of tables for a data source diff --git a/sw/source/ui/dbui/addresslistdialog.hxx b/sw/source/ui/dbui/addresslistdialog.hxx index cb542429007f..921ece655941 100644 --- a/sw/source/ui/dbui/addresslistdialog.hxx +++ b/sw/source/ui/dbui/addresslistdialog.hxx @@ -82,7 +82,7 @@ class SwAddressListDialog : public SfxModalDialog DECL_LINK_TYPED(TableSelectHdl_Impl, Button*, void); DECL_LINK_TYPED(OKHdl_Impl, Button*, void); - DECL_LINK(StaticListBoxSelectHdl_Impl, SvTreeListEntry*); + DECL_LINK_TYPED(StaticListBoxSelectHdl_Impl, void*, void); public: SwAddressListDialog(SwMailMergeAddressBlockPage* pParent); diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx index 9b564897e4d8..6f264cb0db42 100644 --- a/sw/source/ui/dbui/mmoutputpage.hxx +++ b/sw/source/ui/dbui/mmoutputpage.hxx @@ -180,8 +180,8 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog DECL_DLLPRIVATE_LINK_TYPED( StopHdl_Impl, Button*, void ); DECL_DLLPRIVATE_LINK_TYPED( CloseHdl_Impl, Button* , void); - DECL_DLLPRIVATE_STATIC_LINK( SwSendMailDialog, StartSendMails, SwSendMailDialog* ); - DECL_DLLPRIVATE_STATIC_LINK( SwSendMailDialog, StopSendMails, SwSendMailDialog* ); + DECL_DLLPRIVATE_STATIC_LINK_TYPED( SwSendMailDialog, StartSendMails, void*, void ); + DECL_DLLPRIVATE_STATIC_LINK_TYPED( SwSendMailDialog, StopSendMails, void*, void ); DECL_DLLPRIVATE_LINK_TYPED( RemoveThis, Idle*, void ); SAL_DLLPRIVATE void IterateMails(); diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index 46e34667986b..382c09cc9318 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -388,10 +388,9 @@ IMPL_LINK_NOARG_TYPED(SwSendMailDialog, CloseHdl_Impl, Button*, void) ModelessDialog::Show( false ); } -IMPL_STATIC_LINK( SwSendMailDialog, StartSendMails, SwSendMailDialog*, pDialog ) +IMPL_STATIC_LINK_TYPED( SwSendMailDialog, StartSendMails, void*, pDialog, void ) { - pDialog->SendMails(); - return 0; + static_cast<SwSendMailDialog*>(pDialog)->SendMails(); } IMPL_LINK_TYPED( SwSendMailDialog, RemoveThis, Idle*, pTimer, void ) @@ -416,8 +415,9 @@ IMPL_LINK_TYPED( SwSendMailDialog, RemoveThis, Idle*, pTimer, void ) } } -IMPL_STATIC_LINK( SwSendMailDialog, StopSendMails, SwSendMailDialog*, pDialog ) +IMPL_STATIC_LINK_TYPED( SwSendMailDialog, StopSendMails, void*, p, void ) { + SwSendMailDialog* pDialog = static_cast<SwSendMailDialog*>(p); if(pDialog->m_pImpl->xMailDispatcher.is() && pDialog->m_pImpl->xMailDispatcher->isStarted()) { @@ -425,7 +425,6 @@ IMPL_STATIC_LINK( SwSendMailDialog, StopSendMails, SwSendMailDialog*, pDialog ) pDialog->m_pStop->SetText(pDialog->m_sContinue); pDialog->m_pPaused->Show(); } - return 0; } void SwSendMailDialog::SendMails() diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 387e28f23bed..3caad9da0d2c 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -268,11 +268,10 @@ class SwMailMergeWizardExecutor : public salhelper::SimpleReferenceObject AbstractMailMergeWizard* m_pWizard; // always owner DECL_LINK( EndDialogHdl, AbstractMailMergeWizard* ); - DECL_LINK( DestroyDialogHdl, void* ); - DECL_STATIC_LINK( - SwMailMergeWizardExecutor, DestroyWizardHdl, AbstractMailMergeWizard* ); - DECL_LINK( CancelHdl, void* ); - DECL_LINK( CloseFrameHdl, void* ); + DECL_LINK_TYPED( DestroyDialogHdl, void*, void ); + DECL_STATIC_LINK_TYPED( SwMailMergeWizardExecutor, DestroyWizardHdl, void*, void ); + DECL_LINK_TYPED( CancelHdl, void*, void ); + DECL_LINK_TYPED( CloseFrameHdl, void*, void ); void ExecutionFinished( bool bDeleteConfigItem ); void ExecuteWizard(); @@ -575,24 +574,20 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, pD return 0L; } -IMPL_LINK_NOARG(SwMailMergeWizardExecutor, DestroyDialogHdl) +IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, DestroyDialogHdl, void*, void) { delete m_pWizard; m_pWizard = 0; release(); - return 0L; } -IMPL_STATIC_LINK( - SwMailMergeWizardExecutor, DestroyWizardHdl, AbstractMailMergeWizard*, - pDialog ) +IMPL_STATIC_LINK_TYPED(SwMailMergeWizardExecutor, DestroyWizardHdl, void*, pDialog, void ) { - delete pDialog; - return 0L; + delete static_cast<AbstractMailMergeWizard*>(pDialog); } -IMPL_LINK_NOARG(SwMailMergeWizardExecutor, CancelHdl) +IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, CancelHdl, void*, void) { if(m_pMMConfig->GetTargetView()) { @@ -608,19 +603,15 @@ IMPL_LINK_NOARG(SwMailMergeWizardExecutor, CancelHdl) // m_pWizard already deleted by closing the target view m_pWizard = 0; release(); - - return 0L; } -IMPL_LINK_NOARG(SwMailMergeWizardExecutor, CloseFrameHdl) +IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, CloseFrameHdl, void*, void) { if ( m_pView2Close ) { m_pView2Close->GetViewFrame()->DoClose(); m_pView2Close = NULL; } - - return 0L; } } // namespace diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx index b4f6046974bc..a10fb41e268d 100644 --- a/sw/source/uibase/dialog/regionsw.cxx +++ b/sw/source/uibase/dialog/regionsw.cxx @@ -174,8 +174,9 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) } } -IMPL_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect ) +IMPL_LINK_TYPED( SwWrtShell, InsertRegionDialog, void*, p, void ) { + SwSectionData* pSect = static_cast<SwSectionData*>(p); boost::scoped_ptr<SwSectionData> xSectionData(pSect); if (xSectionData.get()) { @@ -199,7 +200,6 @@ IMPL_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect ) aTabDlg->SetSectionData(*xSectionData); aTabDlg->Execute(); } - return 0; } void SwBaseShell::EditRegionDialog(SfxRequest& rReq) diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index c6b6b817cd84..362919f7c763 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -1877,14 +1877,14 @@ void SwPostItMgr::SetActiveSidebarWin( SwSidebarWin* p) } } -IMPL_LINK_NOARG( SwPostItMgr, CalcHdl ) +IMPL_LINK_NOARG_TYPED( SwPostItMgr, CalcHdl, void*, void ) { mnEventId = 0; if ( mbLayouting ) { OSL_FAIL("Reentrance problem in Layout Manager!"); mbWaitingForCalcRects = false; - return 0; + return; } // do not change order, even if it would seem so in the first place, we need the calcrects always @@ -1893,7 +1893,6 @@ IMPL_LINK_NOARG( SwPostItMgr, CalcHdl ) mbLayout = false; LayoutPostIts(); } - return 0; } void SwPostItMgr::Rescale() diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index 63bd1f1d70df..7023c79dca78 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -1189,11 +1189,10 @@ IMPL_LINK_NOARG(SwSidebarWin, ModifyHdl) return 0; } -IMPL_LINK_NOARG(SwSidebarWin, DeleteHdl) +IMPL_LINK_NOARG_TYPED(SwSidebarWin, DeleteHdl, void*, void) { mnEventId = 0; Delete(); - return 0; } void SwSidebarWin::ResetAttributes() diff --git a/sw/source/uibase/inc/basesh.hxx b/sw/source/uibase/inc/basesh.hxx index 8d4737e7c6f9..38651f917cf0 100644 --- a/sw/source/uibase/inc/basesh.hxx +++ b/sw/source/uibase/inc/basesh.hxx @@ -59,7 +59,7 @@ protected: inline void SetGetStateSet( SfxItemSet* p ) { pGetStateSet = p; } inline bool AddGrfUpdateSlot( sal_uInt16 nSlot ){ return aGrfUpdateSlots.insert( nSlot ).second; } - DECL_LINK( InsertDBTextHdl, DBTextStruct_Impl* ); + DECL_LINK_TYPED( InsertDBTextHdl, void*, void ); void InsertURLButton( const OUString& rURL, const OUString& rTarget, const OUString& rText ); void InsertTable( SfxRequest& _rRequest ); diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index a305c3569572..9fd8e2a8ab37 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -299,7 +299,7 @@ protected: static const SfxObjectShell* GetShowShell() {return pShowShell;} static void SetShowShell(const SfxObjectShell*pSet) {pShowShell = pSet;} - DECL_STATIC_LINK(SwGlobalTree, ShowFrameHdl, SwGlobalTree*); + DECL_STATIC_LINK_TYPED(SwGlobalTree, ShowFrameHdl, void*, void); virtual PopupMenu* CreateContextMenu() SAL_OVERRIDE; virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index 0ccd8c57c1a9..f965c87f4479 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -443,7 +443,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); void AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM = NULL ); // link for inserting ranges via Drag&Drop/Clipboard - DECL_LINK( InsertRegionDialog, SwSectionData* ); + DECL_LINK_TYPED( InsertRegionDialog, void*, void ); // ctor, the first one is a kind of a controlled copy ctor for more views of a document SwWrtShell( SwWrtShell&, vcl::Window *pWin, SwView &rShell); diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx index cf95548cb6b9..925d2af5c0cc 100644 --- a/sw/source/uibase/shells/textsh2.cxx +++ b/sw/source/uibase/shells/textsh2.cxx @@ -154,8 +154,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq) pNew->xCursor = xCursor; pNew->xConnection = xConnection; - Application::PostUserEvent( LINK( this, SwBaseShell, - InsertDBTextHdl ), pNew ); + Application::PostUserEvent( LINK( this, SwBaseShell, InsertDBTextHdl ), pNew ); // the pNew will be removed in InsertDBTextHdl !! } } @@ -234,8 +233,9 @@ void SwTextShell::ExecDB(SfxRequest &rReq) } } -IMPL_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl*, pDBStruct ) +IMPL_LINK_TYPED( SwBaseShell, InsertDBTextHdl, void*, p, void ) { + DBTextStruct_Impl* pDBStruct = static_cast<DBTextStruct_Impl*>(p); if( pDBStruct ) { bool bDispose = false; @@ -243,7 +243,7 @@ IMPL_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl*, pDBStruct ) Reference<XDataSource> xSource = SwDBManager::getDataSourceAsParent(xConnection,pDBStruct->aDBData.sDataSource); // #111987# the connection is disposed an so no parent has been found if(xConnection.is() && !xSource.is()) - return 0; + return; if ( !xConnection.is() ) { @@ -278,7 +278,6 @@ IMPL_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl*, pDBStruct ) } delete pDBStruct; - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 4980439b3641..896d240acbe9 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -604,11 +604,12 @@ struct ExecuteInfo class AsyncExecute { public: - DECL_STATIC_LINK( AsyncExecute, ExecuteHdl_Impl, ExecuteInfo* ); + DECL_STATIC_LINK_TYPED( AsyncExecute, ExecuteHdl_Impl, void*, void ); }; -IMPL_STATIC_LINK( AsyncExecute, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo ) +IMPL_STATIC_LINK_TYPED( AsyncExecute, ExecuteHdl_Impl, void*, p, void ) { + ExecuteInfo* pExecuteInfo = static_cast<ExecuteInfo*>(p); SolarMutexReleaser aReleaser; try { @@ -622,7 +623,6 @@ IMPL_STATIC_LINK( AsyncExecute, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo ) } delete pExecuteInfo; - return 0; } //!! End of extra code for context menu modifying extensions diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index e27caff132e7..49424a6e864d 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -313,10 +313,11 @@ int SwView::_CreateScrollbar( bool bHori ) return 1; } -IMPL_LINK( SwView, MoveNavigationHdl, bool *, pbNext ) +IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void ) { + bool* pbNext = static_cast<bool*>(p); if ( !pbNext ) - return 0; + return; const bool bNext = *pbNext; SwWrtShell& rSh = GetWrtShell(); switch( m_nMoveType ) @@ -462,7 +463,6 @@ IMPL_LINK( SwView, MoveNavigationHdl, bool *, pbNext ) } m_pEditWin->GrabFocus(); delete pbNext; - return 0; } int SwView::CreateTab() diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 0f4e6d6f127f..a7db9aa3e904 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -1216,14 +1216,13 @@ SwNavigationPI* SwGlobalTree::GetParentWindow() return static_cast<SwNavigationPI*>(Window::GetParent()); } -IMPL_STATIC_LINK(SwGlobalTree, ShowFrameHdl, SwGlobalTree*,) +IMPL_STATIC_LINK_NOARG_TYPED(SwGlobalTree, ShowFrameHdl, void*, void) { const SfxObjectShell* pShell = SwGlobalTree::GetShowShell(); SfxViewFrame* pFirst = pShell ? SfxViewFrame::GetFirst(pShell) : NULL; if (pFirst) pFirst->ToTop(); SwGlobalTree::SetShowShell(0); - return 0; } void SwGlobalTree::InitEntry(SvTreeListEntry* pEntry, |