summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-12-03 22:01:57 +0100
committerDavid Tardon <dtardon@redhat.com>2014-12-05 09:57:36 +0100
commitd49e5761f359020c349c268ee78a4256cc46541e (patch)
tree51452df20c020095d9e7397f1066661f53c2e835 /reportdesign
parent8ddc963165bb52d7272ee1cca099f2ee8fed6759 (diff)
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 (cherry picked from commit 9638e6207c7fc48712b1b238177462c00f5011e8)
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/inc/RptPage.hxx2
-rw-r--r--reportdesign/source/core/sdr/RptPage.cxx4
2 files changed, 5 insertions, 1 deletions
diff --git a/reportdesign/inc/RptPage.hxx b/reportdesign/inc/RptPage.hxx
index b320a3eb0861..9ea966aea156 100644
--- a/reportdesign/inc/RptPage.hxx
+++ b/reportdesign/inc/RptPage.hxx
@@ -34,6 +34,8 @@ class OReportModel;
class REPORTDESIGN_DLLPUBLIC OReportPage : public SdrPage
{
+ OReportPage& operator=(const OReportPage&) SAL_DELETED_FUNCTION;
+
OReportModel& rModel;
::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > m_xSection;
bool m_bSpecialInsertMode;
diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx
index 5009a662032b..c55a36082264 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -61,7 +61,9 @@ OReportPage::~OReportPage()
SdrPage* OReportPage::Clone() const
{
- return new OReportPage( *this );
+ OReportPage *const pNewPage = new OReportPage( *this );
+ pNewPage->lateInit( *this );
+ return pNewPage;
}