Kaydet (Commit) f8fa7620 authored tarafından Noel Grandin's avatar Noel Grandin

convert Link<> to typed

Change-Id: I706a3b3489dc8e945ce9e7e7ddc41104e9a15bab
üst 7034c959
...@@ -166,7 +166,7 @@ private: ...@@ -166,7 +166,7 @@ private:
Point m_aOldRBPos; ///< Right/Bottom of last VisArea Point m_aOldRBPos; ///< Right/Bottom of last VisArea
// (used in Invalidate by Cursor) // (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 */ into a fly. A macro can then be called */
Link<> m_aChgLnk; /**< link will be called by every attribute/ Link<> m_aChgLnk; /**< link will be called by every attribute/
format changes at cursor position.*/ format changes at cursor position.*/
...@@ -481,8 +481,8 @@ public: ...@@ -481,8 +481,8 @@ public:
bool IsOverReadOnlyPos( const Point& rPt ) const; bool IsOverReadOnlyPos( const Point& rPt ) const;
// Methods for aFlyMacroLnk. // Methods for aFlyMacroLnk.
void SetFlyMacroLnk( const Link<>& rLnk ) { m_aFlyMacroLnk = rLnk; } void SetFlyMacroLnk( const Link<const SwFlyFrameFormat*,void>& rLnk ) { m_aFlyMacroLnk = rLnk; }
const Link<>& GetFlyMacroLnk() const { return m_aFlyMacroLnk; } const Link<const SwFlyFrameFormat*,void>& GetFlyMacroLnk() const { return m_aFlyMacroLnk; }
// Methods returning/altering link for changes of attributes/formates. // Methods returning/altering link for changes of attributes/formates.
void SetChgLnk( const Link<> &rLnk ) { m_aChgLnk = rLnk; } void SetChgLnk( const Link<> &rLnk ) { m_aChgLnk = rLnk; }
......
...@@ -225,7 +225,7 @@ SwCallLink::~SwCallLink() ...@@ -225,7 +225,7 @@ SwCallLink::~SwCallLink()
if( rStNd.EndOfSectionNode()->StartOfSectionIndex() > nNode || if( rStNd.EndOfSectionNode()->StartOfSectionIndex() > nNode ||
nNode > rStNd.EndOfSectionIndex() ) nNode > rStNd.EndOfSectionIndex() )
rShell.GetFlyMacroLnk().Call( const_cast<SwFlyFrameFormat *>(pFlyFrm->GetFormat()) ); rShell.GetFlyMacroLnk().Call( pFlyFrm->GetFormat() );
} }
} }
......
...@@ -111,7 +111,7 @@ static void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrm* pOldSelFly) ...@@ -111,7 +111,7 @@ static void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrm* pOldSelFly)
(!pOldSelFly || pOldSelFly->GetFormat() != pFlyFormat) ) (!pOldSelFly || pOldSelFly->GetFormat() != pFlyFormat) )
{ {
// now call set macro if applicable // 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 extern bool g_bNoInterrupt; // in swmodule.cxx
// if a dialog was started inside a macro, then // if a dialog was started inside a macro, then
// MouseButtonUp arrives at macro and not to us. Therefore // MouseButtonUp arrives at macro and not to us. Therefore
......
...@@ -244,7 +244,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); ...@@ -244,7 +244,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
bool GotoPage( sal_uInt16 nPage, bool bRecord ); bool GotoPage( sal_uInt16 nPage, bool bRecord );
// setting the cursor; remember the old position for turning back // 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); bool PageCrsr(SwTwips lOffset, bool bSelect);
......
...@@ -705,9 +705,9 @@ void SwWrtShell::LeaveSelFrmMode() ...@@ -705,9 +705,9 @@ void SwWrtShell::LeaveSelFrmMode()
// Description: execute framebound macro // 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"); OSL_ENSURE(pFormat, "no frame format");
const SvxMacroItem &rFormatMac = pFormat->GetMacro(); const SvxMacroItem &rFormatMac = pFormat->GetMacro();
...@@ -719,7 +719,6 @@ IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFormat ) ...@@ -719,7 +719,6 @@ IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFormat )
CallChgLnk(); CallChgLnk();
ExecMacro( rMac ); ExecMacro( rMac );
} }
return 0;
} }
long SwWrtShell::UpdateLayoutFrm(const Point *pPt, bool ) long SwWrtShell::UpdateLayoutFrm(const Point *pPt, bool )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment