convert Link<> to typed
Change-Id: I2aeda615e39db5a3cd39e168db34425e2912be8b
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include <svl/aeitem.hxx>
|
||||
#include <svl/visitem.hxx>
|
||||
#include <svl/whiter.hxx>
|
||||
#include <svx/svdundo.hxx>
|
||||
#include <tools/diagnose_ex.h>
|
||||
#include <tools/urlobj.hxx>
|
||||
#include <vcl/layout.hxx>
|
||||
@@ -210,17 +211,13 @@ void DialogWindow::Command( const CommandEvent& rCEvt )
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
IMPL_STATIC_LINK(
|
||||
DialogWindow, NotifyUndoActionHdl, SfxUndoAction *, pUndoAction )
|
||||
IMPL_STATIC_LINK_TYPED(
|
||||
DialogWindow, NotifyUndoActionHdl, SdrUndoAction *, pUndoAction, void )
|
||||
{
|
||||
// #i120515# pUndoAction needs to be deleted, this hand over is an ownership
|
||||
// change. As long as it does not get added to the undo manager, it needs at
|
||||
// least to be deleted.
|
||||
delete pUndoAction;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DialogWindow::DoInit()
|
||||
|
@@ -38,6 +38,7 @@ class Printer;
|
||||
class StarBASIC;
|
||||
class SfxItemSet;
|
||||
class SfxUndoManager;
|
||||
class SdrUndoAction;
|
||||
|
||||
namespace basctl
|
||||
{
|
||||
@@ -71,7 +72,7 @@ protected:
|
||||
virtual void Command( const CommandEvent& rCEvt ) SAL_OVERRIDE;
|
||||
virtual void LoseFocus() SAL_OVERRIDE;
|
||||
|
||||
DECL_STATIC_LINK( DialogWindow, NotifyUndoActionHdl, SfxUndoAction * );
|
||||
DECL_STATIC_LINK_TYPED( DialogWindow, NotifyUndoActionHdl, SdrUndoAction *, void );
|
||||
virtual void DoInit() SAL_OVERRIDE;
|
||||
virtual void DoScroll( ScrollBar* pCurScrollBar ) SAL_OVERRIDE;
|
||||
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
|
||||
|
@@ -437,7 +437,7 @@ public:
|
||||
ViewElementListProvider getViewElementListProvider();
|
||||
DrawModelWrapper* GetDrawModelWrapper();
|
||||
|
||||
DECL_LINK( NotifyUndoActionHdl, SdrUndoAction* );
|
||||
DECL_LINK_TYPED( NotifyUndoActionHdl, SdrUndoAction*, void );
|
||||
|
||||
public:
|
||||
//private
|
||||
|
@@ -1459,9 +1459,9 @@ void SAL_CALL ChartController::modified(
|
||||
//todo? update menu states ?
|
||||
}
|
||||
|
||||
IMPL_LINK( ChartController, NotifyUndoActionHdl, SdrUndoAction*, pUndoAction )
|
||||
IMPL_LINK_TYPED( ChartController, NotifyUndoActionHdl, SdrUndoAction*, pUndoAction, void )
|
||||
{
|
||||
ENSURE_OR_RETURN( pUndoAction, "invalid Undo action", 1L );
|
||||
ENSURE_OR_RETURN_VOID( pUndoAction, "invalid Undo action" );
|
||||
|
||||
OUString aObjectCID = m_aSelection.getSelectedCID();
|
||||
if ( aObjectCID.isEmpty() )
|
||||
@@ -1478,7 +1478,6 @@ IMPL_LINK( ChartController, NotifyUndoActionHdl, SdrUndoAction*, pUndoAction )
|
||||
DBG_UNHANDLED_EXCEPTION();
|
||||
}
|
||||
}
|
||||
return 0L;
|
||||
}
|
||||
|
||||
DrawModelWrapper* ChartController::GetDrawModelWrapper()
|
||||
|
@@ -152,11 +152,10 @@ struct SdrModelImpl;
|
||||
class SVX_DLLPUBLIC SdrModel : public SfxBroadcaster, public tools::WeakBase< SdrModel >
|
||||
{
|
||||
protected:
|
||||
DateTime aReadDate; // date of the incoming stream
|
||||
DateTime aReadDate; // date of the incoming stream
|
||||
std::vector<SdrPage*> maMaPag; // master pages
|
||||
std::vector<SdrPage*> maPages;
|
||||
Link<> aUndoLink; // link to a NotifyUndo-Handler
|
||||
Link<> aIOProgressLink;
|
||||
Link<SdrUndoAction*,void> aUndoLink; // link to a NotifyUndo-Handler
|
||||
OUString aTablePath;
|
||||
Size aMaxObjSize; // e.g. for auto-growing text
|
||||
Fraction aObjUnit; // description of the coordinate units for ClipBoard, Drag&Drop, ...
|
||||
@@ -332,25 +331,25 @@ public:
|
||||
void SetRefDevice(OutputDevice* pDev);
|
||||
OutputDevice* GetRefDevice() const { return pRefOutDev.get(); }
|
||||
/// Set if we are doing tiled rendering.
|
||||
void setTiledRendering(bool bTiledRendering);
|
||||
void setTiledRendering(bool bTiledRendering);
|
||||
/// Are we doing tiled rendering?
|
||||
bool isTiledRendering() const;
|
||||
bool isTiledRendering() const;
|
||||
/// The actual implementation of the vcl::ITiledRenderable::registerCallback() API.
|
||||
void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData);
|
||||
void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData);
|
||||
/// Gets the LOK callback registered by registerLibreOfficeKitCallback().
|
||||
LibreOfficeKitCallback getLibreOfficeKitCallback() const;
|
||||
/// Gets the LOK data registered by registerLibreOfficeKitCallback().
|
||||
void* getLibreOfficeKitData() const;
|
||||
void* getLibreOfficeKitData() const;
|
||||
/// Invokes the registered callback, if there are any.
|
||||
void libreOfficeKitCallback(int nType, const char* pPayload) const;
|
||||
void libreOfficeKitCallback(int nType, const char* pPayload) const;
|
||||
// If a new MapMode is set on the RefDevice (or similar)
|
||||
void RefDeviceChanged(); // not yet implemented
|
||||
// default font height in logical units
|
||||
void SetDefaultFontHeight(sal_uIntPtr nVal);
|
||||
sal_uIntPtr GetDefaultFontHeight() const { return nDefTextHgt; }
|
||||
sal_uIntPtr GetDefaultFontHeight() const { return nDefTextHgt; }
|
||||
// default tabulator width for the EditEngine
|
||||
void SetDefaultTabulator(sal_uInt16 nVal);
|
||||
sal_uInt16 GetDefaultTabulator() const { return nDefaultTabulator; }
|
||||
sal_uInt16 GetDefaultTabulator() const { return nDefaultTabulator; }
|
||||
|
||||
// The DefaultStyleSheet will be used in every symbol object which is inserted
|
||||
// in this model and does not have a StyleSheet set.
|
||||
@@ -361,7 +360,7 @@ public:
|
||||
SfxStyleSheet* GetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj() const { return mpDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj; }
|
||||
void SetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj(SfxStyleSheet* pDefSS) { mpDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj = pDefSS; }
|
||||
|
||||
sfx2::LinkManager* GetLinkManager() { return pLinkManager; }
|
||||
sfx2::LinkManager* GetLinkManager() { return pLinkManager; }
|
||||
void SetLinkManager( sfx2::LinkManager* pLinkMgr ) { pLinkManager = pLinkMgr; }
|
||||
|
||||
::comphelper::IEmbeddedHelper* GetPersist() const { return m_pEmbeddedHelper; }
|
||||
@@ -406,8 +405,8 @@ public:
|
||||
static void TakePercentStr(const Fraction& rVal, OUString& rStr, bool bNoPercentChar = false);
|
||||
|
||||
// RecalcPageNums is ordinarily only called by the Page.
|
||||
bool IsPagNumsDirty() const { return bPagNumsDirty; };
|
||||
bool IsMPgNumsDirty() const { return bMPgNumsDirty; };
|
||||
bool IsPagNumsDirty() const { return bPagNumsDirty; };
|
||||
bool IsMPgNumsDirty() const { return bMPgNumsDirty; };
|
||||
void RecalcPageNums(bool bMaster);
|
||||
// After the Insert the Page belongs to the SdrModel.
|
||||
virtual void InsertPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF);
|
||||
@@ -415,23 +414,23 @@ public:
|
||||
// Remove means transferring ownership to the caller (opposite of Insert)
|
||||
virtual SdrPage* RemovePage(sal_uInt16 nPgNum);
|
||||
virtual void MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos);
|
||||
const SdrPage* GetPage(sal_uInt16 nPgNum) const;
|
||||
SdrPage* GetPage(sal_uInt16 nPgNum);
|
||||
sal_uInt16 GetPageCount() const;
|
||||
const SdrPage* GetPage(sal_uInt16 nPgNum) const;
|
||||
SdrPage* GetPage(sal_uInt16 nPgNum);
|
||||
sal_uInt16 GetPageCount() const;
|
||||
// #109538#
|
||||
virtual void PageListChanged();
|
||||
virtual void PageListChanged();
|
||||
|
||||
// Masterpages
|
||||
virtual void InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF);
|
||||
void DeleteMasterPage(sal_uInt16 nPgNum);
|
||||
void DeleteMasterPage(sal_uInt16 nPgNum);
|
||||
// Remove means transferring ownership to the caller (opposite of Insert)
|
||||
virtual SdrPage* RemoveMasterPage(sal_uInt16 nPgNum);
|
||||
void MoveMasterPage(sal_uInt16 nPgNum, sal_uInt16 nNewPos);
|
||||
const SdrPage* GetMasterPage(sal_uInt16 nPgNum) const;
|
||||
SdrPage* GetMasterPage(sal_uInt16 nPgNum);
|
||||
sal_uInt16 GetMasterPageCount() const;
|
||||
void MoveMasterPage(sal_uInt16 nPgNum, sal_uInt16 nNewPos);
|
||||
const SdrPage* GetMasterPage(sal_uInt16 nPgNum) const;
|
||||
SdrPage* GetMasterPage(sal_uInt16 nPgNum);
|
||||
sal_uInt16 GetMasterPageCount() const;
|
||||
// #109538#
|
||||
virtual void MasterPageListChanged();
|
||||
virtual void MasterPageListChanged();
|
||||
|
||||
// modified flag. Is set automatically when something changes on the Pages
|
||||
// symbol objects. You need to reset it yourself, however, e.g. on Save().
|
||||
@@ -525,7 +524,7 @@ public:
|
||||
// void NotifyUndoActionHdl(SfxUndoAction* pUndoAction);
|
||||
// When calling the handler ownership is transferred;
|
||||
// The UndoAction belongs to the Handler, not the SdrModel.
|
||||
void SetNotifyUndoActionHdl(const Link<>& rLink) { aUndoLink=rLink; }
|
||||
void SetNotifyUndoActionHdl(const Link<SdrUndoAction*,void>& rLink) { aUndoLink=rLink; }
|
||||
|
||||
/** application can set its own undo manager, BegUndo, EndUndo and AddUndoAction
|
||||
calls are routed to this interface if given */
|
||||
|
@@ -101,7 +101,7 @@ using ::std::vector;
|
||||
|
||||
// STATIC DATA -----------------------------------------------------------
|
||||
|
||||
IMPL_LINK( ScDocFunc, NotifyDrawUndo, SdrUndoAction*, pUndoAction )
|
||||
IMPL_LINK_TYPED( ScDocFunc, NotifyDrawUndo, SdrUndoAction*, pUndoAction, void )
|
||||
{
|
||||
// #i101118# if drawing layer collects the undo actions, add it there
|
||||
ScDrawLayer* pDrawLayer = rDocShell.GetDocument().GetDrawLayer();
|
||||
@@ -117,8 +117,6 @@ IMPL_LINK( ScDocFunc, NotifyDrawUndo, SdrUndoAction*, pUndoAction )
|
||||
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
|
||||
if (rDoc.IsStreamValid(nTab))
|
||||
rDoc.SetStreamValid(nTab, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Zeile ueber dem Range painten (fuer Linien nach AdjustRowHeight)
|
||||
|
@@ -68,7 +68,7 @@ protected:
|
||||
public:
|
||||
virtual ~ScDocFunc() {}
|
||||
|
||||
DECL_LINK( NotifyDrawUndo, SdrUndoAction* );
|
||||
DECL_LINK_TYPED( NotifyDrawUndo, SdrUndoAction*, void );
|
||||
|
||||
// for grouping multiple operations into one with a new name
|
||||
void EnterListAction( sal_uInt16 nNameResId );
|
||||
|
@@ -549,7 +549,7 @@ public:
|
||||
IDocumentState & getIDocumentState();
|
||||
|
||||
// IDocumentDrawModelAccess
|
||||
DECL_LINK( AddDrawUndo, SdrUndoAction * );
|
||||
DECL_LINK_TYPED( AddDrawUndo, SdrUndoAction *, void );
|
||||
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const;
|
||||
IDocumentDrawModelAccess & getIDocumentDrawModelAccess();
|
||||
|
||||
|
@@ -397,7 +397,7 @@ bool DocumentDrawModelManager::Search(const SwPaM& rPaM, const SvxSearchItem& rS
|
||||
|
||||
void DocumentDrawModelManager::DrawNotifyUndoHdl()
|
||||
{
|
||||
mpDrawModel->SetNotifyUndoActionHdl( Link<>() );
|
||||
mpDrawModel->SetNotifyUndoActionHdl( Link<SdrUndoAction*,void>() );
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -55,7 +55,7 @@ struct SwUndoGroupObjImpl
|
||||
|
||||
// Draw-Objecte
|
||||
|
||||
IMPL_LINK( SwDoc, AddDrawUndo, SdrUndoAction *, pUndo )
|
||||
IMPL_LINK_TYPED( SwDoc, AddDrawUndo, SdrUndoAction *, pUndo, void )
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
SAL_INFO("sw.core", "Id: " << pUndo->GetId() << "Comment: " << pUndo->GetComment());
|
||||
@@ -73,7 +73,6 @@ IMPL_LINK( SwDoc, AddDrawUndo, SdrUndoAction *, pUndo )
|
||||
}
|
||||
else
|
||||
delete pUndo;
|
||||
return 0;
|
||||
}
|
||||
|
||||
SwSdrUndo::SwSdrUndo( SdrUndoAction* pUndo, const SdrMarkList* pMrkLst )
|
||||
|
Reference in New Issue
Block a user