From ad1b8880c22a6a38b31aa2516d9d8da979c0a102 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 10 Oct 2018 16:02:05 +0200 Subject: tdf#119067 DefaultLabel only for interactively created OBJs Both have to work - the Wizard-created report which this report defines and the interactively created ones (see tdf#118730). The second was moved to OUnoObject::CreateMediator and by error sets the default text (e.g. 'Label') now all the time. This was wrong. To solve, remember if the Object was created interactively (which is the case when ::EndCreate was called which is needed again) and set the default only when that is the case. Change-Id: Id26e701d863b098a77db5f6419bcabf1f2ec5017 Reviewed-on: https://gerrit.libreoffice.org/61620 Tested-by: Jenkins Reviewed-by: Armin Le Grand --- reportdesign/inc/RptObject.hxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'reportdesign/inc') diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx index 3a4c6cbe35de..31e3346c074d 100644 --- a/reportdesign/inc/RptObject.hxx +++ b/reportdesign/inc/RptObject.hxx @@ -229,6 +229,9 @@ class REPORTDESIGN_DLLPUBLIC OUnoObject: public SdrUnoObj , public OObjectBase friend class DlgEdFactory; sal_uInt16 m_nObjectType; + // tdf#118730 remember if this object was created interactively (due to ::EndCreate being called) + bool m_bSetDefaultLabel; + protected: OUnoObject(SdrModel& rSdrModel, const OUString& _sComponentName, @@ -246,6 +249,7 @@ protected: virtual void NbcMove( const Size& rSize ) override; virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override; virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; + virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override; virtual SdrPage* GetImplPage() const override; -- cgit v1.2.3