cui/source/customize/acccfg.cxx | 14 +---- cui/source/inc/acccfg.hxx | 4 - include/sfx2/basedlgs.hxx | 2 include/sfx2/dinfdlg.hxx | 6 +- include/sfx2/dispatch.hxx | 2 include/sfx2/docinsert.hxx | 8 +-- include/sfx2/filedlghelper.hxx | 6 +- include/sfx2/hintpost.hxx | 13 ++--- include/sfx2/tbxctrl.hxx | 6 +- include/sfx2/templateabstractview.hxx | 4 - include/sfx2/templatedlg.hxx | 2 sc/source/ui/docshell/docsh4.cxx | 3 - sc/source/ui/inc/docsh.hxx | 2 sc/source/ui/inc/instbdlg.hxx | 2 sc/source/ui/inc/linkarea.hxx | 2 sc/source/ui/miscdlgs/instbdlg.cxx | 4 - sc/source/ui/miscdlgs/linkarea.cxx | 5 - sfx2/source/appl/fileobj.cxx | 3 - sfx2/source/appl/fileobj.hxx | 2 sfx2/source/appl/shutdownicon.cxx | 3 - sfx2/source/appl/shutdownicon.hxx | 2 sfx2/source/control/dispatch.cxx | 7 +- sfx2/source/control/templateabstractview.cxx | 2 sfx2/source/dialog/backingwindow.cxx | 4 - sfx2/source/dialog/backingwindow.hxx | 2 sfx2/source/dialog/dinfdlg.cxx | 3 - sfx2/source/dialog/filedlghelper.cxx | 2 sfx2/source/doc/docinsert.cxx | 8 +-- sfx2/source/doc/templatedlg.cxx | 8 +-- sfx2/source/notify/hintpost.cxx | 15 +---- sfx2/source/toolbox/tbxitem.cxx | 4 - starmath/inc/view.hxx | 2 starmath/source/view.cxx | 3 - sw/inc/view.hxx | 2 sw/source/ui/dialog/uiregionsw.cxx | 6 -- sw/source/ui/fldui/javaedit.cxx | 4 - sw/source/uibase/inc/conttree.hxx | 2 sw/source/uibase/inc/javaedit.hxx | 2 sw/source/uibase/inc/navipi.hxx | 2 sw/source/uibase/inc/regionsw.hxx | 4 - sw/source/uibase/inc/uivwimp.hxx | 2 sw/source/uibase/uiview/uivwimp.cxx | 2 sw/source/uibase/uiview/view2.cxx | 69 +++++++++++++-------------- sw/source/uibase/utlui/glbltree.cxx | 39 +++++++-------- sw/source/uibase/utlui/navipi.cxx | 4 - 45 files changed, 128 insertions(+), 165 deletions(-)
New commits: commit 91b1f300cf7f357c3a39d0d5810326cc78d78f16 Author: Noel Grandin <noelgran...@gmail.com> Date: Sat Jul 18 17:23:17 2015 +0200 convert to typed Link<> in sfx2 Change-Id: Ifa42bd14d7329ff1043fa736513c468dda30485e Reviewed-on: https://gerrit.libreoffice.org/17195 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noelgran...@gmail.com> diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 6bf6282..6db36dc 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -1231,7 +1231,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, RadioHdl) } -IMPL_LINK_NOARG(SfxAcceleratorConfigPage, LoadHdl) +IMPL_LINK_NOARG_TYPED(SfxAcceleratorConfigPage, LoadHdl, sfx2::FileDialogHelper*, void) { assert(m_pFileDlg); @@ -1240,7 +1240,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, LoadHdl) sCfgName = m_pFileDlg->GetPath(); if ( sCfgName.isEmpty() ) - return 0; + return; GetTabDialog()->EnterWait(); @@ -1312,12 +1312,10 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, LoadHdl) {} GetTabDialog()->LeaveWait(); - - return 0; } -IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SaveHdl) +IMPL_LINK_NOARG_TYPED(SfxAcceleratorConfigPage, SaveHdl, sfx2::FileDialogHelper*, void) { assert(m_pFileDlg); @@ -1326,7 +1324,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SaveHdl) sCfgName = m_pFileDlg->GetPath(); if ( sCfgName.isEmpty() ) - return 0; + return; GetTabDialog()->EnterWait(); @@ -1415,8 +1413,6 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SaveHdl) {} GetTabDialog()->LeaveWait(); - - return 0; } @@ -1433,7 +1429,7 @@ void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const OUString& r m_pFileDlg->AddFilter( aFilterCfgStr, OUString("*.cfg") ); m_pFileDlg->SetCurrentFilter( aFilterCfgStr ); - Link<> aDlgClosedLink = bSave ? LINK( this, SfxAcceleratorConfigPage, SaveHdl ) + Link<sfx2::FileDialogHelper*,void> aDlgClosedLink = bSave ? LINK( this, SfxAcceleratorConfigPage, SaveHdl ) : LINK( this, SfxAcceleratorConfigPage, LoadHdl ); m_pFileDlg->StartExecuteModal( aDlgClosedLink ); } diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx index 4a31d77..9f05168 100644 --- a/cui/source/inc/acccfg.hxx +++ b/cui/source/inc/acccfg.hxx @@ -155,8 +155,8 @@ private: DECL_LINK(Default, void *); DECL_LINK(RadioHdl, void *); - DECL_LINK(LoadHdl, void *); - DECL_LINK(SaveHdl, void *); + DECL_LINK_TYPED(LoadHdl, sfx2::FileDialogHelper *, void); + DECL_LINK_TYPED(SaveHdl, sfx2::FileDialogHelper *, void); OUString GetLabel4Command(const OUString& rCommand); void InitAccCfg(); diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index 1cf9082..20ca101 100644 --- a/include/sfx2/basedlgs.hxx +++ b/include/sfx2/basedlgs.hxx @@ -166,8 +166,6 @@ struct SingleTabDlgImpl { VclPtr<SfxTabPage> m_pSfxPage; VclPtr<FixedLine> m_pLine; - OUString m_sInfoURL; - Link<> m_aInfoLink; SingleTabDlgImpl(); }; diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index 9db822e..ba01aff 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -424,7 +424,7 @@ private: SvNumberFormatter m_aNumberFormatter; Idle m_aEditLoseFocusIdle; Idle m_aBoxLoseFocusIdle; - Link<> m_aRemovedHdl; + Link<void*,void> m_aRemovedHdl; DECL_STATIC_LINK( CustomPropertiesWindow, TypeHdl, CustomPropertiesTypeBox* ); DECL_LINK( RemoveHdl, CustomPropertiesRemoveButton* ); @@ -456,7 +456,7 @@ public: ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetCustomProperties() const; - void SetRemovedHdl( const Link<>& rLink ) { m_aRemovedHdl = rLink; } + void SetRemovedHdl( const Link<void*,void>& rLink ) { m_aRemovedHdl = rLink; } void updateLineWidth(); }; @@ -475,7 +475,7 @@ private: sal_Int32 m_nThumbPos; DECL_LINK( ScrollHdl, ScrollBar* ); - DECL_LINK( RemovedHdl, void* ); + DECL_LINK_TYPED( RemovedHdl, void*, void ); public: CustomPropertiesControl(vcl::Window* pParent); diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx index 1c325e4..d1ef446 100644 --- a/include/sfx2/dispatch.hxx +++ b/include/sfx2/dispatch.hxx @@ -88,7 +88,7 @@ friend class SfxApplication; friend class SfxViewFrame; DECL_DLLPRIVATE_LINK_TYPED( EventHdl_Impl, Idle *, void ); - DECL_DLLPRIVATE_LINK( PostMsgHandler, SfxRequest * ); + DECL_DLLPRIVATE_LINK_TYPED( PostMsgHandler, SfxRequest *, void ); SAL_DLLPRIVATE void Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest &rReq, bool bRecord ); SAL_DLLPRIVATE void _Update_Impl( bool,bool,bool,SfxWorkWindow*); diff --git a/include/sfx2/docinsert.hxx b/include/sfx2/docinsert.hxx index 0405886..dfc423a 100644 --- a/include/sfx2/docinsert.hxx +++ b/include/sfx2/docinsert.hxx @@ -39,23 +39,23 @@ class SFX2_DLLPUBLIC DocumentInserter private: OUString m_sDocFactory; OUString m_sFilter; - Link<> m_aDialogClosedLink; + Link<sfx2::FileDialogHelper*,void> m_aDialogClosedLink; sal_Int64 const m_nDlgFlags; ErrCode m_nError; sfx2::FileDialogHelper* m_pFileDlg; SfxItemSet* m_pItemSet; - std::vector<OUString> m_pURLList; + std::vector<OUString> m_pURLList; - DECL_LINK(DialogClosedHdl, void *); + DECL_LINK_TYPED(DialogClosedHdl, sfx2::FileDialogHelper*, void); public: DocumentInserter(const OUString& rFactory, bool const bEnableMultiSelection = false); ~DocumentInserter(); - void StartExecuteModal( const Link<>& _rDialogClosedLink ); + void StartExecuteModal( const Link<sfx2::FileDialogHelper*,void>& _rDialogClosedLink ); SfxMedium* CreateMedium(); SfxMediumList* CreateMediumList(); }; diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx index abaaa73..c302109 100644 --- a/include/sfx2/filedlghelper.hxx +++ b/include/sfx2/filedlghelper.hxx @@ -92,7 +92,7 @@ public: }; private: - Link<> m_aDialogClosedLink; + Link<FileDialogHelper*,void> m_aDialogClosedLink; ErrCode m_nError; ::com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFilePickerListener > mxImp; @@ -131,11 +131,11 @@ public: virtual ~FileDialogHelper(); ErrCode Execute(); - void StartExecuteModal( const Link<>& rEndDialogHdl ); + void StartExecuteModal( const Link<FileDialogHelper*,void>& rEndDialogHdl ); inline ErrCode GetError() const { return m_nError; } sal_Int16 GetDialogType() const; bool IsPasswordEnabled() const; - OUString GetRealFilter() const; + OUString GetRealFilter() const; void SetTitle( const OUString& rNewTitle ); OUString GetPath() const; diff --git a/include/sfx2/hintpost.hxx b/include/sfx2/hintpost.hxx index 469b190..c94ecbf 100644 --- a/include/sfx2/hintpost.hxx +++ b/include/sfx2/hintpost.hxx @@ -23,7 +23,7 @@ #include <tools/ref.hxx> -class SfxHint; +class SfxRequest; /** [Description] @@ -39,19 +39,18 @@ class SfxHint; class SfxHintPoster : public SvRefBase { private: - Link<> m_Link; + Link<SfxRequest*,void> m_Link; - DECL_LINK( DoEvent_Impl, SfxHint * ); + DECL_LINK( DoEvent_Impl, SfxRequest * ); protected: virtual ~SfxHintPoster(); - void Event( SfxHint* pPostedHint ); public: - SfxHintPoster(const Link<>& rLink); + SfxHintPoster(const Link<SfxRequest*,void>& rLink); - void Post( SfxHint* pHint = 0 ); - void SetEventHdl(const Link<>& rLink); + void Post( SfxRequest* pHint = 0 ); + void SetEventHdl(const Link<SfxRequest*,void>& rLink); }; typedef tools::SvRef<SfxHintPoster> SfxHintPosterRef; diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx index 6c02d44..7632ca2 100644 --- a/include/sfx2/tbxctrl.hxx +++ b/include/sfx2/tbxctrl.hxx @@ -88,7 +88,7 @@ class SFX2_DLLPUBLIC SfxPopupWindow: public FloatingWindow, public SfxStatusList { bool m_bFloating; bool m_bCascading; - Link<> m_aDeleteLink; + Link<SfxPopupWindow*,void> m_aDeleteLink; sal_uInt16 m_nId; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; SfxFrameStatusListener* m_pStatusListener; @@ -140,7 +140,7 @@ public: virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; void StartCascading(); - SAL_DLLPRIVATE void SetDeleteLink_Impl( const Link<>& rLink ) + SAL_DLLPRIVATE void SetDeleteLink_Impl( const Link<SfxPopupWindow*,void>& rLink ) { m_aDeleteLink = rLink; } @@ -174,7 +174,7 @@ friend struct SfxTbxCtrlFactory; protected: DECL_LINK( PopupModeEndHdl, void * ); - DECL_LINK( ClosePopupWindow, SfxPopupWindow * ); + DECL_LINK_TYPED( ClosePopupWindow, SfxPopupWindow *, void ); // old SfxToolBoxControl methods virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); diff --git a/include/sfx2/templateabstractview.hxx b/include/sfx2/templateabstractview.hxx index 14d5893..c6aa1e1 100644 --- a/include/sfx2/templateabstractview.hxx +++ b/include/sfx2/templateabstractview.hxx @@ -115,7 +115,7 @@ public: // Check if the root region is visible or not. bool isNonRootRegionVisible () const { return mnCurRegionId > 0;} - void setOpenRegionHdl(const Link<> &rLink); + void setOpenRegionHdl(const Link<void*,void> &rLink); void setOpenTemplateHdl (const Link<> &rLink); @@ -141,7 +141,7 @@ protected: VclPtr<PushButton> maAllButton; VclPtr<FixedText> maFTName; - Link<> maOpenRegionHdl; + Link<void*,void> maOpenRegionHdl; Link<> maOpenTemplateHdl; }; diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx index 0d06c3c..64323fb 100644 --- a/include/sfx2/templatedlg.hxx +++ b/include/sfx2/templatedlg.hxx @@ -77,7 +77,7 @@ private: DECL_LINK(RepositoryMenuSelectHdl, Menu*); DECL_LINK(DefaultTemplateMenuSelectHdl, Menu*); - DECL_LINK(OpenRegionHdl, void*); + DECL_LINK_TYPED(OpenRegionHdl, void*, void); DECL_LINK(OpenTemplateHdl, ThumbnailViewItem*); DECL_LINK(SearchUpdateHdl, void*); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 969c678e..40b8504 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2269,7 +2269,7 @@ ScDocShell* ScDocShell::GetShellByNum( sal_uInt16 nDocNo ) // static return pFound; } -IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) +IMPL_LINK_TYPED( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, void ) { OSL_ENSURE( _pFileDlg, "ScDocShell::DialogClosedHdl(): no file dialog" ); OSL_ENSURE( pImpl->pDocInserter, "ScDocShell::DialogClosedHdl(): no document inserter" ); @@ -2305,7 +2305,6 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) } pImpl->bIgnoreLostRedliningWarning = false; - return 0; } #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 8eba21a..1630a5c 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -349,7 +349,7 @@ public: void LockDocument(); void UnlockDocument(); - DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* ); + DECL_LINK_TYPED( DialogClosedHdl, sfx2::FileDialogHelper*, void ); virtual SfxStyleSheetBasePool* GetStyleSheetPool() SAL_OVERRIDE; diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx index 8655f0d..f80a634 100644 --- a/sc/source/ui/inc/instbdlg.hxx +++ b/sc/source/ui/inc/instbdlg.hxx @@ -97,7 +97,7 @@ private: DECL_LINK(CountHdl_Impl, void *); DECL_LINK(DoEnterHdl, void *); DECL_LINK_TYPED(BrowseTimeoutHdl, Timer *, void); - DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* ); + DECL_LINK_TYPED( DialogClosedHdl, sfx2::FileDialogHelper*, void ); }; #endif // INCLUDED_SC_SOURCE_UI_INC_INSTBDLG_HXX diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx index d88b17d..c985d4d 100644 --- a/sc/source/ui/inc/linkarea.hxx +++ b/sc/source/ui/inc/linkarea.hxx @@ -54,7 +54,7 @@ private: DECL_LINK(BrowseHdl, void *); DECL_LINK(RangeHdl, void *); DECL_LINK(ReloadHdl, void *); - DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* ); + DECL_LINK_TYPED( DialogClosedHdl, sfx2::FileDialogHelper*, void ); void UpdateSourceRanges(); void UpdateEnable(); diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index a237f18..6b09fa4 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -322,7 +322,7 @@ IMPL_LINK_NOARG_TYPED(ScInsertTableDlg, BrowseTimeoutHdl, Timer *, void) BrowseHdl_Impl(m_pBtnBrowse); } -IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) +IMPL_LINK_TYPED( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, void ) { if ( ERRCODE_NONE == _pFileDlg->GetError() ) { @@ -370,8 +370,6 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg else if ( bMustClose ) // execute slot FID_INS_TABLE_EXT and cancel file dialog EndDialog( RET_CANCEL ); - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index 51402b1..3b0d426 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -210,10 +210,10 @@ IMPL_LINK_NOARG(ScLinkedAreaDlg, ReloadHdl) return 0; } -IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) +IMPL_LINK_TYPED( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, void ) { if ( _pFileDlg->GetError() != ERRCODE_NONE ) - return 0; + return; SfxMedium* pMed = pDocInserter->CreateMedium(); if ( pMed ) @@ -265,7 +265,6 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg UpdateSourceRanges(); UpdateEnable(); - return 0; } #undef FILTERNAME_HTML diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 7616661..d1e3032 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -506,7 +506,7 @@ IMPL_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, deleteMedium ) return 0; } -IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) +IMPL_LINK_TYPED( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, void ) { OUString sFile; Application::SetDefDialogParent( pOldParent ); @@ -529,7 +529,6 @@ IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) if ( aEndEditLink.IsSet() ) aEndEditLink.Call( &sFile ); - return 0; } /* [Description] diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx index 3b96e32..8e24f0f 100644 --- a/sfx2/source/appl/fileobj.hxx +++ b/sfx2/source/appl/fileobj.hxx @@ -56,7 +56,7 @@ class SvFileObject : public sfx2::SvLinkSource DECL_LINK( DelMedium_Impl, SfxMediumRef* ); DECL_LINK( LoadGrfReady_Impl, void* ); - DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* ); + DECL_LINK_TYPED( DialogClosedHdl, sfx2::FileDialogHelper*, void ); protected: virtual ~SvFileObject(); diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 22f8284..81bed21 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -364,7 +364,7 @@ void ShutdownIcon::StartFileDialog() -IMPL_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, ) +IMPL_LINK_TYPED( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, /*unused*/, void ) { DBG_ASSERT( m_pFileDlg, "ShutdownIcon, DialogClosedHdl_Impl(): no file dialog" ); @@ -503,7 +503,6 @@ IMPL_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, ) #endif LeaveModalMode(); - return 0; } diff --git a/sfx2/source/appl/shutdownicon.hxx b/sfx2/source/appl/shutdownicon.hxx index 94224fb..2744e11 100644 --- a/sfx2/source/appl/shutdownicon.hxx +++ b/sfx2/source/appl/shutdownicon.hxx @@ -116,7 +116,7 @@ class SFX2_DLLPUBLIC ShutdownIcon : public ShutdownIconServiceBase void SetVeto( bool bVeto ) { m_bVeto = bVeto;} void StartFileDialog(); - DECL_LINK(DialogClosedHdl_Impl, sfx2::FileDialogHelper*); + DECL_LINK_TYPED(DialogClosedHdl_Impl, sfx2::FileDialogHelper*, void); static bool IsQuickstarterInstalled(); diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 9f3de39..8d14270 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -329,7 +329,7 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent ) for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++) xImp->aObjBars[n].nResId = 0; - Link<> aGenLink( LINK(this, SfxDispatcher, PostMsgHandler) ); + Link<SfxRequest*,void> aGenLink( LINK(this, SfxDispatcher, PostMsgHandler) ); xImp->xPoster = new SfxHintPoster(aGenLink); @@ -376,7 +376,7 @@ SfxDispatcher::~SfxDispatcher() // So that no timer by Reschedule in PlugComm strikes the LeaveRegistrations xImp->aIdle.Stop(); - xImp->xPoster->SetEventHdl( Link<>() ); + xImp->xPoster->SetEventHdl( Link<SfxRequest*,void>() ); // Notify the stack varialbles in Call_Impl if ( xImp->pInCallAliveFlag ) @@ -1071,7 +1071,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall, /** Helper method to receive the asynchronously executed <SfxRequest>s. */ -IMPL_LINK(SfxDispatcher, PostMsgHandler, SfxRequest*, pReq) +IMPL_LINK_TYPED(SfxDispatcher, PostMsgHandler, SfxRequest*, pReq, void) { DBG_ASSERT( !xImp->bFlushing, "recursive call to dispatcher" ); SFX_STACK(SfxDispatcher::PostMsgHandler); @@ -1104,7 +1104,6 @@ IMPL_LINK(SfxDispatcher, PostMsgHandler, SfxRequest*, pReq) } delete pReq; - return 0; } void SfxDispatcher::SetMenu_Impl() diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx index 11b985d..3be294c 100644 --- a/sfx2/source/control/templateabstractview.cxx +++ b/sfx2/source/control/templateabstractview.cxx @@ -219,7 +219,7 @@ void TemplateAbstractView::insertItems(const std::vector<TemplateItemProperties> -void TemplateAbstractView::setOpenRegionHdl(const Link<> &rLink) +void TemplateAbstractView::setOpenRegionHdl(const Link<void*,void> &rLink) { maOpenRegionHdl = rLink; } diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 419be21..e268790 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -649,12 +649,10 @@ IMPL_LINK_TYPED( BackingWindow, MenuSelectHdl, MenuButton*, pButton, void ) } -IMPL_LINK_NOARG( BackingWindow, OpenRegionHdl) +IMPL_LINK_NOARG_TYPED( BackingWindow, OpenRegionHdl, void*, void) { maSelFolders.clear(); maSelTemplates.clear(); - - return 0; } IMPL_LINK(BackingWindow, OpenTemplateHdl, ThumbnailViewItem*, pItem) diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index 7bf4ca7..50b3fb4 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -108,7 +108,7 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer DECL_LINK(ClickHdl, Button*); DECL_LINK_TYPED(MenuSelectHdl, MenuButton*, void); DECL_LINK(ExtLinkClickHdl, Button*); - DECL_LINK(OpenRegionHdl, void*); + DECL_LINK_TYPED(OpenRegionHdl, void*, void); DECL_LINK(OpenTemplateHdl, ThumbnailViewItem*); void initControls(); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 28ea2d0..51e62f4 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2152,13 +2152,12 @@ IMPL_LINK( CustomPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar ) return 0; } -IMPL_LINK_NOARG(CustomPropertiesControl, RemovedHdl) +IMPL_LINK_NOARG_TYPED(CustomPropertiesControl, RemovedHdl, void*, void) { long nLineCount = m_pPropertiesWin->GetVisibleLineCount(); m_pVertScroll->SetRangeMax(nLineCount + 1); if ( m_pPropertiesWin->GetOutputSizePixel().Height() < nLineCount * m_pPropertiesWin->GetLineHeight() ) m_pVertScroll->DoScrollAction ( SCROLL_LINEUP ); - return 0; } void CustomPropertiesControl::AddLine( const OUString& sName, Any& rAny, bool bInteractive ) diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index d4d9e14..2ed3a4b 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2337,7 +2337,7 @@ ErrCode FileDialogHelper::Execute( SfxItemSet *& rpSet, return nRet; } -void FileDialogHelper::StartExecuteModal( const Link<>& rEndDialogHdl ) +void FileDialogHelper::StartExecuteModal( const Link<FileDialogHelper*,void>& rEndDialogHdl ) { m_aDialogClosedLink = rEndDialogHdl; m_nError = ERRCODE_NONE; diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index c488b60..51cac45 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -65,7 +65,7 @@ DocumentInserter::~DocumentInserter() delete m_pFileDlg; } -void DocumentInserter::StartExecuteModal( const Link<>& _rDialogClosedLink ) +void DocumentInserter::StartExecuteModal( const Link<sfx2::FileDialogHelper*,void>& _rDialogClosedLink ) { m_aDialogClosedLink = _rDialogClosedLink; m_nError = ERRCODE_NONE; @@ -160,7 +160,7 @@ void impl_FillURLList( sfx2::FileDialogHelper* _pFileDlg, std::vector<OUString>& } } -IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl) +IMPL_LINK_NOARG_TYPED(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*, void) { DBG_ASSERT( m_pFileDlg, "DocumentInserter::DialogClosedHdl(): no file dialog" ); @@ -201,7 +201,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl) else { DELETEZ( m_pItemSet ); - return 0; + return; } } } @@ -264,8 +264,6 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl) if ( m_aDialogClosedLink.IsSet() ) m_aDialogClosedLink.Call( m_pFileDlg ); - - return 0; } } // namespace sfx2 diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 745ad69..7e8b840 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -312,11 +312,11 @@ void SfxTemplateManagerDlg::dispose() // Ignore view events since we are cleaning the object mpLocalView->setItemStateHdl(Link<>()); - mpLocalView->setOpenRegionHdl(Link<>()); + mpLocalView->setOpenRegionHdl(Link<void*,void>()); mpLocalView->setOpenTemplateHdl(Link<>()); mpRemoteView->setItemStateHdl(Link<>()); - mpRemoteView->setOpenRegionHdl(Link<>()); + mpRemoteView->setOpenRegionHdl(Link<void*,void>()); mpRemoteView->setOpenTemplateHdl(Link<>()); mpSearchView->setItemStateHdl(Link<>()); @@ -669,7 +669,7 @@ IMPL_LINK(SfxTemplateManagerDlg, DefaultTemplateMenuSelectHdl, Menu*, pMenu) return 0; } -IMPL_LINK_NOARG(SfxTemplateManagerDlg, OpenRegionHdl) +IMPL_LINK_NOARG_TYPED(SfxTemplateManagerDlg, OpenRegionHdl, void*, void) { maSelFolders.clear(); maSelTemplates.clear(); @@ -682,8 +682,6 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg, OpenRegionHdl) mpTemplateBar->Hide(); mpViewBar->Show(); mpActionBar->Show(); - - return 0; } IMPL_LINK(SfxTemplateManagerDlg, OpenTemplateHdl, ThumbnailViewItem*, pItem) diff --git a/sfx2/source/notify/hintpost.cxx b/sfx2/source/notify/hintpost.cxx index 00e4290..f952b6b 100644 --- a/sfx2/source/notify/hintpost.cxx +++ b/sfx2/source/notify/hintpost.cxx @@ -24,7 +24,7 @@ #include "sfxtypes.hxx" -SfxHintPoster::SfxHintPoster(const Link<>& rLink) +SfxHintPoster::SfxHintPoster(const Link<SfxRequest*,void>& rLink) : m_Link(rLink) { } @@ -33,25 +33,20 @@ SfxHintPoster::~SfxHintPoster() { } -void SfxHintPoster::Post( SfxHint* pHintToPost ) +void SfxHintPoster::Post( SfxRequest* pHintToPost ) { Application::PostUserEvent( ( LINK(this, SfxHintPoster, DoEvent_Impl) ), pHintToPost ); AddFirstRef(); } -IMPL_LINK( SfxHintPoster, DoEvent_Impl, SfxHint *, pPostedHint ) +IMPL_LINK( SfxHintPoster, DoEvent_Impl, SfxRequest *, pPostedHint ) { - Event( pPostedHint ); + m_Link.Call( pPostedHint ); ReleaseRef(); return 0; } -void SfxHintPoster::Event( SfxHint* pPostedHint ) -{ - m_Link.Call( pPostedHint ); -} - -void SfxHintPoster::SetEventHdl(const Link<>& rLink) +void SfxHintPoster::SetEventHdl(const Link<SfxRequest*,void>& rLink) { m_Link = rLink; } diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 41caaa3..ed53d96 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -653,14 +653,12 @@ IMPL_LINK_NOARG(SfxToolBoxControl, PopupModeEndHdl) } -IMPL_LINK( SfxToolBoxControl, ClosePopupWindow, SfxPopupWindow *, pWindow ) +IMPL_LINK_TYPED( SfxToolBoxControl, ClosePopupWindow, SfxPopupWindow *, pWindow, void ) { if ( pWindow == pImpl->mpFloatingWindow ) pImpl->mpFloatingWindow = 0; else pImpl->mpPopupWindow = 0; - - return 1; } diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx index e4f64a5..72f9857 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -246,7 +246,7 @@ class SmViewShell: public SfxViewShell bool bPasteState; - DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* ); + DECL_LINK_TYPED( DialogClosedHdl, sfx2::FileDialogHelper*, void ); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; /** Used to determine whether insertions using SID_INSERTSYMBOL and SID_INSERTCOMMAND diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index f9bb00c..84b9ab2 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -2011,7 +2011,7 @@ void SmViewShell::Activate( bool bIsMDIActivate ) } } -IMPL_LINK( SmViewShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) +IMPL_LINK_TYPED( SmViewShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, void ) { assert(_pFileDlg && "SmViewShell::DialogClosedHdl(): no file dialog"); assert(pImpl->pDocInserter && "ScDocShell::DialogClosedHdl(): no document inserter"); @@ -2039,7 +2039,6 @@ IMPL_LINK( SmViewShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) pImpl->pRequest->SetReturnValue( SfxBoolItem( pImpl->pRequest->GetSlot(), true ) ); pImpl->pRequest->Done(); - return 0; } void SmViewShell::Notify( SfxBroadcaster& , const SfxHint& rHint ) diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 6df748b..cd7114f 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -609,7 +609,7 @@ public: void ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem ); long InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion ); - DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper * ); + DECL_LINK_TYPED( DialogClosedHdl, sfx2::FileDialogHelper *, void ); // status methods for clipboard. // Status changes now notified from the clipboard. diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 6d02cd3..711462e 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1331,7 +1331,7 @@ IMPL_LINK( SwEditRegionDlg, ConditionEditHdl, Edit *, pEdit ) return 0; } -IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg ) +IMPL_LINK_TYPED( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg, void ) { OUString sFileName, sFilterName, sPassword; if ( _pFileDlg->GetError() == ERRCODE_NONE ) @@ -1360,7 +1360,6 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg ) } Application::SetDefDialogParent( m_pOldDefDlgParent ); - return 0; } IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent *, pEvent ) @@ -1812,7 +1811,7 @@ IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox ) return 0; } -IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg ) +IMPL_LINK_TYPED( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg, void ) { if ( _pFileDlg->GetError() == ERRCODE_NONE ) { @@ -1833,7 +1832,6 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil m_sFilterName = m_sFilePasswd = aEmptyOUStr; Application::SetDefDialogParent( m_pOldDefDlgParent ); - return 0; } SwSectionFootnoteEndTabPage::SwSectionFootnoteEndTabPage( vcl::Window *pParent, diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index ae304ee..c193ba5 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -273,7 +273,7 @@ IMPL_LINK( SwJavaEditDialog, InsertFileHdl, PushButton *, pBtn ) return 0; } -IMPL_LINK_NOARG(SwJavaEditDialog, DlgClosedHdl) +IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, DlgClosedHdl, sfx2::FileDialogHelper *, void) { if ( pFileDlg->GetError() == ERRCODE_NONE ) { @@ -286,8 +286,6 @@ IMPL_LINK_NOARG(SwJavaEditDialog, DlgClosedHdl) } m_pUrlED->SetText( sFileName ); } - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index 607c8c1..8082a86 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -249,7 +249,7 @@ private: void InsertRegion( const SwGlblDocContent* _pContent, const com::sun::star::uno::Sequence< OUString >& _rFiles ); - DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* ); + DECL_LINK_TYPED( DialogClosedHdl, sfx2::FileDialogHelper*, void ); using SvTreeListBox::DoubleClickHdl; using SvTreeListBox::ExecuteDrop; diff --git a/sw/source/uibase/inc/javaedit.hxx b/sw/source/uibase/inc/javaedit.hxx index 071faaf..1958fce 100644 --- a/sw/source/uibase/inc/javaedit.hxx +++ b/sw/source/uibase/inc/javaedit.hxx @@ -61,7 +61,7 @@ private: DECL_LINK(NextHdl, void *); DECL_LINK(RadioButtonHdl, void *); DECL_LINK(InsertFileHdl, PushButton *); - DECL_LINK(DlgClosedHdl, void *); + DECL_LINK_TYPED(DlgClosedHdl, sfx2::FileDialogHelper *, void); virtual void Apply() SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index 885a423..4a33523 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -111,7 +111,7 @@ class SwNavigationPI : public vcl::Window, DECL_LINK_TYPED( ChangePageHdl, Idle*, void ); DECL_LINK( PageEditModifyHdl, void* ); DECL_LINK( PopupModeEndHdl, void * ); - DECL_LINK( ClosePopupWindow, SfxPopupWindow * ); + DECL_LINK_TYPED( ClosePopupWindow, SfxPopupWindow *, void ); void UsePage(SwWrtShell *); void MakeVisible(); diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx index c468710..d74e06a 100644 --- a/sw/source/uibase/inc/regionsw.hxx +++ b/sw/source/uibase/inc/regionsw.hxx @@ -122,7 +122,7 @@ class SwEditRegionDlg : public SfxModalDialog DECL_LINK(OptionsHdl, void *); DECL_LINK( FileNameHdl, Edit* ); DECL_LINK( DDEHdl, CheckBox* ); - DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* ); + DECL_LINK_TYPED( DlgClosedHdl, sfx2::FileDialogHelper*, void ); DECL_LINK( SubRegionEventHdl, VclWindowEvent * ); bool CheckPasswd(CheckBox* pBox = 0); @@ -177,7 +177,7 @@ class SwInsertSectionTabPage : public SfxTabPage DECL_LINK( UseFileHdl, CheckBox* ); DECL_LINK(FileSearchHdl, void *); DECL_LINK( DDEHdl, CheckBox* ); - DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* ); + DECL_LINK_TYPED( DlgClosedHdl, sfx2::FileDialogHelper*, void ); public: SwInsertSectionTabPage(vcl::Window *pParent, const SfxItemSet &rAttrSet); diff --git a/sw/source/uibase/inc/uivwimp.hxx b/sw/source/uibase/inc/uivwimp.hxx index 98d754b..16969ef 100644 --- a/sw/source/uibase/inc/uivwimp.hxx +++ b/sw/source/uibase/inc/uivwimp.hxx @@ -166,7 +166,7 @@ public: return m_bEditingPositionSet; } - void StartDocumentInserter( const OUString& rFactory, const Link<>& rEndDialogHdl ); + void StartDocumentInserter( const OUString& rFactory, const Link<sfx2::FileDialogHelper*,void>& rEndDialogHdl ); SfxMedium* CreateMedium(); void InitRequest( const SfxRequest& rRequest ); diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx index 54ceb1f..7bb1393 100644 --- a/sw/source/uibase/uiview/uivwimp.cxx +++ b/sw/source/uibase/uiview/uivwimp.cxx @@ -238,7 +238,7 @@ void SwView_Impl::AddTransferable(SwTransferable& rTransferable) rTransferable.m_refCount--; } -void SwView_Impl::StartDocumentInserter( const OUString& rFactory, const Link<>& rEndDialogHdl ) +void SwView_Impl::StartDocumentInserter( const OUString& rFactory, const Link<sfx2::FileDialogHelper*,void>& rEndDialogHdl ) { delete m_pDocInserter; m_pDocInserter = new ::sfx2::DocumentInserter( rFactory ); diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index e47987f..c993fbb 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -2439,48 +2439,47 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument) #endif } -IMPL_LINK( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) +IMPL_LINK_TYPED( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, void ) { - if ( ERRCODE_NONE == _pFileDlg->GetError() ) + if ( ERRCODE_NONE != _pFileDlg->GetError() ) + return; + + SfxMedium* pMed = m_pViewImpl->CreateMedium(); + if ( !pMed ) + return; + + const sal_uInt16 nSlot = m_pViewImpl->GetRequest()->GetSlot(); + long nFound = InsertMedium( nSlot, pMed, m_pViewImpl->GetParam() ); + + if ( SID_INSERTDOC == nSlot ) { - SfxMedium* pMed = m_pViewImpl->CreateMedium(); - if ( pMed ) + if ( m_pViewImpl->GetParam() == 0 ) + { + m_pViewImpl->GetRequest()->SetReturnValue( SfxBoolItem( nSlot, nFound != -1 ) ); + m_pViewImpl->GetRequest()->Ignore(); + } + else { - const sal_uInt16 nSlot = m_pViewImpl->GetRequest()->GetSlot(); - long nFound = InsertMedium( nSlot, pMed, m_pViewImpl->GetParam() ); + m_pViewImpl->GetRequest()->SetReturnValue( SfxBoolItem( nSlot, nFound != -1 ) ); + m_pViewImpl->GetRequest()->Done(); + } + } + else if ( SID_DOCUMENT_COMPARE == nSlot || SID_DOCUMENT_MERGE == nSlot ) + { + m_pViewImpl->GetRequest()->SetReturnValue( SfxInt32Item( nSlot, nFound ) ); - if ( SID_INSERTDOC == nSlot ) - { - if ( m_pViewImpl->GetParam() == 0 ) - { - m_pViewImpl->GetRequest()->SetReturnValue( SfxBoolItem( nSlot, nFound != -1 ) ); - m_pViewImpl->GetRequest()->Ignore(); - } - else - { - m_pViewImpl->GetRequest()->SetReturnValue( SfxBoolItem( nSlot, nFound != -1 ) ); - m_pViewImpl->GetRequest()->Done(); - } - } - else if ( SID_DOCUMENT_COMPARE == nSlot || SID_DOCUMENT_MERGE == nSlot ) - { - m_pViewImpl->GetRequest()->SetReturnValue( SfxInt32Item( nSlot, nFound ) ); + if ( nFound > 0 ) // show Redline browser + { + SfxViewFrame* pVFrame = GetViewFrame(); + pVFrame->ShowChildWindow(FN_REDLINE_ACCEPT); - if ( nFound > 0 ) // show Redline browser - { - SfxViewFrame* pVFrame = GetViewFrame(); - pVFrame->ShowChildWindow(FN_REDLINE_ACCEPT); - - // re-initialize Redline dialog - sal_uInt16 nId = SwRedlineAcceptChild::GetChildWindowId(); - SwRedlineAcceptChild* pRed = static_cast<SwRedlineAcceptChild*>(pVFrame->GetChildWindow( nId )); - if ( pRed ) - pRed->ReInitDlg( GetDocShell() ); - } - } + // re-initialize Redline dialog + sal_uInt16 nId = SwRedlineAcceptChild::GetChildWindowId(); + SwRedlineAcceptChild* pRed = static_cast<SwRedlineAcceptChild*>(pVFrame->GetChildWindow( nId )); + if ( pRed ) + pRed->ReInitDlg( GetDocShell() ); } } - return 0; } void SwView::ExecuteScan( SfxRequest& rReq ) diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 8b2c4d3..c8c9e0a 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -1360,32 +1360,31 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen } } -IMPL_LINK( SwGlobalTree, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) +IMPL_LINK_TYPED( SwGlobalTree, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, void ) { Application::SetDefDialogParent( pDefParentWin ); - if ( ERRCODE_NONE == _pFileDlg->GetError() ) + if ( ERRCODE_NONE != _pFileDlg->GetError() ) + return; + + boost::scoped_ptr<SfxMediumList> pMedList(pDocInserter->CreateMediumList()); + if ( pMedList ) { - boost::scoped_ptr<SfxMediumList> pMedList(pDocInserter->CreateMediumList()); - if ( pMedList ) + Sequence< OUString >aFileNames( pMedList->size() ); + OUString* pFileNames = aFileNames.getArray(); + sal_Int32 nPos = 0; + for ( size_t i = 0, n = pMedList->size(); i < n; ++i ) { - Sequence< OUString >aFileNames( pMedList->size() ); - OUString* pFileNames = aFileNames.getArray(); - sal_Int32 nPos = 0; - for ( size_t i = 0, n = pMedList->size(); i < n; ++i ) - { - SfxMedium* pMed = pMedList->at( i ); - OUString sFileName = pMed->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); - sFileName += OUString(sfx2::cTokenSeparator); - sFileName += pMed->GetFilter()->GetFilterName(); - sFileName += OUString(sfx2::cTokenSeparator); - pFileNames[nPos++] = sFileName; - } - pMedList.reset(); - InsertRegion( pDocContent, aFileNames ); - DELETEZ( pDocContent ); + SfxMedium* pMed = pMedList->at( i ); + OUString sFileName = pMed->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); + sFileName += OUString(sfx2::cTokenSeparator); + sFileName += pMed->GetFilter()->GetFilterName(); + sFileName += OUString(sfx2::cTokenSeparator); + pFileNames[nPos++] = sFileName; } + pMedList.reset(); + InsertRegion( pDocContent, aFileNames ); + DELETEZ( pDocContent ); } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 3fdbaa2..54b3323 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -908,14 +908,12 @@ IMPL_LINK_NOARG(SwNavigationPI, PopupModeEndHdl) return 1; } -IMPL_LINK( SwNavigationPI, ClosePopupWindow, SfxPopupWindow *, pWindow ) +IMPL_LINK_TYPED( SwNavigationPI, ClosePopupWindow, SfxPopupWindow *, pWindow, void ) { if ( pWindow == pFloatingWindow ) pFloatingWindow = 0; else pPopupWindow = 0; - - return 1; } void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits