summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-09-22 12:26:29 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-09-22 18:54:52 +0000
commita19f981ea1c31a9a3af4a9368dc50f045701a047 (patch)
tree12f2c8415eab22c334a2722b5472a62d1c8abbff
parentc439d55042c5815b57987238b0e074869004196d (diff)
convert Link<> to typed
Change-Id: I684a72cc3eeff0caf27132ff641f0d3b20ff7c08 Reviewed-on: https://gerrit.libreoffice.org/18770 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--editeng/source/editeng/editview.cxx10
-rw-r--r--editeng/source/outliner/outlvw.cxx2
-rw-r--r--include/editeng/editview.hxx2
-rw-r--r--include/editeng/outliner.hxx2
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx7
-rw-r--r--sd/source/ui/annotations/annotationwindow.hxx2
-rw-r--r--sd/source/ui/docshell/docshell.cxx5
-rw-r--r--sd/source/ui/inc/DrawDocShell.hxx4
-rw-r--r--sd/source/ui/view/drviews4.cxx2
-rw-r--r--sd/source/ui/view/outlnvsh.cxx2
-rw-r--r--sw/inc/view.hxx2
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx7
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.hxx2
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx7
15 files changed, 27 insertions, 31 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index c9f1e42f8b77..57ec9945eded 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -760,7 +760,7 @@ bool EditView::IsWrongSpelledWordAtPos( const Point& rPosPixel, bool bMarkIfWron
return pImpEditView->IsWrongSpelledWord( aPaM , bMarkIfWrong );
}
-void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<>* pCallBack )
+void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo&,void>* pCallBack )
{
Point aPos ( pImpEditView->GetWindow()->PixelToLogic( rPosPixel ) );
@@ -938,7 +938,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<>* pCallBack )
if ( pCallBack )
{
SpellCallbackInfo aInf( SpellCallbackCommand::IGNOREWORD, aWord );
- pCallBack->Call( &aInf );
+ pCallBack->Call( aInf );
}
SetSelection( aOldSel );
}
@@ -967,7 +967,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<>* pCallBack )
if ( pCallBack )
{
SpellCallbackInfo aInf( ( nId == MN_WORDLANGUAGE ) ? SpellCallbackCommand::WORDLANGUAGE : SpellCallbackCommand::PARALANGUAGE, nLangToUse );
- pCallBack->Call( &aInf );
+ pCallBack->Call( aInf );
}
SetSelection( aOldSel );
}
@@ -986,7 +986,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<>* pCallBack )
else
{
SpellCallbackInfo aInf( SpellCallbackCommand::STARTSPELLDLG, OUString() );
- pCallBack->Call( &aInf );
+ pCallBack->Call( aInf );
}
}
else if ( nId >= MN_DICTSTART || nId == MN_INSERT_SINGLE )
@@ -1014,7 +1014,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<>* pCallBack )
if ( pCallBack )
{
SpellCallbackInfo aInf( SpellCallbackCommand::ADDTODICTIONARY, aSelected );
- pCallBack->Call( &aInf );
+ pCallBack->Call( aInf );
}
SetSelection( aOldSel );
}
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index edf617fcc503..966efed18366 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1385,7 +1385,7 @@ bool OutlinerView::IsWrongSpelledWordAtPos( const Point& rPosPixel, bool bMarkIf
return pEditView->IsWrongSpelledWordAtPos( rPosPixel, bMarkIfWrong );
}
-void OutlinerView::ExecuteSpellPopup( const Point& rPosPixel, Link<>* pStartDlg )
+void OutlinerView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo&,void>* pStartDlg )
{
pEditView->ExecuteSpellPopup( rPosPixel, pStartDlg );
}
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 0467638f2f15..210e816b2132 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -217,7 +217,7 @@ public:
bool IsCursorAtWrongSpelledWord( bool bMarkIfWrong = false );
bool IsWrongSpelledWordAtPos( const Point& rPosPixel, bool bMarkIfWrong = false );
- void ExecuteSpellPopup( const Point& rPosPixel, Link<>* pCallBack = 0 );
+ void ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo&,void>* pCallBack = 0 );
void InsertField( const SvxFieldItem& rFld );
const SvxFieldItem* GetFieldUnderMousePointer() const;
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 16ab77cd9f7c..c7cc67626d4c 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -368,7 +368,7 @@ public:
bool IsCursorAtWrongSpelledWord( bool bMarkIfWrong = false );
bool IsWrongSpelledWordAtPos( const Point& rPosPixel, bool bMarkIfWrong = false );
- void ExecuteSpellPopup( const Point& rPosPixel, Link<>* pCallBack = 0 );
+ void ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo&,void>* pCallBack = 0 );
void SetInvalidateMore( sal_uInt16 nPixel );
sal_uInt16 GetInvalidateMore() const;
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 5bcbac5d941f..b9af88a0851e 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -201,7 +201,7 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou
bool bListValButton:1;
DECL_LINK_TYPED( PopupModeEndHdl, FloatingWindow*, void );
- DECL_LINK( PopupSpellingHdl, SpellCallbackInfo* );
+ DECL_LINK_TYPED( PopupSpellingHdl, SpellCallbackInfo&, void );
bool TestMouse( const MouseEvent& rMEvt, bool bAction );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index d8bbe92c54f7..cf5d7b6b2fe2 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -584,11 +584,10 @@ IMPL_LINK_NOARG_TYPED(ScGridWindow, PopupModeEndHdl, FloatingWindow*, void)
GrabFocus();
}
-IMPL_LINK( ScGridWindow, PopupSpellingHdl, SpellCallbackInfo*, pInfo )
+IMPL_LINK_TYPED( ScGridWindow, PopupSpellingHdl, SpellCallbackInfo&, rInfo, void )
{
- if( pInfo->nCommand == SpellCallbackCommand::STARTSPELLDLG )
+ if( rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG )
pViewData->GetDispatcher().Execute( SID_SPELL_DIALOG, SfxCallMode::ASYNCHRON );
- return 0;
}
void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, bool bHasSelection, const OUString& rStr )
@@ -3180,7 +3179,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
if (pHdl)
pHdl->SetModified();
- Link<> aLink = LINK( this, ScGridWindow, PopupSpellingHdl );
+ Link<SpellCallbackInfo&,void> aLink = LINK( this, ScGridWindow, PopupSpellingHdl );
pEditView->ExecuteSpellPopup( aMenuPos, &aLink );
bDone = true;
diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx
index 640f3d4086c2..de129e1bab4d 100644
--- a/sd/source/ui/annotations/annotationwindow.hxx
+++ b/sd/source/ui/annotations/annotationwindow.hxx
@@ -135,7 +135,7 @@ class AnnotationWindow : public FloatingWindow
void ToggleInsMode();
- DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
+ DECL_LINK_TYPED( OnlineSpellCallback, SpellCallbackInfo&, void );
virtual void Deactivate() SAL_OVERRIDE;
virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) SAL_OVERRIDE;
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index ca32796f60db..b936ca7c0db9 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -421,7 +421,7 @@ void DrawDocShell::SetModified( bool bSet /* = true */ )
*/
// ExecuteSpellPopup now handled by DrawDocShell. This is necessary
// to get hands on the outliner and the text object.
-IMPL_LINK(DrawDocShell, OnlineSpellCallback, SpellCallbackInfo*, pInfo)
+IMPL_LINK_TYPED(DrawDocShell, OnlineSpellCallback, SpellCallbackInfo&, rInfo, void)
{
SdrObject* pObj = NULL;
SdrOutliner* pOutl = NULL;
@@ -432,8 +432,7 @@ IMPL_LINK(DrawDocShell, OnlineSpellCallback, SpellCallbackInfo*, pInfo)
pObj = GetViewShell()->GetView()->GetTextEditObject();
}
- mpDoc->ImpOnlineSpellCallback(pInfo, pObj, pOutl);
- return 0;
+ mpDoc->ImpOnlineSpellCallback(&rInfo, pObj, pOutl);
}
void DrawDocShell::ClearUndoBuffer()
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index 5b82479ebf28..6ba5aee41553 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -199,8 +199,8 @@ public:
DECL_LINK( RenameSlideHdl, AbstractSvxNameDialog* );
- // ExecuteSpellPopup now handled by DrawDocShell
- DECL_LINK( OnlineSpellCallback, SpellCallbackInfo* );
+ // ExecuteSpellPopup now handled by DrawDocShell
+ DECL_LINK_TYPED( OnlineSpellCallback, SpellCallbackInfo&, void );
void ClearUndoBuffer();
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 43dab6be0282..f02fefcf6955 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -609,7 +609,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
( !rCEvt.IsMouseEvent() && pOutlinerView->IsCursorAtWrongSpelledWord() ) )
{
// Popup for Online-Spelling now handled by DrawDocShell
- Link<> aLink = LINK(GetDocSh(), DrawDocShell, OnlineSpellCallback);
+ Link<SpellCallbackInfo&,void> aLink = LINK(GetDocSh(), DrawDocShell, OnlineSpellCallback);
if( !rCEvt.IsMouseEvent() )
{
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index a690de1acc08..4f2c9f67e8ce 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1374,7 +1374,7 @@ void OutlineViewShell::Command( const CommandEvent& rCEvt, ::sd::Window* pWin )
if (pOLV && pOLV->IsWrongSpelledWordAtPos(aPos))
{
// Popup for Online-Spelling now handled by DrawDocShell
- Link<> aLink = LINK(GetDocSh(), DrawDocShell, OnlineSpellCallback);
+ Link<SpellCallbackInfo&,void> aLink = LINK(GetDocSh(), DrawDocShell, OnlineSpellCallback);
pOLV->ExecuteSpellPopup(aPos, &aLink);
}
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index d4227e2598fb..8a2d5b777c36 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -433,7 +433,7 @@ public:
void ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
bool ExecSmartTagPopup( const Point& rPt );
- DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
+ DECL_LINK_TYPED( OnlineSpellCallback, SpellCallbackInfo&, void );
bool ExecDrwTextSpellPopup(const Point& rPt);
void SetTabColFromDocPos( const Point &rPt ) { m_aTabColFromDocPos = rPt; }
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index 1393fba85a25..d9d84f1ece05 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -317,13 +317,12 @@ void SidebarTextControl::MouseButtonUp( const MouseEvent& rMEvt )
GetTextView()->MouseButtonUp( rMEvt );
}
-IMPL_LINK( SidebarTextControl, OnlineSpellCallback, SpellCallbackInfo*, pInfo )
+IMPL_LINK_TYPED( SidebarTextControl, OnlineSpellCallback, SpellCallbackInfo&, rInfo, void )
{
- if ( pInfo->nCommand == SpellCallbackCommand::STARTSPELLDLG )
+ if ( rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG )
{
mrDocView.GetViewFrame()->GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON);
}
- return 0;
}
IMPL_LINK_TYPED( SidebarTextControl, Select, Menu*, pSelMenu, bool )
@@ -340,7 +339,7 @@ void SidebarTextControl::Command( const CommandEvent& rCEvt )
GetTextView() &&
GetTextView()->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(), true ))
{
- Link<> aLink = LINK(this, SidebarTextControl, OnlineSpellCallback);
+ Link<SpellCallbackInfo&,void> aLink = LINK(this, SidebarTextControl, OnlineSpellCallback);
GetTextView()->ExecuteSpellPopup(rCEvt.GetMousePosPixel(),&aLink);
}
else
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.hxx b/sw/source/uibase/docvw/SidebarTxtControl.hxx
index 74745852d623..99992b432e89 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.hxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.hxx
@@ -64,7 +64,7 @@ class SidebarTextControl : public Control
OutlinerView* GetTextView() const;
- DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
+ DECL_LINK_TYPED( OnlineSpellCallback, SpellCallbackInfo&, void );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE;
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index d342512ac89f..5001cee6fcf2 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -725,11 +725,10 @@ bool SwView::HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const
}
//#i87414# mod
-IMPL_LINK(SwView, OnlineSpellCallback, SpellCallbackInfo*, pInfo)
+IMPL_LINK_TYPED(SwView, OnlineSpellCallback, SpellCallbackInfo&, rInfo, void)
{
- if (pInfo->nCommand == SpellCallbackCommand::STARTSPELLDLG)
+ if (rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG)
GetViewFrame()->GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON);
- return 0;
}
bool SwView::ExecDrwTextSpellPopup(const Point& rPt)
@@ -742,7 +741,7 @@ bool SwView::ExecDrwTextSpellPopup(const Point& rPt)
if (pOLV->IsWrongSpelledWordAtPos( aPos ))
{
bRet = true;
- Link<> aLink = LINK(this, SwView, OnlineSpellCallback);
+ Link<SpellCallbackInfo&,void> aLink = LINK(this, SwView, OnlineSpellCallback);
pOLV->ExecuteSpellPopup( aPos,&aLink );
}
return bRet;