Issue 93212 - Avoid slicing during construction of SdrPage
Summary: Avoid slicing during construction of SdrPage
Status: CONFIRMED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: OOO300m3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-28 14:50 UTC by groucho266
Modified: 2017-05-20 10:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description groucho266 2008-08-28 14:50:04 UTC
The SdrPage copy constructor contains the line
    *this = rSrcPage;
Like in issue 93186 this leads to slicing and to subtle errors.

The copy constructor SdrObjList also contains an assignment to *this.

Avoid assignment to *this.

One way to do this is the use of a proper Clone() method.
For details on the general problem see for instance item 54. Avoid slicing... in
C++ Coding Standards by Sutter and Alexandrescu.
Comment 1 groucho266 2008-12-09 14:27:05 UTC
Setting target to OOo 3.2 due to time constraints.
Comment 2 groucho266 2009-09-25 09:50:18 UTC
Setting target to OOo 3.3
Comment 3 groucho266 2010-07-08 16:58:52 UTC
Changing target.
Comment 4 Marcus 2017-05-20 10:47:49 UTC
Reset assigne to the default "issues@openoffice.apache.org".