summaryrefslogtreecommitdiff
path: root/sw/inc/viewsh.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-16 14:32:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-17 08:39:52 +0200
commite00f99a1157f0ed31210ed1a662457d184ec4819 (patch)
tree5267cebe65e5b32f44eab8edd1a6170d83440fce /sw/inc/viewsh.hxx
parent8f32dc03302e2435aab8e876fb874a1c4897d536 (diff)
loplugin:useuniqueptr in SwViewShell
Change-Id: I2060769860be8527f7966d2d83fe9a6f533f8271 Reviewed-on: https://gerrit.libreoffice.org/57520 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc/viewsh.hxx')
-rw-r--r--sw/inc/viewsh.hxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 832f4f9dd878..484fbe951f95 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -107,7 +107,8 @@ class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell>
SwRect maInvalidRect;
SfxViewShell *mpSfxViewShell;
- SwViewShellImp *mpImp; // Core-internals of SwViewShell.
+ std::unique_ptr<SwViewShellImp>
+ mpImp; // Core-internals of SwViewShell.
// The pointer is never 0.
VclPtr<vcl::Window> mpWin; ///< = 0 during printing or pdf export
@@ -118,8 +119,8 @@ class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell>
// (because a scaling has to be set at
// the original printer)
- SwViewOption *mpOpt;
- SwAccessibilityOptions* mpAccOptions;
+ std::unique_ptr<SwViewOption> mpOpt;
+ std::unique_ptr<SwAccessibilityOptions> mpAccOptions;
bool mbDocSizeChgd :1; // For DocChgNotify(): Announce new DocSize
// at EndAction to DocMDI.
@@ -183,8 +184,8 @@ protected:
public:
- SwViewShellImp *Imp() { return mpImp; }
- const SwViewShellImp *Imp() const { return mpImp; }
+ SwViewShellImp *Imp() { return mpImp.get(); }
+ const SwViewShellImp *Imp() const { return mpImp.get(); }
const SwNodes& GetNodes() const;
@@ -417,7 +418,7 @@ public:
// Calls Idle-formatter of Layout.
void LayoutIdle();
- const SwViewOption *GetViewOptions() const { return mpOpt; }
+ const SwViewOption *GetViewOptions() const { return mpOpt.get(); }
virtual void ApplyViewOptions( const SwViewOption &rOpt );
void SetUIOptions( const SwViewOption &rOpt );
virtual void SetReadonlyOption(bool bSet); // Set readonly-bit of ViewOptions.
@@ -425,7 +426,7 @@ public:
void SetPrtFormatOption(bool bSet); // Set PrtFormat-Bit of ViewOptions.
void SetReadonlySelectionOption(bool bSet); // Change the selection mode in readonly docs.
- const SwAccessibilityOptions* GetAccessibilityOptions() const { return mpAccOptions;}
+ const SwAccessibilityOptions* GetAccessibilityOptions() const { return mpAccOptions.get();}
static void SetShellRes( ShellResource* pRes ) { mpShellRes = pRes; }
static ShellResource* GetShellRes();