From 9638e6207c7fc48712b1b238177462c00f5011e8 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Wed, 3 Dec 2014 22:01:57 +0100 Subject: ooo#93212 avoid slicing during construction of SdrPage Also hide copy ctor and assignment operator of all derived classes, to ensure that Clone() is the only method to make copies of them. Change-Id: Icb3b50c63b086abe8c9add32e3041fe19692d20b --- sd/inc/sdpage.hxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sd/inc') diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index 767cf3907a67..13ec1c2c380b 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -98,6 +98,8 @@ namespace sd { class SD_DLLPUBLIC SdPage : public FmFormPage, public SdrObjUserCall { + SdPage& operator=(const SdPage&) SAL_DELETED_FUNCTION; + friend class SdGenericDrawPage; friend class SdDrawPage; friend class sd::UndoAnimation; @@ -153,11 +155,13 @@ protected: sal_Int32 mnTransitionFadeColor; double mfTransitionDuration; + SdPage(const SdPage& rSrcPage); + void lateInit(const SdPage& rSrcPage); + public: TYPEINFO_OVERRIDE(); SdPage(SdDrawDocument& rNewDoc, bool bMasterPage=false); - SdPage(const SdPage& rSrcPage); virtual ~SdPage(); virtual SdrPage* Clone() const SAL_OVERRIDE; virtual SdrPage* Clone(SdrModel* pNewModel) const SAL_OVERRIDE; -- cgit