summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/editeng/editeng.cxx4
-rw-r--r--editeng/source/editeng/impedit.hxx10
-rw-r--r--editeng/source/editeng/impedit2.cxx8
-rw-r--r--editeng/source/outliner/outlin2.cxx2
-rw-r--r--editeng/source/outliner/outliner.cxx8
-rw-r--r--include/editeng/editeng.hxx8
-rw-r--r--include/editeng/outliner.hxx38
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx42
-rw-r--r--sc/source/ui/app/inputwin.cxx9
-rw-r--r--sc/source/ui/inc/AccessibleText.hxx4
-rw-r--r--sc/source/ui/inc/inputwin.hxx2
-rw-r--r--starmath/source/accessibility.cxx17
-rw-r--r--starmath/source/accessibility.hxx2
13 files changed, 68 insertions, 86 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 1efd13b63ec5..214552b29926 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1498,12 +1498,12 @@ void EditEngine::ShowParagraph( sal_Int32 nParagraph, bool bShow )
pImpEditEngine->ShowParagraph( nParagraph, bShow );
}
-void EditEngine::SetNotifyHdl( const Link<>& rLink )
+void EditEngine::SetNotifyHdl( const Link<EENotify&,void>& rLink )
{
pImpEditEngine->SetNotifyHdl( rLink );
}
-Link<> EditEngine::GetNotifyHdl() const
+Link<EENotify&,void> EditEngine::GetNotifyHdl() const
{
return pImpEditEngine->GetNotifyHdl();
}
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 04adb48ddb01..f495d0d6345e 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -479,8 +479,8 @@ private:
// If it is detected at one point that the StatusHdl has to be called, but
// this should not happen immediately (critical section):
Timer aStatusTimer;
- Link<EditStatus&, void> aStatusHdlLink;
- Link<> aNotifyHdl;
+ Link<EditStatus&,void> aStatusHdlLink;
+ Link<EENotify&,void> aNotifyHdl;
Link<> aImportHdl;
Link<> aBeginMovingParagraphsHdl;
Link<> aEndMovingParagraphsHdl;
@@ -836,10 +836,10 @@ public:
EditSelection* SelectParagraph( sal_Int32 nPara );
void SetStatusEventHdl( const Link<EditStatus&, void>& rLink ) { aStatusHdlLink = rLink; }
- Link<EditStatus&, void> GetStatusEventHdl() const { return aStatusHdlLink; }
+ Link<EditStatus&,void> GetStatusEventHdl() const { return aStatusHdlLink; }
- void SetNotifyHdl( const Link<>& rLink ) { aNotifyHdl = rLink; }
- Link<> GetNotifyHdl() const { return aNotifyHdl; }
+ void SetNotifyHdl( const Link<EENotify&,void>& rLink ) { aNotifyHdl = rLink; }
+ Link<EENotify&,void> GetNotifyHdl() const { return aNotifyHdl; }
void FormatAndUpdate( EditView* pCurView = 0 );
inline void IdleFormatAndUpdate( EditView* pCurView = 0 );
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 87507f61f0ca..96b2304d65df 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4328,7 +4328,7 @@ bool ImpEditEngine::DoVisualCursorTraveling( const ContentNode* )
void ImpEditEngine::CallNotify( EENotify& rNotify )
{
if ( !nBlockNotifications )
- GetNotifyHdl().Call( &rNotify );
+ GetNotifyHdl().Call( rNotify );
else
aNotifyCache.push_back(rNotify);
}
@@ -4342,7 +4342,7 @@ void ImpEditEngine::EnterBlockNotifications()
// client side
EENotify aNotify( EE_NOTIFY_BLOCKNOTIFICATION_START );
aNotify.pEditEngine = GetEditEnginePtr();
- GetNotifyHdl().Call( &aNotify );
+ GetNotifyHdl().Call( aNotify );
}
nBlockNotifications++;
@@ -4361,12 +4361,12 @@ void ImpEditEngine::LeaveBlockNotifications()
EENotify aNotify(aNotifyCache[0]);
// Remove from list before calling, maybe we enter LeaveBlockNotifications while calling the handler...
aNotifyCache.erase(aNotifyCache.begin());
- GetNotifyHdl().Call( &aNotify );
+ GetNotifyHdl().Call( aNotify );
}
EENotify aNotify( EE_NOTIFY_BLOCKNOTIFICATION_END );
aNotify.pEditEngine = GetEditEnginePtr();
- GetNotifyHdl().Call( &aNotify );
+ GetNotifyHdl().Call( aNotify );
}
}
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index e4e55ac968b0..805e65188e4b 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -125,7 +125,7 @@ void Outliner::SetNotifyHdl( const Link<>& rLink )
if ( rLink.IsSet() )
pEditEngine->SetNotifyHdl( LINK( this, Outliner, EditEngineNotifyHdl ) );
else
- pEditEngine->SetNotifyHdl( Link<>() );
+ pEditEngine->SetNotifyHdl( Link<EENotify&,void>() );
}
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 1694876416df..0e3105a182ed 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2015,14 +2015,12 @@ void Outliner::ImplBlockInsertionCallbacks( bool b )
}
}
-IMPL_LINK( Outliner, EditEngineNotifyHdl, EENotify*, pNotify )
+IMPL_LINK_TYPED( Outliner, EditEngineNotifyHdl, EENotify&, rNotify, void )
{
if ( !nBlockInsCallback )
- pEditEngine->aOutlinerNotifyHdl.Call( pNotify );
+ pEditEngine->aOutlinerNotifyHdl.Call( &rNotify );
else
- pEditEngine->aNotifyCache.push_back(*pNotify);
-
- return 0;
+ pEditEngine->aNotifyCache.push_back(rNotify);
}
/** sets a link that is called at the beginning of a drag operation at an edit view */
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index 8f2bc4a411de..5bdae2058805 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -366,11 +366,11 @@ public:
sal_uLong Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
sal_uLong Write( SvStream& rOutput, EETextFormat );
- void SetStatusEventHdl( const Link<EditStatus&, void>& rLink );
- Link<EditStatus&, void> GetStatusEventHdl() const;
+ void SetStatusEventHdl( const Link<EditStatus&,void>& rLink );
+ Link<EditStatus&,void> GetStatusEventHdl() const;
- void SetNotifyHdl( const Link<>& rLink );
- Link<> GetNotifyHdl() const;
+ void SetNotifyHdl( const Link<EENotify&,void>& rLink );
+ Link<EENotify&,void> GetNotifyHdl() const;
void SetImportHdl( const Link<>& rLink );
Link<> GetImportHdl() const;
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 8c60669628f8..99223e98b87f 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -615,25 +615,25 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
bool bStrippingPortions;
bool bPasting;
- sal_uLong nDummy;
-
- DECL_LINK( ParaVisibleStateChangedHdl, Paragraph* );
- DECL_LINK( BeginMovingParagraphsHdl, void* );
- DECL_LINK( EndMovingParagraphsHdl, MoveParagraphsInfo* );
- DECL_LINK( BeginPasteOrDropHdl, PasteOrDropInfos* );
- DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos* );
- DECL_LINK( EditEngineNotifyHdl, EENotify* );
- void ImplCheckParagraphs( sal_Int32 nStart, sal_Int32 nEnd );
- bool ImplHasNumberFormat( sal_Int32 nPara ) const;
- Size ImplGetBulletSize( sal_Int32 nPara );
- sal_uInt16 ImplGetNumbering( sal_Int32 nPara, const SvxNumberFormat* pParaFmt );
- void ImplCalcBulletText( sal_Int32 nPara, bool bRecalcLevel, bool bRecalcChildren );
- OUString ImplGetBulletText( sal_Int32 nPara );
- void ImplCheckNumBulletItem( sal_Int32 nPara );
- void ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, bool bCreateUndo, bool bUndoAction = false );
- void ImplSetLevelDependendStyleSheet( sal_Int32 nPara, SfxStyleSheet* pLevelStyle = NULL );
-
- void ImplBlockInsertionCallbacks( bool b );
+ sal_uLong nDummy;
+
+ DECL_LINK( ParaVisibleStateChangedHdl, Paragraph* );
+ DECL_LINK( BeginMovingParagraphsHdl, void* );
+ DECL_LINK( EndMovingParagraphsHdl, MoveParagraphsInfo* );
+ DECL_LINK( BeginPasteOrDropHdl, PasteOrDropInfos* );
+ DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos* );
+ DECL_LINK_TYPED( EditEngineNotifyHdl, EENotify&, void );
+ void ImplCheckParagraphs( sal_Int32 nStart, sal_Int32 nEnd );
+ bool ImplHasNumberFormat( sal_Int32 nPara ) const;
+ Size ImplGetBulletSize( sal_Int32 nPara );
+ sal_uInt16 ImplGetNumbering( sal_Int32 nPara, const SvxNumberFormat* pParaFmt );
+ void ImplCalcBulletText( sal_Int32 nPara, bool bRecalcLevel, bool bRecalcChildren );
+ OUString ImplGetBulletText( sal_Int32 nPara );
+ void ImplCheckNumBulletItem( sal_Int32 nPara );
+ void ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, bool bCreateUndo, bool bUndoAction = false );
+ void ImplSetLevelDependendStyleSheet( sal_Int32 nPara, SfxStyleSheet* pLevelStyle = NULL );
+
+ void ImplBlockInsertionCallbacks( bool b );
void ImpFilterIndents( sal_Int32 nFirstPara, sal_Int32 nLastPara );
bool ImpConvertEdtToOut( sal_Int32 nPara, EditView* pView = 0 );
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index a9add1cb7618..33d5a8e5a790 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -713,7 +713,7 @@ ScAccessibleCellTextData::ScAccessibleCellTextData(ScTabViewShell* pViewShell,
ScAccessibleCellTextData::~ScAccessibleCellTextData()
{
if (pEditEngine)
- pEditEngine->SetNotifyHdl(Link<>());
+ pEditEngine->SetNotifyHdl(Link<EENotify&,void>());
if (mpViewForwarder)
delete mpViewForwarder;
if (mpEditViewForwarder)
@@ -932,17 +932,12 @@ SvxEditViewForwarder* ScAccessibleCellTextData::GetEditViewForwarder( bool /* bC
return NULL;
}
-IMPL_LINK(ScAccessibleTextData, NotifyHdl, EENotify*, aNotify)
+IMPL_LINK_TYPED(ScAccessibleTextData, NotifyHdl, EENotify&, aNotify, void)
{
- if( aNotify )
- {
- ::std::unique_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( aNotify );
-
- if( aHint.get() )
- GetBroadcaster().Broadcast( *aHint.get() );
- }
+ ::std::unique_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( &aNotify );
- return 0;
+ if( aHint.get() )
+ GetBroadcaster().Broadcast( *aHint.get() );
}
ScDocShell* ScAccessibleCellTextData::GetDocShell(ScTabViewShell* pViewShell)
@@ -972,7 +967,7 @@ ScAccessibleEditObjectTextData::~ScAccessibleEditObjectTextData()
{
// If the object is cloned, do NOT set notify hdl.
if (mpEditEngine && !mbIsCloned)
- mpEditEngine->SetNotifyHdl(Link<>());
+ mpEditEngine->SetNotifyHdl(Link<EENotify&,void>());
if (mpViewForwarder)
delete mpViewForwarder;
if (mpEditViewForwarder)
@@ -1047,17 +1042,12 @@ SvxEditViewForwarder* ScAccessibleEditObjectTextData::GetEditViewForwarder( bool
return mpEditViewForwarder;
}
-IMPL_LINK(ScAccessibleEditObjectTextData, NotifyHdl, EENotify*, aNotify)
+IMPL_LINK_TYPED(ScAccessibleEditObjectTextData, NotifyHdl, EENotify&, rNotify, void)
{
- if( aNotify )
- {
- ::std::unique_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( aNotify );
-
- if( aHint.get() )
- GetBroadcaster().Broadcast( *aHint.get() );
- }
+ ::std::unique_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( &rNotify );
- return 0;
+ if( aHint.get() )
+ GetBroadcaster().Broadcast( *aHint.get() );
}
ScAccessibleEditLineTextData::ScAccessibleEditLineTextData(EditView* pEditView, vcl::Window* pWin)
@@ -1088,7 +1078,7 @@ ScAccessibleEditLineTextData::~ScAccessibleEditLineTextData()
// the NotifyHdl also has to be removed from the ScTextWnd's EditEngine
// (it's set in ScAccessibleEditLineTextData::GetTextForwarder, and mpEditEngine
// is reset there)
- pTxtWnd->GetEditView()->GetEditEngine()->SetNotifyHdl(Link<>());
+ pTxtWnd->GetEditView()->GetEditEngine()->SetNotifyHdl(Link<EENotify&,void>());
}
}
@@ -1183,7 +1173,7 @@ void ScAccessibleEditLineTextData::ResetEditMode()
if (mbEditEngineCreated && mpEditEngine)
delete mpEditEngine;
else if (pTxtWnd && pTxtWnd->GetEditView() && pTxtWnd->GetEditView()->GetEditEngine())
- pTxtWnd->GetEditView()->GetEditEngine()->SetNotifyHdl(Link<>());
+ pTxtWnd->GetEditView()->GetEditEngine()->SetNotifyHdl(Link<EENotify&,void>());
mpEditEngine = NULL;
DELETEZ(mpForwarder);
@@ -1236,7 +1226,7 @@ ScAccessiblePreviewCellTextData::ScAccessiblePreviewCellTextData(ScPreviewShell*
ScAccessiblePreviewCellTextData::~ScAccessiblePreviewCellTextData()
{
if (pEditEngine)
- pEditEngine->SetNotifyHdl(Link<>());
+ pEditEngine->SetNotifyHdl(Link<EENotify&,void>());
if (mpViewForwarder)
delete mpViewForwarder;
}
@@ -1314,7 +1304,7 @@ ScAccessiblePreviewHeaderCellTextData::ScAccessiblePreviewHeaderCellTextData(ScP
ScAccessiblePreviewHeaderCellTextData::~ScAccessiblePreviewHeaderCellTextData()
{
if (pEditEngine)
- pEditEngine->SetNotifyHdl(Link<>());
+ pEditEngine->SetNotifyHdl(Link<EENotify&,void>());
if (mpViewForwarder)
delete mpViewForwarder;
}
@@ -1432,7 +1422,7 @@ ScAccessibleHeaderTextData::~ScAccessibleHeaderTextData()
if (mpDocSh)
mpDocSh->GetDocument().RemoveUnoObject(*this);
if (mpEditEngine)
- mpEditEngine->SetNotifyHdl(Link<>());
+ mpEditEngine->SetNotifyHdl(Link<EENotify&,void>());
delete mpEditEngine;
delete mpForwarder;
}
@@ -1547,7 +1537,7 @@ ScAccessibleNoteTextData::~ScAccessibleNoteTextData()
if (mpDocSh)
mpDocSh->GetDocument().RemoveUnoObject(*this);
if (mpEditEngine)
- mpEditEngine->SetNotifyHdl(Link<>());
+ mpEditEngine->SetNotifyHdl(Link<EENotify&,void>());
delete mpEditEngine;
delete mpForwarder;
}
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 4ca59a7cd746..6293db35be83 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1244,17 +1244,16 @@ IMPL_LINK(ScMultiTextWnd, ModifyHdl, EENotify*, pNotify)
return 0;
}
-IMPL_LINK(ScMultiTextWnd, NotifyHdl, EENotify*, pNotify)
+IMPL_LINK_TYPED(ScMultiTextWnd, NotifyHdl, EENotify&, rNotify, void)
{
// need to process EE_NOTIFY_TEXTVIEWSCROLLED here
// sometimes we don't seem to get EE_NOTIFY_TEXTVIEWSCROLLED e.g. when
// we insert text at the beginning of the text so the cursor never moves
// down to generate a scroll event
- if ( pNotify && ( pNotify->eNotificationType == EE_NOTIFY_TEXTVIEWSCROLLED
- || pNotify->eNotificationType == EE_NOTIFY_TEXTHEIGHTCHANGED ) )
+ if ( rNotify.eNotificationType == EE_NOTIFY_TEXTVIEWSCROLLED
+ || rNotify.eNotificationType == EE_NOTIFY_TEXTHEIGHTCHANGED )
SetScrollBarRange();
- return 0;
}
long ScMultiTextWnd::GetEditEngTxtHeight()
@@ -1434,7 +1433,7 @@ void ScMultiTextWnd::InitEditEngine()
void ScMultiTextWnd::StopEditEngine( bool bAll )
{
if ( pEditEngine )
- pEditEngine->SetNotifyHdl(Link<>());
+ pEditEngine->SetNotifyHdl(Link<EENotify&,void>());
ScTextWnd::StopEditEngine( bAll );
}
diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx
index 0b0191110397..cda6b52e2f18 100644
--- a/sc/source/ui/inc/AccessibleText.hxx
+++ b/sc/source/ui/inc/AccessibleText.hxx
@@ -54,7 +54,7 @@ public:
SfxBroadcaster& GetBroadcaster() const { return maBroadcaster; }
virtual void UpdateData() = 0;
- DECL_LINK( NotifyHdl, EENotify* );
+ DECL_LINK_TYPED( NotifyHdl, EENotify&, void );
private:
mutable SfxBroadcaster maBroadcaster;
@@ -121,7 +121,7 @@ public:
virtual void UpdateData() SAL_OVERRIDE { }
- DECL_LINK( NotifyHdl, EENotify* );
+ DECL_LINK_TYPED( NotifyHdl, EENotify&, void );
protected:
ScEditObjectViewForwarder* mpViewForwarder;
ScEditViewForwarder* mpEditViewForwarder;
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 7ae780633005..e4b10edc5ae8 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -186,7 +186,7 @@ protected:
void InitEditEngine();
virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE;
- DECL_LINK( NotifyHdl, EENotify* );
+ DECL_LINK_TYPED( NotifyHdl, EENotify&, void );
DECL_LINK( ModifyHdl, EENotify* );
private:
ScInputBarGroup& mrGroupBar;
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index fbae1df88f16..7831b1591926 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -941,19 +941,14 @@ SmTextForwarder::~SmTextForwarder()
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
- pEditEngine->SetNotifyHdl( Link<>() );
+ pEditEngine->SetNotifyHdl( Link<EENotify&,void>() );
}
-IMPL_LINK(SmTextForwarder, NotifyHdl, EENotify*, aNotify)
+IMPL_LINK_TYPED(SmTextForwarder, NotifyHdl, EENotify&, rNotify, void)
{
- if (aNotify)
- {
- ::std::unique_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( aNotify );
- if (aHint.get())
- rEditSource.GetBroadcaster().Broadcast( *aHint.get() );
- }
-
- return 0;
+ ::std::unique_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( &rNotify );
+ if (aHint.get())
+ rEditSource.GetBroadcaster().Broadcast( *aHint.get() );
}
sal_Int32 SmTextForwarder::GetParagraphCount() const
@@ -1640,7 +1635,7 @@ void SmEditAccessible::ClearWin()
// (avoid handler being called for already dead object)
EditEngine *pEditEngine = GetEditEngine();
if (pEditEngine)
- pEditEngine->SetNotifyHdl( Link<>() );
+ pEditEngine->SetNotifyHdl( Link<EENotify&,void>() );
pWin = 0; // implicitly results in AccessibleStateType::DEFUNC set
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index 98cdc602d9ce..d547f8b0c7c2 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -182,7 +182,7 @@ class SmTextForwarder : /* analog to SvxEditEngineForwarder */
SmEditAccessible & rEditAcc;
SmEditSource & rEditSource;
- DECL_LINK( NotifyHdl, EENotify * );
+ DECL_LINK_TYPED( NotifyHdl, EENotify&, void );
SmTextForwarder( const SmTextForwarder & ) SAL_DELETED_FUNCTION;
SmTextForwarder & operator = ( const SmTextForwarder & ) SAL_DELETED_FUNCTION;