diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-31 17:14:57 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-01 09:58:01 +0200 |
commit | c0c9c9d5f21d65f582de163566c46242d21dc506 (patch) | |
tree | 72ad6df5d7d50d107baba98fe5914a2cb10afd84 /sw/inc | |
parent | 2ded7acd61cf01a7c50d770b17605252738ed684 (diff) |
forcepoint#44 raii for connection and disconnection of SwView and SwDocShell
Change-Id: I11ce25e6fc043e37d4410359438744567cac37f6
Reviewed-on: https://gerrit.libreoffice.org/55146
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/view.hxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index eca967473ae6..a3eddaedf991 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -128,6 +128,18 @@ struct SwApplyTemplate } }; +class SwView; + +// manage connection and disconnection of SwView and SwDocShell +class SwViewGlueDocShell +{ +private: + SwView& m_rView; +public: + SwViewGlueDocShell(SwView& rView, SwDocShell& rDocSh); + ~SwViewGlueDocShell(); +}; + // view of a document class SW_DLLPUBLIC SwView: public SfxViewShell { @@ -167,6 +179,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell VclPtr<SwEditWin> m_pEditWin; std::unique_ptr<SwWrtShell> m_pWrtShell; + std::unique_ptr<SwViewGlueDocShell> m_xGlueDocShell; SfxShell *m_pShell; // current SubShell at the dispatcher FmFormShell *m_pFormShell; // DB-FormShell |