diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-25 12:59:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-27 17:19:26 +0100 |
commit | c95d91ee35ca09379a8a1d415ae77716ddeadaac (patch) | |
tree | 370b0ad6832f3aca2ee0e2ef375bb6f953e5d360 /include/svx/svdtext.hxx | |
parent | 2d8f17565ebe867210f5769851d91b2e7b612a8f (diff) |
improve subtyping when dealing with tools::WeakReference
tweak the templating to make it easier to declare a WeakReference that
points to a subclass for a weak-capable class.
Which lets us declare some fields with more specific types, and dump a
lot of unnecessary casting.
And make WeakBase be inherited from virtually, so we don't end
up with weird states where two weak refernces could point to two
different parts of the same object.
Change-Id: I3213ea27e087038457b0761b5171c7bce96e71f3
Reviewed-on: https://gerrit.libreoffice.org/48650
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx/svdtext.hxx')
-rw-r--r-- | include/svx/svdtext.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/svx/svdtext.hxx b/include/svx/svdtext.hxx index 4733ad4f6230..f16e16edd4e1 100644 --- a/include/svx/svdtext.hxx +++ b/include/svx/svdtext.hxx @@ -40,11 +40,11 @@ namespace sdr { namespace properties { */ class SfxStyleSheet; -class SVX_DLLPUBLIC SdrText : public tools::WeakBase< SdrText > +class SVX_DLLPUBLIC SdrText : public virtual tools::WeakBase { public: SdrText( SdrTextObj& rObject, OutlinerParaObject* pOutlinerParaObject = nullptr ); - virtual ~SdrText(); + virtual ~SdrText() override; virtual void SetModel(SdrModel* pNewModel); void ForceOutlinerParaObject( OutlinerMode nOutlMode ); |