summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-13 11:10:38 +0200
committerNoel Grandin <noel@peralex.com>2015-10-14 09:30:20 +0200
commitb4da5037e0cc2952446b2138d515e0c762172b25 (patch)
tree061c81fb860f5552ce18051d7eb86f4f5324da61 /cui
parent73ceffe5c247dcffa7653e043530e58e4eb73fdf (diff)
convert Link<> to typed
Change-Id: I1876f327607e0e23292950741df348d4ec31fde1
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx9
-rw-r--r--cui/source/factory/dlgfact.cxx12
-rw-r--r--cui/source/factory/dlgfact.hxx6
-rw-r--r--cui/source/inc/cuigaldlg.hxx6
4 files changed, 15 insertions, 18 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index f820a620f94a..3ed9f44f0e6a 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -267,7 +267,7 @@ short SearchProgress::Execute()
-void SearchProgress::StartExecuteModal( const Link<>& rEndDialogHdl )
+void SearchProgress::StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl )
{
assert(!maSearchThread.is());
maSearchThread = new SearchThread(
@@ -439,7 +439,7 @@ short TakeProgress::Execute()
-void TakeProgress::StartExecuteModal( const Link<>& rEndDialogHdl )
+void TakeProgress::StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl )
{
assert(!maTakeThread.is());
maTakeThread = new TakeThread(
@@ -1079,7 +1079,7 @@ void TPGalleryThemeProperties::TakeFiles()
pTakeProgress->Update();
pTakeProgress->StartExecuteModal(
- Link<>() /* no postprocessing needed, pTakeProgress
+ Link<Dialog&,void>() /* no postprocessing needed, pTakeProgress
will be disposed in TakeProgress::CleanupHdl */ );
}
}
@@ -1224,7 +1224,7 @@ IMPL_LINK_NOARG_TYPED(TPGalleryThemeProperties, PreviewTimerHdl, Timer *, void)
-IMPL_LINK_NOARG(TPGalleryThemeProperties, EndSearchProgressHdl)
+IMPL_LINK_NOARG_TYPED(TPGalleryThemeProperties, EndSearchProgressHdl, Dialog&, void)
{
if( !aFoundList.empty() )
{
@@ -1240,7 +1240,6 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, EndSearchProgressHdl)
m_pCbxPreview->Disable();
bEntriesFound = false;
}
- return 0L;
}
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 8069f073f5d2..91336b4bf68e 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -149,7 +149,7 @@ VclAbstractDialog2_Impl::~VclAbstractDialog2_Impl()
}
// virtual
-void VclAbstractDialog2_Impl::StartExecuteModal( const Link<>& rEndDialogHdl )
+void VclAbstractDialog2_Impl::StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl )
{
m_aEndDlgHdl = rEndDialogHdl;
m_pDlg->StartExecuteModal(
@@ -162,17 +162,15 @@ long VclAbstractDialog2_Impl::GetResult()
return m_pDlg->GetResult();
}
-IMPL_LINK( VclAbstractDialog2_Impl, EndDialogHdl, Dialog*, pDlg )
+IMPL_LINK_TYPED( VclAbstractDialog2_Impl, EndDialogHdl, Dialog&, rDlg, void )
{
- if ( pDlg != m_pDlg )
+ if ( &rDlg != m_pDlg )
{
SAL_WARN( "cui.factory", "VclAbstractDialog2_Impl::EndDialogHdl(): wrong dialog" );
}
- m_aEndDlgHdl.Call( this );
- m_aEndDlgHdl = Link<>();
-
- return 0L;
+ m_aEndDlgHdl.Call( *m_pDlg );
+ m_aEndDlgHdl = Link<Dialog&,void>();
}
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 1bb596dd21d8..39b645d1d58f 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -78,14 +78,14 @@ short Class::Execute() \
class VclAbstractDialog2_Impl : public VclAbstractDialog2
{
ScopedVclPtr<Dialog> m_pDlg;
- Link<> m_aEndDlgHdl;
+ Link<Dialog&,void> m_aEndDlgHdl;
public:
explicit VclAbstractDialog2_Impl( Dialog* p ) : m_pDlg( p ) {}
virtual ~VclAbstractDialog2_Impl();
- virtual void StartExecuteModal( const Link<>& rEndDialogHdl ) override;
+ virtual void StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl ) override;
virtual long GetResult() override;
private:
- DECL_LINK( EndDialogHdl, Dialog* );
+ DECL_LINK_TYPED( EndDialogHdl, Dialog&, void );
};
class CuiVclAbstractDialog_Impl : public VclAbstractDialog
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 93594cab285d..b777a3632aa6 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -99,7 +99,7 @@ public:
DECL_LINK_TYPED( CleanUpHdl, void*, void );
virtual short Execute() override;
- virtual void StartExecuteModal( const Link<>& rEndDialogHdl ) override;
+ virtual void StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl ) override;
void SetFileType( const OUString& rType ) { m_pFtSearchType->SetText( rType ); }
void SetDirectory( const INetURLObject& rURL ) { m_pFtSearchDir->SetText( GetReducedString( rURL, 30 ) ); }
};
@@ -146,7 +146,7 @@ public:
void SetFile( const INetURLObject& rURL ) { m_pFtTakeFile->SetText( GetReducedString( rURL, 30 ) ); }
virtual short Execute() override;
- virtual void StartExecuteModal( const Link<>& rEndDialogHdl ) override;
+ virtual void StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl ) override;
};
class ActualizeProgress : public ModalDialog
@@ -286,7 +286,7 @@ class TPGalleryThemeProperties : public SfxTabPage
DECL_LINK( SelectFileTypeHdl, void* );
DECL_LINK_TYPED( DClickFoundHdl, ListBox&, void );
DECL_LINK_TYPED( PreviewTimerHdl, Timer*, void );
- DECL_LINK(EndSearchProgressHdl, void *);
+ DECL_LINK_TYPED( EndSearchProgressHdl, Dialog&, void );
DECL_LINK_TYPED( DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void );
public: