From b6c3afdcbe66075f5a82d35ce8e403e7fe696174 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 24 Jul 2017 13:56:33 +0200 Subject: SdrGlobalData::aUserMakeObjUserDataHdl is unused ever since commit ddb1d5ebf0a81888001ffa1dbab883df70cdc279 Author: Felix Zhang Date: Fri Nov 18 18:23:52 2011 +0800 remove unused Sdr methods removed the SdrObjFactory::MakeNewObjUserData method Change-Id: I95c167b2f20b436bcc0085b6b616406ac210045f Reviewed-on: https://gerrit.libreoffice.org/40363 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/inc/userdat.hxx | 8 -------- sc/source/core/data/drwlayer.cxx | 4 ---- sc/source/core/data/userdat.cxx | 25 ------------------------- 3 files changed, 37 deletions(-) (limited to 'sc') diff --git a/sc/inc/userdat.hxx b/sc/inc/userdat.hxx index 756ddc4876ef..4ee5b27ebc7e 100644 --- a/sc/inc/userdat.hxx +++ b/sc/inc/userdat.hxx @@ -31,14 +31,6 @@ #define SC_UD_IMAPDATA 2 #define SC_UD_MACRODATA 3 -class ScDrawObjFactory -{ - DECL_STATIC_LINK( ScDrawObjFactory, MakeUserData, SdrObjUserDataCreatorParams, SdrObjUserData* ); -public: - ScDrawObjFactory(); - ~ScDrawObjFactory(); -}; - class SC_DLLPUBLIC ScDrawObjData : public SdrObjUserData { public: diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 0c0544e27e2f..16833568b511 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -79,7 +79,6 @@ using namespace ::com::sun::star; -static ScDrawObjFactory* pFac = nullptr; static E3dObjFactory* pF3d = nullptr; static sal_uInt16 nInst = 0; @@ -323,7 +322,6 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const OUString& rName ) : if( !nInst++ ) { - pFac = new ScDrawObjFactory; pF3d = new E3dObjFactory; } } @@ -337,8 +335,6 @@ ScDrawLayer::~ScDrawLayer() delete pUndoGroup; if( !--nInst ) { - delete pFac; - pFac = nullptr; delete pF3d; pF3d = nullptr; } diff --git a/sc/source/core/data/userdat.cxx b/sc/source/core/data/userdat.cxx index 1a76e397a081..9e00a4fdc179 100644 --- a/sc/source/core/data/userdat.cxx +++ b/sc/source/core/data/userdat.cxx @@ -21,31 +21,6 @@ #include "drwlayer.hxx" #include "rechead.hxx" -ScDrawObjFactory::ScDrawObjFactory() -{ - SdrObjFactory::InsertMakeUserDataHdl( LINK ( this, ScDrawObjFactory, MakeUserData ) ); -} - -ScDrawObjFactory::~ScDrawObjFactory() -{ - SdrObjFactory::RemoveMakeUserDataHdl( LINK ( this, ScDrawObjFactory, MakeUserData ) ); -} - -IMPL_STATIC_LINK( - ScDrawObjFactory, MakeUserData, SdrObjUserDataCreatorParams, aParams, SdrObjUserData* ) -{ - if ( aParams.nInventor == SdrInventor::ScOrSwDraw ) - { - if ( aParams.nObjIdentifier == SC_UD_OBJDATA ) - return new ScDrawObjData; - else if ( aParams.nObjIdentifier == SC_UD_IMAPDATA ) - return new ScIMapInfo; - else if ( aParams.nObjIdentifier == SC_UD_MACRODATA ) - return new ScMacroInfo; - OSL_FAIL("MakeUserData: wrong ID"); - } - return nullptr; -} ScDrawObjData::ScDrawObjData() : SdrObjUserData( SdrInventor::ScOrSwDraw, SC_UD_OBJDATA ), -- cgit