summaryrefslogtreecommitdiffstats
path: root/reportdesign/inc/RptModel.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-23 13:53:42 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-24 06:54:06 +0000
commit111de438ea3e512a541281dc0716cc728ea8d152 (patch)
tree2c9ca866e79ed0cfc9299e553a87239345c515a6 /reportdesign/inc/RptModel.hxx
parentConvert T_DRIVERTYPE to scoped enum (diff)
downloadcore-111de438ea3e512a541281dc0716cc728ea8d152.tar.gz
core-111de438ea3e512a541281dc0716cc728ea8d152.zip
remove some manual ref-counting
triggered when I noticed a class doing acquire() in the constructor and then release() in the destructor. found mostly by git grep -n -B5 -e '->release()' Change-Id: Ie1abeaed75c1f861df185e3bde680272dbadc97f Reviewed-on: https://gerrit.libreoffice.org/25363 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'reportdesign/inc/RptModel.hxx')
-rw-r--r--reportdesign/inc/RptModel.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/reportdesign/inc/RptModel.hxx b/reportdesign/inc/RptModel.hxx
index b37ed16fdec3..7d16a9308b16 100644
--- a/reportdesign/inc/RptModel.hxx
+++ b/reportdesign/inc/RptModel.hxx
@@ -43,7 +43,7 @@ class REPORTDESIGN_DLLPUBLIC OReportModel : public SdrModel
friend class OReportPage;
private:
- OXUndoEnvironment* m_pUndoEnv;
+ css::uno::Reference<OXUndoEnvironment> m_xUndoEnv;
::dbaui::DBSubComponentController* m_pController;
::reportdesign::OReportDefinition* m_pReportDefinition;
@@ -63,7 +63,7 @@ public:
/** @returns the numbering type that is used to format page fields in drawing shapes */
virtual SvxNumType GetPageNumType() const override;
- OXUndoEnvironment& GetUndoEnv() { return *m_pUndoEnv;}
+ OXUndoEnvironment& GetUndoEnv() { return *m_xUndoEnv.get();}
void SetModified(bool _bModified);
inline dbaui::DBSubComponentController* getController() const { return m_pController; }