summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-05-09 21:29:42 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-05-10 11:25:45 +0200
commit3ae4264a0db7f725abc33779ec9b11a45e17e279 (patch)
tree0806831b04042c0f2f5bc07dae313959772a0b5c
parent65d999d2bc0ace788f0d3fc1abdfe1ce6ccd012a (diff)
Replace IMPL_STATIC_LINK[_TYPED] with more useful variants
Change-Id: Iee6d0493172b7b776ac8c5b05f675cd28091f8b4
-rw-r--r--include/sfx2/fcontnr.hxx2
-rw-r--r--sfx2/source/appl/fileobj.cxx42
-rw-r--r--sfx2/source/appl/fileobj.hxx4
-rw-r--r--sfx2/source/appl/impldde.cxx11
-rw-r--r--sfx2/source/appl/shutdownicon.cxx14
-rw-r--r--sfx2/source/appl/shutdownicon.hxx3
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx4
-rw-r--r--sfx2/source/dialog/tplcitem.cxx10
-rw-r--r--sfx2/source/inc/tplcitem.hxx3
9 files changed, 45 insertions, 48 deletions
diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx
index 4ff4e7508c40..c629e817e75b 100644
--- a/include/sfx2/fcontnr.hxx
+++ b/include/sfx2/fcontnr.hxx
@@ -108,7 +108,7 @@ public:
~SfxFilterMatcher();
SAL_DLLPRIVATE static bool IsFilterInstalled_Impl( const SfxFilter* pFilter );
- DECL_DLLPRIVATE_STATIC_LINK_TYPED( SfxFilterMatcher, MaybeFileHdl_Impl, OUString*, bool );
+ DECL_DLLPRIVATE_LINK_TYPED( MaybeFileHdl_Impl, OUString*, bool );
sal_uInt32 GuessFilterIgnoringContent( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
sal_uInt32 GuessFilter( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index deaedf5876f6..5068ccc44c87 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -463,45 +463,45 @@ void SvFileObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pLink, const Li
}
}
-IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
+IMPL_LINK_NOARG( SvFileObject, LoadGrfReady_Impl )
{
// When we come form here there it can not be an error no more.
- pThis->bLoadError = false;
- pThis->bWaitForData = false;
- pThis->bInCallDownload = false;
+ bLoadError = false;
+ bWaitForData = false;
+ bInCallDownload = false;
- if( !pThis->bInNewData && !pThis->bDataReady )
+ if( !bInNewData && !bDataReady )
{
// Graphic is finished, also send DataChanged from Status change
- pThis->bDataReady = true;
- pThis->SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_OK );
+ bDataReady = true;
+ SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_OK );
// and then send the data again
- pThis->NotifyDataChanged();
+ NotifyDataChanged();
}
- if( pThis->bDataReady )
+ if( bDataReady )
{
- pThis->bLoadAgain = true;
- if( pThis->xMed.Is() )
+ bLoadAgain = true;
+ if( xMed.Is() )
{
- pThis->xMed->SetDoneLink( Link<>() );
- pThis->pDelMed = new SfxMediumRef(pThis->xMed);
- pThis->nPostUserEventId = Application::PostUserEvent(
- LINK( pThis, SvFileObject, DelMedium_Impl ),
- pThis->pDelMed);
- pThis->xMed.Clear();
+ xMed->SetDoneLink( Link<>() );
+ pDelMed = new SfxMediumRef(xMed);
+ nPostUserEventId = Application::PostUserEvent(
+ LINK( this, SvFileObject, DelMedium_Impl ),
+ pDelMed);
+ xMed.Clear();
}
}
return 0;
}
-IMPL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, pDelMed )
+IMPL_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, pDelMed )
{
- pThis->nPostUserEventId = 0;
- assert(pThis->pDelMed == pDelMed);
- pThis->pDelMed = NULL;
+ nPostUserEventId = 0;
+ assert(pDelMed == pDelMed);
+ pDelMed = NULL;
delete pDelMed;
return 0;
}
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index 7e0c72bb56eb..3b96e32a8a6d 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -54,8 +54,8 @@ class SvFileObject : public sfx2::SvLinkSource
bool LoadFile_Impl();
void SendStateChg_Impl( sfx2::LinkManager::LinkState nState );
- DECL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef* );
- DECL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void* );
+ DECL_LINK( DelMedium_Impl, SfxMediumRef* );
+ DECL_LINK( LoadGrfReady_Impl, void* );
DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
protected:
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 2d375fa22109..4eb4e65cd373 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -62,7 +62,7 @@ class SvDDELinkEditDialog : public ModalDialog
VclPtr<Edit> m_pEdDdeItem;
VclPtr<OKButton> m_pOKButton;
- DECL_STATIC_LINK( SvDDELinkEditDialog, EditHdl_Impl, Edit* );
+ DECL_LINK( EditHdl_Impl, Edit* );
public:
SvDDELinkEditDialog( vcl::Window* pParent, SvBaseLink* );
virtual ~SvDDELinkEditDialog();
@@ -113,12 +113,11 @@ OUString SvDDELinkEditDialog::GetCmd() const
return sRet;
}
-IMPL_STATIC_LINK( SvDDELinkEditDialog, EditHdl_Impl, Edit *, pEdit )
+IMPL_LINK( SvDDELinkEditDialog, EditHdl_Impl, Edit *, )
{
- (void)pEdit; // unused variable
- pThis->m_pOKButton->Enable( !pThis->m_pEdDdeApp->GetText().isEmpty() &&
- !pThis->m_pEdDdeTopic->GetText().isEmpty() &&
- !pThis->m_pEdDdeItem->GetText().isEmpty() );
+ m_pOKButton->Enable( !m_pEdDdeApp->GetText().isEmpty() &&
+ !m_pEdDdeTopic->GetText().isEmpty() &&
+ !m_pEdDdeItem->GetText().isEmpty() );
return 0;
}
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 6e573e5a3391..e2082c236251 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -364,14 +364,14 @@ void ShutdownIcon::StartFileDialog()
-IMPL_STATIC_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, EMPTYARG )
+IMPL_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, EMPTYARG )
{
- DBG_ASSERT( pThis->m_pFileDlg, "ShutdownIcon, DialogClosedHdl_Impl(): no file dialog" );
+ DBG_ASSERT( m_pFileDlg, "ShutdownIcon, DialogClosedHdl_Impl(): no file dialog" );
// use constructor for filling up filters automatically!
- if ( ERRCODE_NONE == pThis->m_pFileDlg->GetError() )
+ if ( ERRCODE_NONE == m_pFileDlg->GetError() )
{
- ::com::sun::star::uno::Reference< XFilePicker > xPicker = pThis->m_pFileDlg->GetFilePicker();
+ ::com::sun::star::uno::Reference< XFilePicker > xPicker = m_pFileDlg->GetFilePicker();
try
{
@@ -404,7 +404,7 @@ IMPL_STATIC_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, EMPTYAR
// use the filedlghelper to get the current filter name,
// because it removes the extensions before you get the filter name.
- OUString aFilterName( pThis->m_pFileDlg->GetCurrentFilter() );
+ OUString aFilterName( m_pFileDlg->GetCurrentFilter() );
if ( xPickerControls.is() )
{
@@ -497,8 +497,8 @@ IMPL_STATIC_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, EMPTYAR
// the settings.
if ( SvtMiscOptions().UseSystemFileDialog() )
{
- delete pThis->m_pFileDlg;
- pThis->m_pFileDlg = NULL;
+ delete m_pFileDlg;
+ m_pFileDlg = NULL;
}
#endif
diff --git a/sfx2/source/appl/shutdownicon.hxx b/sfx2/source/appl/shutdownicon.hxx
index 71eeb09e099b..9e9db7a5d35d 100644
--- a/sfx2/source/appl/shutdownicon.hxx
+++ b/sfx2/source/appl/shutdownicon.hxx
@@ -118,8 +118,7 @@ class SFX2_DLLPUBLIC ShutdownIcon : public ShutdownIconServiceBase
void StartFileDialog();
sfx2::FileDialogHelper* GetFileDialog() const { return m_pFileDlg; }
- DECL_STATIC_LINK(
- ShutdownIcon, DialogClosedHdl_Impl, sfx2::FileDialogHelper*);
+ DECL_LINK(DialogClosedHdl_Impl, sfx2::FileDialogHelper*);
static bool IsQuickstarterInstalled();
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 09f59473b5b6..713634552312 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -862,9 +862,9 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const OUString& rName,
return NULL;
}
-IMPL_STATIC_LINK_TYPED( SfxFilterMatcher, MaybeFileHdl_Impl, OUString*, pString, bool )
+IMPL_LINK_TYPED( SfxFilterMatcher, MaybeFileHdl_Impl, OUString*, pString, bool )
{
- const SfxFilter* pFilter = pThis->GetFilter4Extension( *pString, SfxFilterFlags::IMPORT );
+ const SfxFilter* pFilter = GetFilter4Extension( *pString, SfxFilterFlags::IMPORT );
if (pFilter && !pFilter->GetWildcard().Matches( OUString() ) &&
!pFilter->GetWildcard().Matches(OUString("*.*")) &&
!pFilter->GetWildcard().Matches(OUString('*'))
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index 8568ac54906a..0f715272b847 100644
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -154,19 +154,19 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta
}
}
-IMPL_STATIC_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl,
+IMPL_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl,
SfxTemplateControllerItem*, EMPTYARG)
{
- pThis->nUserEventId = 0;
+ nUserEventId = 0;
SfxBoolItem* pState = 0;
- switch(pThis->nWaterCanState)
+ switch(nWaterCanState)
{
case 0 :
case 1 :
- pState = new SfxBoolItem(SID_STYLE_WATERCAN, pThis->nWaterCanState != 0);
+ pState = new SfxBoolItem(SID_STYLE_WATERCAN, nWaterCanState != 0);
break;
}
- pThis->rTemplateDlg.SetWaterCanState(pState);
+ rTemplateDlg.SetWaterCanState(pState);
delete pState;
return 0;
}
diff --git a/sfx2/source/inc/tplcitem.hxx b/sfx2/source/inc/tplcitem.hxx
index b6a4d8def01c..57270b480b57 100644
--- a/sfx2/source/inc/tplcitem.hxx
+++ b/sfx2/source/inc/tplcitem.hxx
@@ -29,8 +29,7 @@ class SfxTemplateControllerItem : public SfxControllerItem {
sal_uInt8 nWaterCanState;
ImplSVEvent* nUserEventId;
- DECL_STATIC_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl,
- SfxTemplateControllerItem*);
+ DECL_LINK(SetWaterCanStateHdl_Impl, SfxTemplateControllerItem*);
protected:
virtual void StateChanged(sal_uInt16, SfxItemState, const SfxPoolItem* pState) SAL_OVERRIDE;