diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-03-25 17:36:34 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-03-25 17:36:34 +0100 |
commit | 2c2d6bb062fcd0f8a619b231dfb3600baf3c86c8 (patch) | |
tree | b4c6037b1a277a2ee1de7704ab90c1ee94d0996b /sw/inc/dcontact.hxx | |
parent | these can go post types change (diff) | |
download | core-2c2d6bb062fcd0f8a619b231dfb3600baf3c86c8.tar.gz core-2c2d6bb062fcd0f8a619b231dfb3600baf3c86c8.zip |
more sensible SdrObject::Clone() and SdrObject::operator=()
Virtual operator=() is IMO pointless, and especially in a class hierarchy
like SdrObject it's pretty unlikely one could reasonably assign any
SdrObject-based object to any other one. Moreover, it was actually
only used in Clone(), which was almost never reimplemented, so the
more sensible choice is to have non-virtual operator= and virtual
Clone() always being reimplemented and using that.
This commit also fixes various smaller or bigger, er, interesting
details in the various operator= implementations.
Diffstat (limited to 'sw/inc/dcontact.hxx')
-rw-r--r-- | sw/inc/dcontact.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index 54df6bf10243..ff317e5e40d4 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -272,8 +272,8 @@ class SwDrawVirtObj : public SdrVirtObj // access to offset virtual const Point GetOffset() const; - virtual SdrObject* Clone() const; - virtual void operator=( const SdrObject& rObj ); + virtual SwDrawVirtObj* Clone() const; + SwDrawVirtObj& operator= (const SwDrawVirtObj& rObj); // connection to writer layout const SwAnchoredObject* GetAnchoredObj() const; |