summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-09-17 16:13:33 +0200
committerNoel Grandin <noel@peralex.com>2015-09-18 08:46:11 +0200
commitf8fa762026f0767b98284d8af08ab6e9814c9f0a (patch)
tree7e0c297106c7198cf571810aeee8f9813795db06
parent7034c959c5960371ee32f8a86ef656aeeeb5817e (diff)
convert Link<> to typed
Change-Id: I706a3b3489dc8e945ce9e7e7ddc41104e9a15bab
-rw-r--r--sw/inc/crsrsh.hxx6
-rw-r--r--sw/source/core/crsr/callnk.cxx2
-rw-r--r--sw/source/core/frmedt/feshview.cxx2
-rw-r--r--sw/source/uibase/inc/wrtsh.hxx2
-rw-r--r--sw/source/uibase/wrtsh/select.cxx5
5 files changed, 8 insertions, 9 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 93ed941f5105..2d68c835760c 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -166,7 +166,7 @@ private:
Point m_aOldRBPos; ///< Right/Bottom of last VisArea
// (used in Invalidate by Cursor)
- Link<> m_aFlyMacroLnk; /**< Link will be called, if the Crsr is set
+ Link<const SwFlyFrameFormat*,void> m_aFlyMacroLnk; /**< Link will be called, if the Crsr is set
into a fly. A macro can then be called */
Link<> m_aChgLnk; /**< link will be called by every attribute/
format changes at cursor position.*/
@@ -481,8 +481,8 @@ public:
bool IsOverReadOnlyPos( const Point& rPt ) const;
// Methods for aFlyMacroLnk.
- void SetFlyMacroLnk( const Link<>& rLnk ) { m_aFlyMacroLnk = rLnk; }
- const Link<>& GetFlyMacroLnk() const { return m_aFlyMacroLnk; }
+ void SetFlyMacroLnk( const Link<const SwFlyFrameFormat*,void>& rLnk ) { m_aFlyMacroLnk = rLnk; }
+ const Link<const SwFlyFrameFormat*,void>& GetFlyMacroLnk() const { return m_aFlyMacroLnk; }
// Methods returning/altering link for changes of attributes/formates.
void SetChgLnk( const Link<> &rLnk ) { m_aChgLnk = rLnk; }
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 9daa0fed5a48..3833c26031b7 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -225,7 +225,7 @@ SwCallLink::~SwCallLink()
if( rStNd.EndOfSectionNode()->StartOfSectionIndex() > nNode ||
nNode > rStNd.EndOfSectionIndex() )
- rShell.GetFlyMacroLnk().Call( const_cast<SwFlyFrameFormat *>(pFlyFrm->GetFormat()) );
+ rShell.GetFlyMacroLnk().Call( pFlyFrm->GetFormat() );
}
}
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 473f686cf16d..3cca758123e2 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -111,7 +111,7 @@ static void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrm* pOldSelFly)
(!pOldSelFly || pOldSelFly->GetFormat() != pFlyFormat) )
{
// now call set macro if applicable
- pSh->GetFlyMacroLnk().Call( const_cast<void*>(static_cast<void const *>(pFlyFormat)) );
+ pSh->GetFlyMacroLnk().Call( static_cast<const SwFlyFrameFormat*>(pFlyFormat) );
extern bool g_bNoInterrupt; // in swmodule.cxx
// if a dialog was started inside a macro, then
// MouseButtonUp arrives at macro and not to us. Therefore
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index f965c87f4479..db852bc0e760 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -244,7 +244,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
bool GotoPage( sal_uInt16 nPage, bool bRecord );
// setting the cursor; remember the old position for turning back
- DECL_LINK( ExecFlyMac, void * );
+ DECL_LINK_TYPED( ExecFlyMac, const SwFlyFrameFormat*, void );
bool PageCrsr(SwTwips lOffset, bool bSelect);
diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx
index ccd7fec07932..d530b552de12 100644
--- a/sw/source/uibase/wrtsh/select.cxx
+++ b/sw/source/uibase/wrtsh/select.cxx
@@ -705,9 +705,9 @@ void SwWrtShell::LeaveSelFrmMode()
// Description: execute framebound macro
-IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFormat )
+IMPL_LINK_TYPED( SwWrtShell, ExecFlyMac, const SwFlyFrameFormat*, pFlyFormat, void )
{
- const SwFrameFormat *pFormat = pFlyFormat ? static_cast<SwFrameFormat*>(pFlyFormat) : GetFlyFrameFormat();
+ const SwFrameFormat *pFormat = pFlyFormat ? static_cast<const SwFrameFormat*>(pFlyFormat) : GetFlyFrameFormat();
OSL_ENSURE(pFormat, "no frame format");
const SvxMacroItem &rFormatMac = pFormat->GetMacro();
@@ -719,7 +719,6 @@ IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFormat )
CallChgLnk();
ExecMacro( rMac );
}
- return 0;
}
long SwWrtShell::UpdateLayoutFrm(const Point *pPt, bool )