diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-30 10:20:00 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-30 10:20:00 +0200 |
commit | 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed (patch) | |
tree | bdfd28afe5a452060e3d985c5f01b45f4b7bc2cd /sw/source/uibase | |
parent | 57d254d42b6e1d836bd21e6fb2e968af2b511c7d (diff) |
Gradually typed Link
Turn the Link class into a template abstracting over the link's argument and
return types, but provide default template arguments that keep the generic,
unsafe "void* in, sal_IntPtr out" behvior. That way, individual uses of the
Link class can be updated over time.
All the related macros are duplicated with ..._TYPED counterparts, that
additionally take the RetType (except for LINK_TYPED, which manages to infer the
relevant types from the supplied Member).
(It would have been attractive to change the "untyped" LinkStubs from taking a
void* to a properly typed ArgType parameter, too, but that would cause
-fsanitize=function to flag uses of "untyped" Link::Call.)
Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
Diffstat (limited to 'sw/source/uibase')
35 files changed, 67 insertions, 67 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 495412f51b25..d85c98de3bc8 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -460,8 +460,8 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium ) // (for OLE; after Statement from MM) bool bIsModified = m_pDoc->getIDocumentState().IsModified(); m_pDoc->GetIDocumentUndoRedo().LockUndoNoModifiedPosition(); - Link aOldOLELnk( m_pDoc->GetOle2Link() ); - m_pDoc->SetOle2Link( Link() ); + Link<> aOldOLELnk( m_pDoc->GetOle2Link() ); + m_pDoc->SetOle2Link( Link<>() ); // Suppress SfxProgress when we are Embedded SW_MOD()->SetEmbeddedLoadSave( diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index 7537d0e0d48c..c6fd4d17f3a8 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -460,7 +460,7 @@ void SwDocShell::RemoveLink() m_xBasePool.clear(); } sal_Int8 nRefCt = static_cast< sal_Int8 >(m_pDoc->release()); - m_pDoc->SetOle2Link(Link()); + m_pDoc->SetOle2Link(Link<>()); m_pDoc->SetDocShell( 0 ); if( !nRefCt ) delete m_pDoc; diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index c5d4bd1e2e28..8a635706d20a 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -509,7 +509,7 @@ void SwDBTreeList::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ ) pContainer->CopyString( SotClipboardFormatId::STRING, sDBName ); pContainer->StartDrag( this, DND_ACTION_COPY | DND_ACTION_LINK, - Link() ); + Link<>() ); } } diff --git a/sw/source/uibase/dbui/dbui.cxx b/sw/source/uibase/dbui/dbui.cxx index 8e44685b868f..bb5aadf78863 100644 --- a/sw/source/uibase/dbui/dbui.cxx +++ b/sw/source/uibase/dbui/dbui.cxx @@ -127,7 +127,7 @@ void CancelableDialog::dispose() Dialog::dispose(); } -void CancelableDialog::SetCancelHdl( const Link& rLink ) +void CancelableDialog::SetCancelHdl( const Link<>& rLink ) { m_pCancelButton->SetClickHdl( rLink ); } diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index aa8e2c95beea..242ed2e1a0a7 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1694,8 +1694,8 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData, if( pStream && pRead ) { - Link aOldLink( rSh.GetChgLnk() ); - rSh.SetChgLnk( Link() ); + Link<> aOldLink( rSh.GetChgLnk() ); + rSh.SetChgLnk( Link<>() ); const SwPosition& rInsPos = *rSh.GetCrsr()->Start(); SwReader aReader( *pStream, aEmptyOUStr, OUString(), *rSh.GetCrsr() ); @@ -2303,7 +2303,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, SwTransferable::_CheckForURLOrLNKFile( rData, sTxt, &sDesc ); aBkmk = INetBookmark( - URIHelper::SmartRel2Abs(INetURLObject(), sTxt, Link(), false ), + URIHelper::SmartRel2Abs(INetURLObject(), sTxt, Link<>(), false ), sDesc ); bCheckForGrf = true; bCheckForImageMap = SW_PASTESDR_REPLACE == nAction; @@ -2573,7 +2573,7 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData, bool bIsURLFile = SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc ); //Own FileFormat? --> insert, not for StarWriter/Web - OUString sFileURL = URIHelper::SmartRel2Abs(INetURLObject(), sFile, Link(), false ); + OUString sFileURL = URIHelper::SmartRel2Abs(INetURLObject(), sFile, Link<>(), false ); const SfxFilter* pFlt = SW_PASTESDR_SETATTR == nAction ? 0 : SwIoSystem::GetFileFilter(sFileURL); if( pFlt && !rSh.GetView().GetDocShell()->ISA(SwWebDocShell) ) @@ -3768,8 +3768,8 @@ void SwTrnsfrDdeLink::Disconnect( bool bRemoveDataAdvise ) ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); // #i58448# - Link aSavedOle2Link( pDoc->GetOle2Link() ); - pDoc->SetOle2Link( Link() ); + Link<> aSavedOle2Link( pDoc->GetOle2Link() ); + pDoc->SetOle2Link( Link<>() ); bool bIsModified = pDoc->getIDocumentState().IsModified(); diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index 2ea841068127..a2df960c99a0 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -94,7 +94,7 @@ void SwAnnotationWin::SetPostItText() ESelection aOrigSelection(GetOutlinerView()->GetEditView().GetSelection()); // get text from SwPostItField and insert into our textview - Engine()->SetModifyHdl( Link() ); + Engine()->SetModifyHdl( Link<>() ); Engine()->EnableUndo( false ); if( mpFld->GetTextObject() ) Engine()->SetText( *mpFld->GetTextObject() ); @@ -261,7 +261,7 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) GetOutlinerView()->SetAttribs(DefaultItem()); // lets insert an undo step so the initial text can be easily deleted // but do not use UpdateData() directly, would set modified state again and reentrance into Mgr - Engine()->SetModifyHdl( Link() ); + Engine()->SetModifyHdl( Link<>() ); IDocumentUndoRedo & rUndoRedo( DocView().GetDocShell()->GetDoc()->GetIDocumentUndoRedo()); boost::scoped_ptr<SwField> pOldField; diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index e43bb81fe90c..96ccdfef97b6 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -348,7 +348,7 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt ) GetTextView() && GetTextView()->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(), true )) { - Link aLink = LINK(this, SidebarTxtControl, OnlineSpellCallback); + Link<> aLink = LINK(this, SidebarTxtControl, OnlineSpellCallback); GetTextView()->ExecuteSpellPopup(rCEvt.GetMousePosPixel(),&aLink); } else diff --git a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx index 42d31065aec8..75f6097e9c59 100644 --- a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx @@ -79,7 +79,7 @@ SidebarTextEditSource::~SidebarTextEditSource() { if ( mrSidebarTxtControl.GetTextView() ) { - mrSidebarTxtControl.GetTextView()->GetOutliner()->SetNotifyHdl( Link() ); + mrSidebarTxtControl.GetTextView()->GetOutliner()->SetNotifyHdl( Link<>() ); } } diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index ff2869c0450f..db20ee70bcef 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -921,8 +921,8 @@ void SwSidebarWin::SetReadonly(bool bSet) void SwSidebarWin::SetLanguage(const SvxLanguageItem& rNewItem) { - Link pLink = Engine()->GetModifyHdl(); - Engine()->SetModifyHdl( Link() ); + Link<> pLink = Engine()->GetModifyHdl(); + Engine()->SetModifyHdl( Link<>() ); ESelection aOld = GetOutlinerView()->GetSelection(); ESelection aNewSelection( 0, 0, Engine()->GetParagraphCount()-1, EE_TEXTPOS_ALL ); diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index 2c85b7e514e8..a4d51ae14ceb 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -352,7 +352,7 @@ OUString SwReadOnlyPopup::SaveGraphic( sal_uInt16 nId ) { if ( !aBrushItem.GetGraphicLink().isEmpty() ) sGrfName = aBrushItem.GetGraphicLink(); - aBrushItem.SetDoneLink( Link() ); + aBrushItem.SetDoneLink( Link<>() ); const Graphic *pGrf = aBrushItem.GetGraphic(); if ( pGrf ) { diff --git a/sw/source/uibase/inc/actctrl.hxx b/sw/source/uibase/inc/actctrl.hxx index 6be1c310a92a..361e5a743c3c 100644 --- a/sw/source/uibase/inc/actctrl.hxx +++ b/sw/source/uibase/inc/actctrl.hxx @@ -25,7 +25,7 @@ // numerical input class SW_DLLPUBLIC NumEditAction: public NumericField { - Link aActionLink; + Link<> aActionLink; protected: void Action(); @@ -34,14 +34,14 @@ public: NumEditAction( vcl::Window* pParent, const ResId& rResId ) : NumericField(pParent, rResId) {} - void SetActionHdl( const Link& rLink ) { aActionLink = rLink;} - const Link& GetActionHdl() const { return aActionLink; } + void SetActionHdl( const Link<>& rLink ) { aActionLink = rLink;} + const Link<>& GetActionHdl() const { return aActionLink; } }; // call a link when KEY_RETURN is pressed class SW_DLLPUBLIC ReturnActionEdit : public Edit { - Link aReturnActionLink; + Link<> aReturnActionLink; public: ReturnActionEdit(vcl::Window* pParent, WinBits nStyle) : Edit(pParent, nStyle) @@ -49,7 +49,7 @@ public: } virtual void KeyInput( const KeyEvent& ) SAL_OVERRIDE; - void SetReturnActionLink(const Link& rLink) + void SetReturnActionLink(const Link<>& rLink) { aReturnActionLink = rLink;} }; diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx index 260a7fcc96e1..837c2f7019ab 100644 --- a/sw/source/uibase/inc/dbinsdlg.hxx +++ b/sw/source/uibase/inc/dbinsdlg.hxx @@ -123,7 +123,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem SwInsDBColumns aDBColumns; const SwDBData aDBData; - Link aOldNumFmtLnk; + Link<> aOldNumFmtLnk; OUString sNoTmpl; SwView* pView; diff --git a/sw/source/uibase/inc/dbui.hxx b/sw/source/uibase/inc/dbui.hxx index 879da6302939..8f5c7fe6120d 100644 --- a/sw/source/uibase/inc/dbui.hxx +++ b/sw/source/uibase/inc/dbui.hxx @@ -42,7 +42,7 @@ public: virtual ~CancelableDialog(); virtual void dispose() SAL_OVERRIDE; - void SetCancelHdl( const Link& rLink ); + void SetCancelHdl( const Link<>& rLink ); void Show(); }; diff --git a/sw/source/uibase/inc/docfnote.hxx b/sw/source/uibase/inc/docfnote.hxx index 0649254bf2cf..8d0eec4ff2b8 100644 --- a/sw/source/uibase/inc/docfnote.hxx +++ b/sw/source/uibase/inc/docfnote.hxx @@ -26,7 +26,7 @@ class SwWrtShell; class SwFootNoteOptionDlg :public SfxTabDialog { SwWrtShell &rSh; - Link aOldOkHdl; + Link<> aOldOkHdl; sal_uInt16 m_nFootNoteId; sal_uInt16 m_nEndNoteId; diff --git a/sw/source/uibase/inc/hyp.hxx b/sw/source/uibase/inc/hyp.hxx index 6d7be0611eaa..d2f035c6eec4 100644 --- a/sw/source/uibase/inc/hyp.hxx +++ b/sw/source/uibase/inc/hyp.hxx @@ -31,7 +31,7 @@ private: SwView* pView; ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > xHyph; - Link aOldLnk; + Link<> aOldLnk; sal_uInt16 nPageCount; // page count for progress view sal_uInt16 nPageStart; // 1st checked page bool bInSelection : 1; // separating selected text diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx index e13634dc04a7..3d17a815dc4d 100644 --- a/sw/source/uibase/inc/mailmergehelper.hxx +++ b/sw/source/uibase/inc/mailmergehelper.hxx @@ -62,7 +62,7 @@ class SW_DLLPUBLIC SwAddressPreview : public vcl::Window { VclPtr<ScrollBar> aVScrollBar; SwAddressPreview_Impl* pImpl; - Link m_aSelectHdl; + Link<> m_aSelectHdl; void DrawText_Impl( const OUString& rAddress, const Point& rTopLeft, const Size& rSize, bool bIsSelected); @@ -111,7 +111,7 @@ public: SwMailMergeConfigItem& rConfigItem, const ::com::sun::star::uno::Sequence< OUString>* pAssignments = 0); - void SetSelectHdl (const Link& rLink) {m_aSelectHdl = rLink;} + void SetSelectHdl (const Link<>& rLink) {m_aSelectHdl = rLink;} }; // iterate over an address block or a greeting line the iterator returns the diff --git a/sw/source/uibase/inc/mailmergewizard.hxx b/sw/source/uibase/inc/mailmergewizard.hxx index 6bcfb25aebb7..78449ae283af 100644 --- a/sw/source/uibase/inc/mailmergewizard.hxx +++ b/sw/source/uibase/inc/mailmergewizard.hxx @@ -90,7 +90,7 @@ public: void updateRoadmapItemLabel( WizardState _nState ); virtual short Execute() SAL_OVERRIDE; - virtual void StartExecuteModal( const Link& rEndDialogHdl ) SAL_OVERRIDE; + virtual void StartExecuteModal( const Link<>& rEndDialogHdl ) SAL_OVERRIDE; }; #endif diff --git a/sw/source/uibase/inc/popbox.hxx b/sw/source/uibase/inc/popbox.hxx index 0dbbb48bf9bf..dfff3adc1c10 100644 --- a/sw/source/uibase/inc/popbox.hxx +++ b/sw/source/uibase/inc/popbox.hxx @@ -26,8 +26,8 @@ class SwNavigationPI; class SwHelpToolBox: public ToolBox, public DropTargetHelper { - Link aDoubleClickLink; - Link aRightClickLink; // link gets mouse event as parameter !!! + Link<> aDoubleClickLink; + Link<> aRightClickLink; // link gets mouse event as parameter !!! using ToolBox::DoubleClick; @@ -39,15 +39,15 @@ protected: public: SwHelpToolBox(SwNavigationPI* pParent, const ResId &); virtual ~SwHelpToolBox(); - void SetDoubleClickLink(const Link &); // inline - void SetRightClickLink(const Link &); // inline + void SetDoubleClickLink(const Link<> &); // inline + void SetRightClickLink(const Link<> &); // inline }; -inline void SwHelpToolBox::SetDoubleClickLink(const Link &rLink) { +inline void SwHelpToolBox::SetDoubleClickLink(const Link<> &rLink) { aDoubleClickLink = rLink; } -inline void SwHelpToolBox::SetRightClickLink(const Link &rLink) { +inline void SwHelpToolBox::SetRightClickLink(const Link<> &rLink) { aRightClickLink = rLink; } diff --git a/sw/source/uibase/inc/prcntfld.hxx b/sw/source/uibase/inc/prcntfld.hxx index 314b0b624060..b18bbdce2a09 100644 --- a/sw/source/uibase/inc/prcntfld.hxx +++ b/sw/source/uibase/inc/prcntfld.hxx @@ -48,10 +48,10 @@ public: void set(MetricField *pField); const MetricField* get() const { return m_pField; } MetricField* get() { return m_pField; } - void SetUpHdl(const Link& rLink) { m_pField->SetUpHdl(rLink); } - void SetDownHdl(const Link& rLink) { m_pField->SetDownHdl(rLink); } - void SetModifyHdl(const Link& rLink) { m_pField->SetModifyHdl(rLink); } - void SetLoseFocusHdl(const Link& rLink) { m_pField->SetLoseFocusHdl(rLink); } + void SetUpHdl(const Link<>& rLink) { m_pField->SetUpHdl(rLink); } + void SetDownHdl(const Link<>& rLink) { m_pField->SetDownHdl(rLink); } + void SetModifyHdl(const Link<>& rLink) { m_pField->SetModifyHdl(rLink); } + void SetLoseFocusHdl(const Link<>& rLink) { m_pField->SetLoseFocusHdl(rLink); } void SetMetric(FieldUnit eUnit) { ::SetMetric(*m_pField, eUnit); } void Enable(bool bEnable = true, bool bChild = true) { m_pField->Enable(bEnable, bChild); } void Disable(bool bChild = true) { m_pField->Disable(bChild); } diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx index 69121137d3e5..7fb471182a7d 100644 --- a/sw/source/uibase/inc/redlndlg.hxx +++ b/sw/source/uibase/inc/redlndlg.hxx @@ -84,8 +84,8 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg OUString sAutoFormat; VclPtr<SvxTPView> pTPView; VclPtr<SvxRedlinTable> pTable; // PB 2006/02/02 #i48648 now SvHeaderTabListBox - Link aOldSelectHdl; - Link aOldDeselectHdl; + Link<> aOldSelectHdl; + Link<> aOldDeselectHdl; bool bOnlyFormatedRedlines; bool bHasReadonlySel; bool bRedlnAutoFmt; diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index a4af88ff19b1..2f4da99cf181 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -258,9 +258,9 @@ class SwTokenWindow : public VclHBox, public VclBuilderContainer OUString aButtonTexts[TOKEN_END]; // Text of the buttons OUString aButtonHelpTexts[TOKEN_END]; // QuickHelpText of the buttons OUString sCharStyle; - Link aButtonSelectedHdl; + Link<> aButtonSelectedHdl; VclPtr<Control> pActiveCtrl; - Link aModifyHdl; + Link<> aModifyHdl; OUString accessibleName; OUString sAdditionalAccnameString1; OUString sAdditionalAccnameString2; @@ -298,10 +298,10 @@ public: OUString GetPattern() const; - void SetButtonSelectedHdl(const Link& rLink) + void SetButtonSelectedHdl(const Link<>& rLink) { aButtonSelectedHdl = rLink;} - void SetModifyHdl(const Link& rLink){aModifyHdl = rLink;} + void SetModifyHdl(const Link<>& rLink){aModifyHdl = rLink;} Control* GetActiveControl() { return pActiveCtrl;} diff --git a/sw/source/uibase/inc/uivwimp.hxx b/sw/source/uibase/inc/uivwimp.hxx index 655c7d35fab0..98d754b1cb2d 100644 --- a/sw/source/uibase/inc/uivwimp.hxx +++ b/sw/source/uibase/inc/uivwimp.hxx @@ -166,7 +166,7 @@ public: return m_bEditingPositionSet; } - void StartDocumentInserter( const OUString& rFactory, const Link& rEndDialogHdl ); + void StartDocumentInserter( const OUString& rFactory, const Link<>& rEndDialogHdl ); SfxMedium* CreateMedium(); void InitRequest( const SfxRequest& rRequest ); diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx index d4cd7078b685..36ffb80ba680 100644 --- a/sw/source/uibase/inc/unotools.hxx +++ b/sw/source/uibase/inc/unotools.hxx @@ -75,7 +75,7 @@ class SW_DLLPUBLIC SwOneExampleFrame VclPtr<SwFrmCtrlWindow> aTopWindow; Idle aLoadedIdle; - Link aInitializedLink; + Link<> aInitializedLink; MenuResource aMenuRes; OUString sArgumentURL; @@ -98,7 +98,7 @@ class SW_DLLPUBLIC SwOneExampleFrame public: SwOneExampleFrame(vcl::Window& rWin, sal_uInt32 nStyleFlags = EX_SHOW_ONLINE_LAYOUT, - const Link* pInitalizedLink = 0, + const Link<>* pInitalizedLink = 0, const OUString* pURL = 0); ~SwOneExampleFrame(); diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index 7880165f7371..210277882e01 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -160,7 +160,7 @@ public: void Invalidate(); // select table cells for editing of formulas in the ribbonbar - inline void SelTblCells( const Link &rLink, bool bMark = true ); + inline void SelTblCells( const Link<> &rLink, bool bMark = true ); inline void EndSelTblCells(); // leave per word or per line selection mode. Is usually called in MB-Up. @@ -420,7 +420,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); // call into the dark Basic/JavaScript sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent, bool bCheckPtr = false, SbxArray* pArgs = 0, - const Link* pCallBack = 0 ); + const Link<>* pCallBack = 0 ); // a click at the given field. the cursor is on it. // execute the predefined actions. @@ -561,7 +561,7 @@ private: bool m_bRetainSelection :1; // Do not remove selections Point m_aStart; - Link m_aSelTblLink; + Link<> m_aSelTblLink; // resets the cursor stack after movement by PageUp/-Down SAL_DLLPRIVATE void _ResetCursorStack(); @@ -616,7 +616,7 @@ inline void SwWrtShell::ResetCursorStack() _ResetCursorStack(); } -inline void SwWrtShell::SelTblCells(const Link &rLink, bool bMark ) +inline void SwWrtShell::SelTblCells(const Link<> &rLink, bool bMark ) { SetSelTblCells( true ); m_bClearMark = bMark; diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index ed6208ca7c06..9bae5285d1d7 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -182,7 +182,7 @@ VclPtr<SfxPopupWindow> SwTbxAutoTextCtrl::CreatePopupWindow() if(pView && !pView->GetDocShell()->IsReadOnly() && !pView->GetWrtShell().HasReadonlySel() ) { - Link aLnk = LINK(this, SwTbxAutoTextCtrl, PopupHdl); + Link<> aLnk = LINK(this, SwTbxAutoTextCtrl, PopupHdl); pPopup = new PopupMenu; SwGlossaryList* pGlossaryList = ::GetGlossaryList(); diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 5e724117f2d2..1a199517b7d0 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -1927,9 +1927,9 @@ SwBaseShell::~SwBaseShell() if( rView.GetCurShell() == this ) rView.ResetSubShell(); - Link aTmp( LINK( this, SwBaseShell, GraphicArrivedHdl)); + Link<> aTmp( LINK( this, SwBaseShell, GraphicArrivedHdl)); if( aTmp == rView.GetWrtShell().GetGrfArrivedLnk() ) - rView.GetWrtShell().SetGrfArrivedLnk( Link() ); + rView.GetWrtShell().SetGrfArrivedLnk( Link<>() ); } void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq ) diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx index 66ff08c66ec5..c53f78670309 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.cxx +++ b/sw/source/uibase/sidebar/PageMarginControl.cxx @@ -94,7 +94,7 @@ PageMarginControl::PageMarginControl( SelectValueSetItem(); SetFieldUnit( *maLeftMarginEdit.get(), eFUnit ); - Link aLinkLR = LINK( this, PageMarginControl, ModifyLRMarginHdl ); + Link<> aLinkLR = LINK( this, PageMarginControl, ModifyLRMarginHdl ); maLeftMarginEdit->SetModifyHdl( aLinkLR ); SetMetricValue( *maLeftMarginEdit.get(), mnPageLeftMargin, meUnit ); @@ -102,7 +102,7 @@ PageMarginControl::PageMarginControl( maRightMarginEdit->SetModifyHdl( aLinkLR ); SetMetricValue( *maRightMarginEdit.get(), mnPageRightMargin, meUnit ); - Link aLinkUL = LINK( this, PageMarginControl, ModifyULMarginHdl ); + Link<> aLinkUL = LINK( this, PageMarginControl, ModifyULMarginHdl ); SetFieldUnit( *maTopMarginEdit.get(), eFUnit ); maTopMarginEdit->SetModifyHdl( aLinkUL ); SetMetricValue( *maTopMarginEdit.get(), mnPageTopMargin, meUnit ); diff --git a/sw/source/uibase/sidebar/PageOrientationControl.cxx b/sw/source/uibase/sidebar/PageOrientationControl.cxx index 8dede92c9980..3bc07bbbdaf4 100644 --- a/sw/source/uibase/sidebar/PageOrientationControl.cxx +++ b/sw/source/uibase/sidebar/PageOrientationControl.cxx @@ -48,7 +48,7 @@ PageOrientationControl::PageOrientationControl( SW_RES(STR_LANDSCAPE), 0 ); } - Link aLink = LINK(this, PageOrientationControl,ImplOrientationHdl ); + Link<> aLink = LINK(this, PageOrientationControl,ImplOrientationHdl ); mpOrientationValueSet->SetSelectHdl(aLink); mpOrientationValueSet->SetNoSelection(); mpOrientationValueSet->StartSelection(); diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx index 89ac394d3443..a4b11c9ae026 100644 --- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx +++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx @@ -237,7 +237,7 @@ void PagePropertyPanel::Initialize() { // popup for page orientation const sal_uInt16 nIdOrientation = mpToolBoxOrientation->GetItemId(UNO_ORIENTATION); - Link aLink = LINK( this, PagePropertyPanel, ClickOrientationHdl ); + Link<> aLink = LINK( this, PagePropertyPanel, ClickOrientationHdl ); mpToolBoxOrientation->SetDropdownClickHdl( aLink ); mpToolBoxOrientation->SetSelectHdl( aLink ); mpToolBoxOrientation->SetItemImage( nIdOrientation, mImgPortrait); diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx index 2dfe37c4b8c6..78369ee77f29 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx @@ -113,7 +113,7 @@ void WrapPropertyPanel::dispose() void WrapPropertyPanel::Initialize() { - Link aLink = LINK(this, WrapPropertyPanel, WrapTypeHdl); + Link<> aLink = LINK(this, WrapPropertyPanel, WrapTypeHdl); mpRBNoWrap->SetClickHdl(aLink); mpRBWrapLeft->SetClickHdl(aLink); mpRBWrapRight->SetClickHdl(aLink); diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx index 93853c2f41a7..3ede0e371744 100644 --- a/sw/source/uibase/uiview/uivwimp.cxx +++ b/sw/source/uibase/uiview/uivwimp.cxx @@ -238,7 +238,7 @@ void SwView_Impl::AddTransferable(SwTransferable& rTransferable) rTransferable.m_refCount--; } -void SwView_Impl::StartDocumentInserter( const OUString& rFactory, const Link& rEndDialogHdl ) +void SwView_Impl::StartDocumentInserter( const OUString& rFactory, const Link<>& rEndDialogHdl ) { delete m_pDocInserter; m_pDocInserter = new ::sfx2::DocumentInserter( rFactory ); diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index add57844f094..51e037600da4 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -736,7 +736,7 @@ bool SwView::ExecDrwTxtSpellPopup(const Point& rPt) if (pOLV->IsWrongSpelledWordAtPos( aPos )) { bRet = true; - Link aLink = LINK(this, SwView, OnlineSpellCallback); + Link<> aLink = LINK(this, SwView, OnlineSpellCallback); pOLV->ExecuteSpellPopup( aPos,&aLink ); } return bRet; diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 70c506f138f1..663ebe73b67d 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -780,7 +780,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, // Handler - Link aLk = LINK(this, SwNavigationPI, ToolBoxSelectHdl); + Link<> aLk = LINK(this, SwNavigationPI, ToolBoxSelectHdl); aContentToolBox->SetSelectHdl( aLk ); aGlobalToolBox->SetSelectHdl( aLk ); aDocListBox->SetSelectHdl(LINK(this, SwNavigationPI, diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index a7446c3a4096..8898a1aa8964 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -64,7 +64,7 @@ bool SwOneExampleFrame::bShowServiceNotAvailableMessage = true; SwOneExampleFrame::SwOneExampleFrame( vcl::Window& rWin, sal_uInt32 nFlags, - const Link* pInitializedLink, + const Link<>* pInitializedLink, const OUString* pURL ) : aTopWindow(VclPtr<SwFrmCtrlWindow>::Create(&rWin, this)), aMenuRes(SW_RES(RES_FRMEX_MENU)), @@ -457,7 +457,7 @@ void SwOneExampleFrame::CreatePopup(const Point& rPt) aPop.InsertItem(ITEM_UP, rArr.GetString(rArr.FindIndex(ST_MENU_UP ))); aPop.InsertItem(ITEM_DOWN, rArr.GetString(rArr.FindIndex(ST_MENU_DOWN ))); - Link aSelLk = LINK(this, SwOneExampleFrame, PopupHdl ); + Link<> aSelLk = LINK(this, SwOneExampleFrame, PopupHdl ); aPop.SetSelectHdl(aSelLk); if(EX_SHOW_ONLINE_LAYOUT == nStyleFlags) { diff --git a/sw/source/uibase/wrtsh/wrtsh3.cxx b/sw/source/uibase/wrtsh/wrtsh3.cxx index 252e523ef42e..0f97fbce9e52 100644 --- a/sw/source/uibase/wrtsh/wrtsh3.cxx +++ b/sw/source/uibase/wrtsh/wrtsh3.cxx @@ -160,7 +160,7 @@ void SwWrtShell::ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pA sal_uInt16 SwWrtShell::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent, bool bChkPtr, SbxArray* pArgs, - const Link* pCallBack ) + const Link<>* pCallBack ) { return GetDoc()->CallEvent( nEvent, rCallEvent, bChkPtr, pArgs, pCallBack ); } |