diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-05-22 17:59:30 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-23 06:22:27 +0000 |
commit | a1cfd9ff7dc0371720c4e2670e318a8282bd9735 (patch) | |
tree | eb9648700508de44671e9792baa3c252b50d065b | |
parent | ea0f63336db0e36cae94fdff3c9778088c0fc092 (diff) |
tdf#89329: use unique_ptr for pImpl in new
Fix "error: declaration of ‘pImpl’ shadows a
member of 'this' [-Werror=shadow]" too
Change-Id: Ib0fc66375ed7d9ae700d5a81a2adb5975fcae592
Reviewed-on: https://gerrit.libreoffice.org/25319
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r-- | include/sfx2/new.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/new.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/include/sfx2/new.hxx b/include/sfx2/new.hxx index 56a7c2f865a8..c7f5b625b01e 100644 --- a/include/sfx2/new.hxx +++ b/include/sfx2/new.hxx @@ -59,7 +59,7 @@ class SFX2_DLLPUBLIC SfxNewFileDialog : public SfxModalDialog friend class SfxNewFileDialog_Impl; private: - SfxNewFileDialog_Impl* pImpl; + std::unique_ptr< SfxNewFileDialog_Impl > pImpl; public: diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 06e93ce7a7d9..9b90f80af06c 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -423,9 +423,9 @@ SfxNewFileDialog_Impl::~SfxNewFileDialog_Impl() SfxNewFileDialog::SfxNewFileDialog(vcl::Window *pParent, sal_uInt16 nFlags) : SfxModalDialog(pParent, "LoadTemplateDialog", - "sfx/ui/loadtemplatedialog.ui") + "sfx/ui/loadtemplatedialog.ui"), + pImpl( new SfxNewFileDialog_Impl(this, nFlags) ) { - pImpl = new SfxNewFileDialog_Impl(this, nFlags); } SfxNewFileDialog::~SfxNewFileDialog() @@ -435,7 +435,7 @@ SfxNewFileDialog::~SfxNewFileDialog() void SfxNewFileDialog::dispose() { - delete pImpl; + pImpl.reset(); SfxModalDialog::dispose(); } diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index f02a69116b3b..354f007246e2 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1763,8 +1763,8 @@ void SwView::NotifyDBChanged() SfxObjectShellLock SwView::CreateTmpSelectionDoc() { - SwXTextView *const pImpl = GetViewImpl()->GetUNOObject_Impl(); - return pImpl->BuildTmpSelectionDoc(); + SwXTextView *const pTempImpl = GetViewImpl()->GetUNOObject_Impl(); + return pTempImpl->BuildTmpSelectionDoc(); } void SwView::AddTransferable(SwTransferable& rTransferable) |