summaryrefslogtreecommitdiff
path: root/reportdesign/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-01 16:22:29 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-06 07:01:34 +0000
commit0323253a7c67316cb96e4a64792ab4fe74aac1ca (patch)
tree81787c4ae44ff778aa41e12574cd60a624c9277b /reportdesign/inc
parent4d666f5092d7c4f2ece9702dda4d874e44cdc6f7 (diff)
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: I96e43a3d30ffd9ae9a34275f24cd914d8f7b026f Reviewed-on: https://gerrit.libreoffice.org/25806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'reportdesign/inc')
-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..5992d21fcd78 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;
+ rtl::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; }