summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-09-16 08:38:23 +0200
committerNoel Grandin <noel@peralex.com>2015-09-16 08:38:55 +0200
commit69a06ca6bf45c4e2aceb06262bfa1e7be6f565e8 (patch)
treead1d1e4c9c72fac1ef620e26b865d4001a538df1 /sd
parentd30aedb2a381e89a5a3466f06c95ff7636c9306d (diff)
convert Link<> to typed
Change-Id: I9ce05712af8300c8bcea6ea0f670b57cce1ca43d
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/drawdoc.hxx2
-rw-r--r--sd/source/core/drawdoc4.cxx8
-rw-r--r--sd/source/ui/func/fuinsfil.cxx4
-rw-r--r--sd/source/ui/inc/OutlineView.hxx2
-rw-r--r--sd/source/ui/view/Outliner.cxx6
-rw-r--r--sd/source/ui/view/outlview.cxx15
6 files changed, 16 insertions, 21 deletions
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index df9597191b83..a3b4690190a3 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -191,7 +191,7 @@ private:
DECL_DLLPRIVATE_LINK_TYPED(WorkStartupHdl, Timer *, void);
DECL_DLLPRIVATE_LINK_TYPED(OnlineSpellingHdl, Idle *, void);
- DECL_DLLPRIVATE_LINK(OnlineSpellEventHdl, EditStatus*);
+ DECL_DLLPRIVATE_LINK_TYPED(OnlineSpellEventHdl, EditStatus&, void);
std::vector< OUString > maAnnotationAuthors;
std::vector<com::sun::star::uno::Reference<
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 2f38ed533e14..3121a1aa3e2f 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -882,7 +882,7 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj)
mbHasOnlineSpellErrors = false;
::sd::Outliner* pOutl = GetInternalOutliner();
pOutl->SetUpdateMode(true);
- Link<> aEvtHdl = pOutl->GetStatusEventHdl();
+ Link<EditStatus&,void> aEvtHdl = pOutl->GetStatusEventHdl();
pOutl->SetStatusEventHdl(LINK(this, SdDrawDocument, OnlineSpellEventHdl));
sal_uInt16 nOldOutlMode = pOutl->GetMode();
@@ -955,12 +955,10 @@ void SdDrawDocument::RemoveObject(SdrObject* pObj, SdPage* /*pPage*/)
}
// Callback for ExecuteSpellPopup()
-IMPL_LINK(SdDrawDocument, OnlineSpellEventHdl, EditStatus*, pEditStat)
+IMPL_LINK_TYPED(SdDrawDocument, OnlineSpellEventHdl, EditStatus&, rEditStat, void)
{
- EditStatusFlags nStat = pEditStat->GetStatusWord();
+ EditStatusFlags nStat = rEditStat.GetStatusWord();
mbHasOnlineSpellErrors = bool(nStat & EditStatusFlags::WRONGWORDCHANGED);
-
- return 0;
}
// Callback for ExecuteSpellPopup()
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 9359bf493ed8..991d4f88b871 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -705,8 +705,8 @@ bool FuInsertFile::InsSDDinOlMode(SfxMedium* pMedium)
Link<::Outliner*,void> aOldEndMovingHdl = pOutliner->GetEndMovingHdl();
pOutliner->SetEndMovingHdl( Link<::Outliner*,void>());
- Link<> aOldStatusEventHdl = pOutliner->GetStatusEventHdl();
- pOutliner->SetStatusEventHdl(Link<>());
+ Link<EditStatus&,void> aOldStatusEventHdl = pOutliner->GetStatusEventHdl();
+ pOutliner->SetStatusEventHdl(Link<EditStatus&,void>());
pOutliner->Clear();
pOlView->FillOutliner();
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 0daad3da8f18..03d58c596cb9 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -98,7 +98,7 @@ public:
DECL_LINK_TYPED( ParagraphInsertedHdl, Outliner *, void );
DECL_LINK_TYPED( ParagraphRemovingHdl, Outliner *, void );
DECL_LINK_TYPED( DepthChangedHdl, Outliner *, void );
- DECL_LINK( StatusEventHdl, void * );
+ DECL_LINK_TYPED( StatusEventHdl, EditStatus&, void );
DECL_LINK_TYPED( BeginMovingHdl, Outliner *, void );
DECL_LINK_TYPED( EndMovingHdl, Outliner *, void );
DECL_LINK_TYPED( RemovingPagesHdl, OutlinerView *, bool );
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index f0b35ed7f0cf..c1964def738c 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -306,7 +306,7 @@ void Outliner::EndSpelling()
bool bViewIsDrawViewShell(pViewShell && pViewShell->ISA(DrawViewShell));
if (bViewIsDrawViewShell)
{
- SetStatusEventHdl(Link<>());
+ SetStatusEventHdl(Link<EditStatus&,void>());
mpView = pViewShell->GetView();
mpView->UnmarkAllObj (mpView->GetSdrPageView());
mpView->SdrEndTextEdit();
@@ -741,7 +741,7 @@ void Outliner::DetectChange()
|| aPosition.mePageKind != pDrawViewShell->GetPageKind()))
{
// Either the edit mode or the page kind has changed.
- SetStatusEventHdl(Link<>());
+ SetStatusEventHdl(Link<EditStatus&,void>());
SdrPageView* pPageView = mpView->GetSdrPageView();
if (pPageView != NULL)
@@ -1193,7 +1193,7 @@ void Outliner::SetViewMode (PageKind ePageKind)
// Restore old edit mode.
pDrawViewShell->ChangeEditMode(mpImpl->meOriginalEditMode, false);
- SetStatusEventHdl(Link<>());
+ SetStatusEventHdl(Link<EditStatus&,void>());
OUString sViewURL;
switch (ePageKind)
{
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 17fe87548108..1ad94d2b1132 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -774,14 +774,14 @@ IMPL_LINK_TYPED( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner, void )
/**
* Handler for StatusEvents
*/
-IMPL_LINK_NOARG(OutlineView, StatusEventHdl)
+IMPL_LINK_NOARG_TYPED(OutlineView, StatusEventHdl, EditStatus&, void)
{
::sd::Window* pWin = mrOutlineViewShell.GetActiveWindow();
OutlinerView* pOutlinerView = GetViewByWindow(pWin);
- Rectangle aVis = pOutlinerView->GetVisArea();
- Rectangle aText = Rectangle(Point(0,0),
- Size(mnPaperWidth,
- mrOutliner.GetTextHeight()));
+ Rectangle aVis = pOutlinerView->GetVisArea();
+ Rectangle aText = Rectangle(Point(0,0),
+ Size(mnPaperWidth,
+ mrOutliner.GetTextHeight()));
Rectangle aWin(Point(0,0), pWin->GetOutputSizePixel());
aWin = pWin->PixelToLogic(aWin);
@@ -794,8 +794,6 @@ IMPL_LINK_NOARG(OutlineView, StatusEventHdl)
Point(aVis.TopLeft()));
mrOutlineViewShell.UpdateScrollBars();
}
-
- return 0;
}
IMPL_LINK_NOARG(OutlineView, BeginDropHdl)
@@ -1363,13 +1361,12 @@ void OutlineView::SetLinks()
*/
void OutlineView::ResetLinks() const
{
- Link<> aEmptyLink;
mrOutliner.SetParaInsertedHdl(Link<::Outliner*,void>());
mrOutliner.SetParaRemovingHdl(Link<::Outliner*,void>());
mrOutliner.SetDepthChangedHdl(Link<::Outliner*,void>());
mrOutliner.SetBeginMovingHdl(Link<::Outliner*,void>());
mrOutliner.SetEndMovingHdl(Link<::Outliner*,void>());
- mrOutliner.SetStatusEventHdl(aEmptyLink);
+ mrOutliner.SetStatusEventHdl(Link<EditStatus&,void>());
mrOutliner.SetRemovingPagesHdl(Link<OutlinerView*,bool>());
mrOutliner.SetIndentingPagesHdl(Link<OutlinerView*,bool>());
mrOutliner.SetDrawPortionHdl(Link<DrawPortionInfo*,void>());